blob: efd87d2dcb8966dd6d69e207dae85a5e6069e9e3 [file] [log] [blame]
David Goodwin3b9c52c2009-08-04 17:53:06 +00001; XFAIL: *
Dan Gohmanc8054d92009-09-09 00:09:15 +00002; RUN: llc < %s -march=arm -mattr=+vfp2 | FileCheck %s
David Goodwin1cc6dd92009-10-01 22:19:57 +00003; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=1 | FileCheck %s
4; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=0 | FileCheck %s
Dan Gohmanc8054d92009-09-09 00:09:15 +00005; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s
6; RUN: llc < %s -march=arm -mcpu=cortex-a9 | FileCheck %s
David Goodwin3b9c52c2009-08-04 17:53:06 +00007
Dan Gohman676d1152009-08-10 16:48:40 +00008define float @test1(float %a, float %b) nounwind {
David Goodwinbdf1a1d2009-08-10 23:06:57 +00009; CHECK: fnmscs s2, s1, s0
David Goodwin3b9c52c2009-08-04 17:53:06 +000010entry:
11 %0 = fmul float %a, %b
David Goodwin9e7c7e72009-08-10 22:58:08 +000012 %1 = fsub float -0.0, %0
David Goodwin3b9c52c2009-08-04 17:53:06 +000013 ret float %1
14}
15
Dan Gohman676d1152009-08-10 16:48:40 +000016define float @test2(float %a, float %b) nounwind {
David Goodwinbdf1a1d2009-08-10 23:06:57 +000017; CHECK: fnmscs s2, s1, s0
David Goodwina2824d52009-08-04 18:11:59 +000018entry:
19 %0 = fmul float %a, %b
20 %1 = fmul float -1.0, %0
21 ret float %1
22}
23