blob: 5dd2aa9d2f1b0f92efe000351454c9a8fb9b3db0 [file] [log] [blame]
David Goodwin42a83f22009-08-04 17:53:06 +00001; XFAIL: *
David Goodwin831b5002009-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 Goodwinaf37f342009-08-10 22:58:08 +00005; RUN: llvm-as < %s | llc -march=arm -mcpu=cortex-a8 | grep -E {fnmuls\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 2
6; RUN: llvm-as < %s | llc -march=arm -mcpu=cortex-a9 | grep -E {fnmuls\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 2
David Goodwin42a83f22009-08-04 17:53:06 +00007
Dan Gohman5743a3f2009-08-10 16:48:40 +00008define float @test1(float %a, float %b) nounwind {
David Goodwin42a83f22009-08-04 17:53:06 +00009entry:
10 %0 = fmul float %a, %b
David Goodwinaf37f342009-08-10 22:58:08 +000011 %1 = fsub float -0.0, %0
David Goodwin42a83f22009-08-04 17:53:06 +000012 ret float %1
13}
14
Dan Gohman5743a3f2009-08-10 16:48:40 +000015define float @test2(float %a, float %b) nounwind {
David Goodwin831b5002009-08-04 18:11:59 +000016entry:
17 %0 = fmul float %a, %b
18 %1 = fmul float -1.0, %0
19 ret float %1
20}
21