blob: f2b5ea92f8082f68f84ef0969f29c355b2ec6f38 [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
David Goodwin1deef6d2009-08-04 18:11:59 +00006define float @test1(float %a, float %b) {
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
David Goodwin1deef6d2009-08-04 18:11:59 +000013define float @test2(float %a, float %b) {
14entry:
15 %0 = fmul float %a, %b
16 %1 = fmul float -1.0, %0
17 ret float %1
18}
19