1 ; RUN: llc -mtriple=arm-eabi -mattr=+vfp2 %s -o - \
2 ; RUN: | FileCheck %s -check-prefix=VFP2
4 ; RUN: llc -mtriple=arm-eabi -mattr=+neon %s -o - \
5 ; RUN: | FileCheck %s -check-prefix=NFP0
7 ; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a8 %s -o - \
8 ; RUN: | FileCheck %s -check-prefix=CORTEXA8
10 ; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a8 --enable-unsafe-fp-math %s -o - \
11 ; RUN: | FileCheck %s -check-prefix=CORTEXA8U
13 ; RUN: llc -mtriple=arm-darwin -mcpu=cortex-a8 %s -o - \
14 ; RUN: | FileCheck %s -check-prefix=CORTEXA8U
16 ; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a9 %s -o - \
17 ; RUN: | FileCheck %s -check-prefix=CORTEXA9
19 define float @test1(float* %a) {
21 %0 = load float* %a, align 4 ; <float> [#uses=2]
22 %1 = fsub float -0.000000e+00, %0 ; <float> [#uses=2]
23 %2 = fpext float %1 to double ; <double> [#uses=1]
24 %3 = fcmp olt double %2, 1.234000e+00 ; <i1> [#uses=1]
25 %retval = select i1 %3, float %1, float %0 ; <float> [#uses=1]
29 ; VFP2: vneg.f32 s{{.*}}, s{{.*}}
32 ; NFP1: vneg.f32 d{{.*}}, d{{.*}}
35 ; NFP0: vneg.f32 s{{.*}}, s{{.*}}
37 ; CORTEXA8-LABEL: test1:
38 ; CORTEXA8: vneg.f32 s{{.*}}, s{{.*}}
40 ; CORTEXA8U-LABEL: test1:
41 ; CORTEXA8U: vneg.f32 d{{.*}}, d{{.*}}
43 ; CORTEXA9-LABEL: test1:
44 ; CORTEXA9: vneg.f32 s{{.*}}, s{{.*}}
46 define float @test2(float* %a) {
48 %0 = load float* %a, align 4 ; <float> [#uses=2]
49 %1 = fmul float -1.000000e+00, %0 ; <float> [#uses=2]
50 %2 = fpext float %1 to double ; <double> [#uses=1]
51 %3 = fcmp olt double %2, 1.234000e+00 ; <i1> [#uses=1]
52 %retval = select i1 %3, float %1, float %0 ; <float> [#uses=1]
56 ; VFP2: vneg.f32 s{{.*}}, s{{.*}}
59 ; NFP1: vneg.f32 d{{.*}}, d{{.*}}
62 ; NFP0: vneg.f32 s{{.*}}, s{{.*}}
64 ; CORTEXA8-LABEL: test2:
65 ; CORTEXA8: vneg.f32 s{{.*}}, s{{.*}}
67 ; CORTEXA8U-LABEL: test2:
68 ; CORTEXA8U: vneg.f32 d{{.*}}, d{{.*}}
70 ; CORTEXA9-LABEL: test2:
71 ; CORTEXA9: vneg.f32 s{{.*}}, s{{.*}}