blob: 0b47edd5f1f121546898d2ffb0dfa32e2a15d289 [file] [log] [blame]
Dan Gohmanda594cf2009-09-09 00:09:15 +00001; RUN: llc < %s -march=arm -mattr=+vfp2 | FileCheck %s
Jim Grosbach20d1d652010-03-25 23:47:34 +00002; RUN: llc < %s -march=arm -mattr=+neon | FileCheck %s
Dan Gohmanda594cf2009-09-09 00:09:15 +00003; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s
4; RUN: llc < %s -march=arm -mcpu=cortex-a9 | FileCheck %s
David Goodwindd19ce42009-08-04 17:53:06 +00005
Dan Gohmanb2fceb92009-08-10 16:48:40 +00006define float @test1(float %acc, float %a, float %b) nounwind {
Evan Chengf35de812010-05-21 00:43:17 +00007; CHECK: vnmla.f32 s{{.*}}, s{{.*}}, s{{.*}}
David Goodwindd19ce42009-08-04 17:53:06 +00008entry:
9 %0 = fmul float %a, %b
David Goodwin6d4812a2009-08-10 22:31:04 +000010 %1 = fsub float -0.0, %0
David Goodwindd19ce42009-08-04 17:53:06 +000011 %2 = fsub float %1, %acc
12 ret float %2
13}
14
Dan Gohmanb2fceb92009-08-10 16:48:40 +000015define float @test2(float %acc, float %a, float %b) nounwind {
Evan Chengf35de812010-05-21 00:43:17 +000016; CHECK: vnmla.f32 s{{.*}}, s{{.*}}, s{{.*}}
David Goodwin1deef6d2009-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