blob: 3ae437d69db18d89a31cf6d95119ec303789ca4d [file] [log] [blame]
Dan Gohmanda594cf2009-09-09 00:09:15 +00001; RUN: llc < %s -march=arm -mattr=+vfp2 | FileCheck %s
David Goodwin736fed92009-10-01 22:19:57 +00002; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=1 | FileCheck %s
3; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=0 | FileCheck %s
Dan Gohmanda594cf2009-09-09 00:09:15 +00004; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s
5; RUN: llc < %s -march=arm -mcpu=cortex-a9 | FileCheck %s
David Goodwindd19ce42009-08-04 17:53:06 +00006
Dan Gohmanb2fceb92009-08-10 16:48:40 +00007define float @test1(float %acc, float %a, float %b) nounwind {
David Goodwin62f7d1942009-08-10 23:06:57 +00008; CHECK: fnmscs s2, s1, s0
David Goodwindd19ce42009-08-04 17:53:06 +00009entry:
10 %0 = fmul float %a, %b
David Goodwin6d4812a2009-08-10 22:31:04 +000011 %1 = fsub float -0.0, %0
David Goodwindd19ce42009-08-04 17:53:06 +000012 %2 = fsub float %1, %acc
13 ret float %2
14}
15
Dan Gohmanb2fceb92009-08-10 16:48:40 +000016define float @test2(float %acc, float %a, float %b) nounwind {
David Goodwin62f7d1942009-08-10 23:06:57 +000017; CHECK: fnmscs s2, s1, s0
David Goodwin1deef6d2009-08-04 18:11:59 +000018entry:
19 %0 = fmul float %a, %b
20 %1 = fmul float -1.0, %0
21 %2 = fsub float %1, %acc
22 ret float %2
23}
24