David Goodwin | 53e4471 | 2009-08-04 20:39:05 +0000 | [diff] [blame^] | 1 | ; RUN: llvm-as < %s | llc -march=arm -mattr=+vfp2 | grep -E {fnegs\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 2 |
| 2 | ; RUN: llvm-as < %s | llc -march=arm -mattr=+neon,+neonfp | grep -E {vneg.f32\\W*d\[0-9\]+,\\W*d\[0-9\]+} | count 2 |
| 3 | ; RUN: llvm-as < %s | llc -march=arm -mattr=+neon,-neonfp | grep -E {fnegs\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 2 |
| 4 | |
| 5 | define float @test1(float* %a) { |
| 6 | entry: |
| 7 | %0 = load float* %a, align 4 ; <float> [#uses=2] |
| 8 | %1 = fsub float -0.000000e+00, %0 ; <float> [#uses=2] |
| 9 | %2 = fpext float %1 to double ; <double> [#uses=1] |
| 10 | %3 = fcmp olt double %2, 1.234000e+00 ; <i1> [#uses=1] |
| 11 | %retval = select i1 %3, float %1, float %0 ; <float> [#uses=1] |
| 12 | ret float %retval |
| 13 | } |
| 14 | |
| 15 | define float @test2(float* %a) { |
| 16 | entry: |
| 17 | %0 = load float* %a, align 4 ; <float> [#uses=2] |
| 18 | %1 = fmul float -1.000000e+00, %0 ; <float> [#uses=2] |
| 19 | %2 = fpext float %1 to double ; <double> [#uses=1] |
| 20 | %3 = fcmp olt double %2, 1.234000e+00 ; <i1> [#uses=1] |
| 21 | %retval = select i1 %3, float %1, float %0 ; <float> [#uses=1] |
| 22 | ret float %retval |
| 23 | } |