blob: c2056274658d58bcf54a7aea35061391c8e9c894 [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 {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
4; 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 Goodwin767a9522009-08-07 23:32:33 +00005; 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
6; 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 Goodwin42a83f22009-08-04 17:53:06 +00007
Dan Gohman5743a3f2009-08-10 16:48:40 +00008define float @test1(float %acc, float %a, float %b) nounwind {
David Goodwin42a83f22009-08-04 17:53:06 +00009entry:
10 %0 = fmul float %a, %b
11 %1 = fsub float 0.0, %0
12 %2 = fsub float %1, %acc
13 ret float %2
14}
15
Dan Gohman5743a3f2009-08-10 16:48:40 +000016define float @test2(float %acc, float %a, float %b) nounwind {
David Goodwin831b5002009-08-04 18:11:59 +000017entry:
18 %0 = fmul float %a, %b
19 %1 = fmul float -1.0, %0
20 %2 = fsub float %1, %acc
21 ret float %2
22}
23