1 ; RUN: llc -mtriple=arm-eabi -mattr=+vfp2 %s -o - \ 2 ; RUN: | FileCheck %s -check-prefix=VFP2 3 4 ; RUN: llc -mtriple=arm-eabi -mattr=+neon %s -o - \ 5 ; RUN: | FileCheck %s -check-prefix=NFP0 6 7 ; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a8 %s -o - \ 8 ; RUN: | FileCheck %s -check-prefix=CORTEXA8 9 10 ; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a8 --enable-unsafe-fp-math %s -o - \ 11 ; RUN: | FileCheck %s -check-prefix=CORTEXA8U 12 13 ; RUN: llc -mtriple=arm-darwin -mcpu=cortex-a8 %s -o - \ 14 ; RUN: | FileCheck %s -check-prefix=CORTEXA8U 15 16 ; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a9 %s -o - \ 17 ; RUN: | FileCheck %s -check-prefix=CORTEXA9 18 19 define float @test1(float* %a) { 20 entry: 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] 26 ret float %retval 27 } 28 ; VFP2-LABEL: test1: 29 ; VFP2: vneg.f32 s{{.*}}, s{{.*}} 30 31 ; NFP1-LABEL: test1: 32 ; NFP1: vneg.f32 d{{.*}}, d{{.*}} 33 34 ; NFP0-LABEL: test1: 35 ; NFP0: vneg.f32 s{{.*}}, s{{.*}} 36 37 ; CORTEXA8-LABEL: test1: 38 ; CORTEXA8: vneg.f32 s{{.*}}, s{{.*}} 39 40 ; CORTEXA8U-LABEL: test1: 41 ; CORTEXA8U: vneg.f32 d{{.*}}, d{{.*}} 42 43 ; CORTEXA9-LABEL: test1: 44 ; CORTEXA9: vneg.f32 s{{.*}}, s{{.*}} 45 46 define float @test2(float* %a) { 47 entry: 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] 53 ret float %retval 54 } 55 ; VFP2-LABEL: test2: 56 ; VFP2: vneg.f32 s{{.*}}, s{{.*}} 57 58 ; NFP1-LABEL: test2: 59 ; NFP1: vneg.f32 d{{.*}}, d{{.*}} 60 61 ; NFP0-LABEL: test2: 62 ; NFP0: vneg.f32 s{{.*}}, s{{.*}} 63 64 ; CORTEXA8-LABEL: test2: 65 ; CORTEXA8: vneg.f32 s{{.*}}, s{{.*}} 66 67 ; CORTEXA8U-LABEL: test2: 68 ; CORTEXA8U: vneg.f32 d{{.*}}, d{{.*}} 69 70 ; CORTEXA9-LABEL: test2: 71 ; CORTEXA9: vneg.f32 s{{.*}}, s{{.*}} 72 73