Dan Gohman | fce288f | 2009-09-09 00:09:15 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -march=arm -mattr=+vfp2 | FileCheck %s |
David Goodwin | 9843a93 | 2009-10-01 22:19:57 +0000 | [diff] [blame] | 2 | ; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=1 | FileCheck %s |
| 3 | ; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=0 | FileCheck %s |
Dan Gohman | fce288f | 2009-09-09 00:09:15 +0000 | [diff] [blame] | 4 | ; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s |
| 5 | ; RUN: llc < %s -march=arm -mcpu=cortex-a9 | FileCheck %s |
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 { |
Jim Grosbach | e516549 | 2009-11-09 00:11:35 +0000 | [diff] [blame] | 8 | ; CHECK: vnmla.f32 s2, s1, s0 |
David Goodwin | 42a83f2 | 2009-08-04 17:53:06 +0000 | [diff] [blame] | 9 | entry: |
| 10 | %0 = fmul float %a, %b |
David Goodwin | aeb66fe | 2009-08-10 22:31:04 +0000 | [diff] [blame] | 11 | %1 = fsub float -0.0, %0 |
David Goodwin | 42a83f2 | 2009-08-04 17:53:06 +0000 | [diff] [blame] | 12 | %2 = fsub float %1, %acc |
| 13 | ret float %2 |
| 14 | } |
| 15 | |
Dan Gohman | 5743a3f | 2009-08-10 16:48:40 +0000 | [diff] [blame] | 16 | define float @test2(float %acc, float %a, float %b) nounwind { |
Jim Grosbach | e516549 | 2009-11-09 00:11:35 +0000 | [diff] [blame] | 17 | ; CHECK: vnmla.f32 s2, s1, s0 |
David Goodwin | 831b500 | 2009-08-04 18:11:59 +0000 | [diff] [blame] | 18 | entry: |
| 19 | %0 = fmul float %a, %b |
| 20 | %1 = fmul float -1.0, %0 |
| 21 | %2 = fsub float %1, %acc |
| 22 | ret float %2 |
| 23 | } |
| 24 | |