2009-11-22 14:23:33 +00:00
|
|
|
; RUN: llc < %s -march=arm -mattr=+vfp2 | FileCheck %s -check-prefix=VFP2
|
2010-03-25 23:47:34 +00:00
|
|
|
; RUN: llc < %s -march=arm -mattr=+neon | FileCheck %s -check-prefix=NFP0
|
2013-03-21 21:30:49 +00:00
|
|
|
; RUN: llc < %s -mtriple=arm-eabi -mcpu=cortex-a8 | FileCheck %s -check-prefix=CORTEXA8
|
|
|
|
; RUN: llc < %s -mtriple=arm-eabi -mcpu=cortex-a8 --enable-unsafe-fp-math | FileCheck %s -check-prefix=CORTEXA8U
|
|
|
|
; RUN: llc < %s -mtriple=arm-darwin -mcpu=cortex-a8 | FileCheck %s -check-prefix=CORTEXA8U
|
2009-11-22 14:23:33 +00:00
|
|
|
; RUN: llc < %s -march=arm -mcpu=cortex-a9 | FileCheck %s -check-prefix=CORTEXA9
|
2009-08-04 20:39:05 +00:00
|
|
|
|
|
|
|
define float @test1(float* %a) {
|
|
|
|
entry:
|
|
|
|
%0 = load float* %a, align 4 ; <float> [#uses=2]
|
|
|
|
%1 = fsub float -0.000000e+00, %0 ; <float> [#uses=2]
|
|
|
|
%2 = fpext float %1 to double ; <double> [#uses=1]
|
|
|
|
%3 = fcmp olt double %2, 1.234000e+00 ; <i1> [#uses=1]
|
|
|
|
%retval = select i1 %3, float %1, float %0 ; <float> [#uses=1]
|
|
|
|
ret float %retval
|
|
|
|
}
|
2013-07-13 20:38:47 +00:00
|
|
|
; VFP2-LABEL: test1:
|
2011-01-21 05:51:33 +00:00
|
|
|
; VFP2: vneg.f32 s{{.*}}, s{{.*}}
|
2009-11-22 14:23:33 +00:00
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NFP1-LABEL: test1:
|
2011-01-21 05:51:33 +00:00
|
|
|
; NFP1: vneg.f32 d{{.*}}, d{{.*}}
|
2009-11-22 14:23:33 +00:00
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NFP0-LABEL: test1:
|
2011-01-21 05:51:33 +00:00
|
|
|
; NFP0: vneg.f32 s{{.*}}, s{{.*}}
|
2009-11-22 14:23:33 +00:00
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; CORTEXA8-LABEL: test1:
|
2013-03-21 18:47:47 +00:00
|
|
|
; CORTEXA8: vneg.f32 s{{.*}}, s{{.*}}
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; CORTEXA8U-LABEL: test1:
|
2013-03-21 18:47:47 +00:00
|
|
|
; CORTEXA8U: vneg.f32 d{{.*}}, d{{.*}}
|
2009-11-22 14:23:33 +00:00
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; CORTEXA9-LABEL: test1:
|
2011-01-21 05:51:33 +00:00
|
|
|
; CORTEXA9: vneg.f32 s{{.*}}, s{{.*}}
|
2009-08-04 20:39:05 +00:00
|
|
|
|
|
|
|
define float @test2(float* %a) {
|
|
|
|
entry:
|
|
|
|
%0 = load float* %a, align 4 ; <float> [#uses=2]
|
|
|
|
%1 = fmul float -1.000000e+00, %0 ; <float> [#uses=2]
|
|
|
|
%2 = fpext float %1 to double ; <double> [#uses=1]
|
|
|
|
%3 = fcmp olt double %2, 1.234000e+00 ; <i1> [#uses=1]
|
|
|
|
%retval = select i1 %3, float %1, float %0 ; <float> [#uses=1]
|
|
|
|
ret float %retval
|
|
|
|
}
|
2013-07-13 20:38:47 +00:00
|
|
|
; VFP2-LABEL: test2:
|
2011-01-21 05:51:33 +00:00
|
|
|
; VFP2: vneg.f32 s{{.*}}, s{{.*}}
|
2009-11-22 14:23:33 +00:00
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NFP1-LABEL: test2:
|
2011-01-21 05:51:33 +00:00
|
|
|
; NFP1: vneg.f32 d{{.*}}, d{{.*}}
|
2009-11-22 14:23:33 +00:00
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NFP0-LABEL: test2:
|
2011-01-21 05:51:33 +00:00
|
|
|
; NFP0: vneg.f32 s{{.*}}, s{{.*}}
|
2009-11-22 14:23:33 +00:00
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; CORTEXA8-LABEL: test2:
|
2013-03-21 18:47:47 +00:00
|
|
|
; CORTEXA8: vneg.f32 s{{.*}}, s{{.*}}
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; CORTEXA8U-LABEL: test2:
|
2013-03-21 18:47:47 +00:00
|
|
|
; CORTEXA8U: vneg.f32 d{{.*}}, d{{.*}}
|
2009-11-22 14:23:33 +00:00
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; CORTEXA9-LABEL: test2:
|
2011-01-21 05:51:33 +00:00
|
|
|
; CORTEXA9: vneg.f32 s{{.*}}, s{{.*}}
|
2009-11-22 14:23:33 +00:00
|
|
|
|