blob: 335153f0db65b925b4bf34e7d5c7612d52d43c91 [file] [log] [blame]
David Goodwindd19ce42009-08-04 17:53:06 +00001; XFAIL: *
David Goodwin1deef6d2009-08-04 18:11:59 +00002; RUN: llvm-as < %s | llc -march=arm -mattr=+vfp2 | grep -E {fnmuls\\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 {fnmuls\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 2
4; RUN: llvm-as < %s | llc -march=arm -mattr=+neon,-neonfp | grep -E {fnmuls\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 2
David Goodwindd19ce42009-08-04 17:53:06 +00005
Dan Gohmanb2fceb92009-08-10 16:48:40 +00006define float @test1(float %a, float %b) nounwind {
David Goodwindd19ce42009-08-04 17:53:06 +00007entry:
8 %0 = fmul float %a, %b
9 %1 = fsub float 0.0, %0
10 ret float %1
11}
12
Dan Gohmanb2fceb92009-08-10 16:48:40 +000013define float @test2(float %a, float %b) nounwind {
David Goodwin1deef6d2009-08-04 18:11:59 +000014entry:
15 %0 = fmul float %a, %b
16 %1 = fmul float -1.0, %0
17 ret float %1
18}
19