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