David Goodwin | 831b500 | 2009-08-04 18:11:59 +0000 | [diff] [blame] | 1 | ; RUN: llvm-as < %s | llc -march=arm -mattr=+vfp2 | grep -E {fnmscs\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 2 |
| 2 | ; RUN: llvm-as < %s | llc -march=arm -mattr=+neon,+neonfp | grep -E {fnmscs\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 2 |
| 3 | ; RUN: llvm-as < %s | llc -march=arm -mattr=+neon,-neonfp | grep -E {fnmscs\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 2 |
David Goodwin | 767a952 | 2009-08-07 23:32:33 +0000 | [diff] [blame] | 4 | ; RUN: llvm-as < %s | llc -march=arm -mcpu=cortex-a8 | grep -E {fnmscs\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 2 |
| 5 | ; RUN: llvm-as < %s | llc -march=arm -mcpu=cortex-a9 | grep -E {fnmscs\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 2 |
David Goodwin | 42a83f2 | 2009-08-04 17:53:06 +0000 | [diff] [blame] | 6 | |
Dan Gohman | 5743a3f | 2009-08-10 16:48:40 +0000 | [diff] [blame] | 7 | define float @test1(float %acc, float %a, float %b) nounwind { |
David Goodwin | 42a83f2 | 2009-08-04 17:53:06 +0000 | [diff] [blame] | 8 | entry: |
| 9 | %0 = fmul float %a, %b |
David Goodwin | aeb66fe | 2009-08-10 22:31:04 +0000 | [diff] [blame^] | 10 | %1 = fsub float -0.0, %0 |
David Goodwin | 42a83f2 | 2009-08-04 17:53:06 +0000 | [diff] [blame] | 11 | %2 = fsub float %1, %acc |
| 12 | ret float %2 |
| 13 | } |
| 14 | |
Dan Gohman | 5743a3f | 2009-08-10 16:48:40 +0000 | [diff] [blame] | 15 | define float @test2(float %acc, float %a, float %b) nounwind { |
David Goodwin | 831b500 | 2009-08-04 18:11:59 +0000 | [diff] [blame] | 16 | entry: |
| 17 | %0 = fmul float %a, %b |
| 18 | %1 = fmul float -1.0, %0 |
| 19 | %2 = fsub float %1, %acc |
| 20 | ret float %2 |
| 21 | } |
| 22 | |