blob: bc3d42de75ca6b76a490394303a33ed98fa7aa80 [file] [log] [blame]
Jim Grosbache5165492009-11-09 00:11:35 +00001; RUN: llc < %s -march=arm -mattr=+vfp2 | grep -E {vneg.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 2
David Goodwin9843a932009-10-01 22:19:57 +00002; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=1 | grep -E {vneg.f32\\W*d\[0-9\]+,\\W*d\[0-9\]+} | count 2
Jim Grosbache5165492009-11-09 00:11:35 +00003; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=0 | grep -E {vneg.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 2
Dan Gohmanfce288f2009-09-09 00:09:15 +00004; RUN: llc < %s -march=arm -mcpu=cortex-a8 | grep -E {vneg.f32\\W*d\[0-9\]+,\\W*d\[0-9\]+} | count 2
Jim Grosbache5165492009-11-09 00:11:35 +00005; RUN: llc < %s -march=arm -mcpu=cortex-a9 | grep -E {vneg.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 2
David Goodwin53e44712009-08-04 20:39:05 +00006
7define float @test1(float* %a) {
8entry:
9 %0 = load float* %a, align 4 ; <float> [#uses=2]
10 %1 = fsub float -0.000000e+00, %0 ; <float> [#uses=2]
11 %2 = fpext float %1 to double ; <double> [#uses=1]
12 %3 = fcmp olt double %2, 1.234000e+00 ; <i1> [#uses=1]
13 %retval = select i1 %3, float %1, float %0 ; <float> [#uses=1]
14 ret float %retval
15}
16
17define float @test2(float* %a) {
18entry:
19 %0 = load float* %a, align 4 ; <float> [#uses=2]
20 %1 = fmul float -1.000000e+00, %0 ; <float> [#uses=2]
21 %2 = fpext float %1 to double ; <double> [#uses=1]
22 %3 = fcmp olt double %2, 1.234000e+00 ; <i1> [#uses=1]
23 %retval = select i1 %3, float %1, float %0 ; <float> [#uses=1]
24 ret float %retval
25}