blob: a48e75a26824d791c85ea5f58b0f07f8791a9b65 [file] [log] [blame]
David Goodwin49801872009-08-10 23:06:57 +00001; RUN: llvm-as < %s | llc -march=arm -mattr=+vfp2 | FileCheck %s
2; RUN: llvm-as < %s | llc -march=arm -mattr=+neon,+neonfp | FileCheck %s
3; RUN: llvm-as < %s | llc -march=arm -mattr=+neon,-neonfp | FileCheck %s
4; RUN: llvm-as < %s | llc -march=arm -mcpu=cortex-a8 | FileCheck %s
5; RUN: llvm-as < %s | llc -march=arm -mcpu=cortex-a9 | FileCheck %s
David Goodwin42a83f22009-08-04 17:53:06 +00006
Dan Gohman5743a3f2009-08-10 16:48:40 +00007define float @test1(float %acc, float %a, float %b) nounwind {
David Goodwin49801872009-08-10 23:06:57 +00008; CHECK: fnmscs s2, s1, s0
David Goodwin42a83f22009-08-04 17:53:06 +00009entry:
10 %0 = fmul float %a, %b
David Goodwinaeb66fe2009-08-10 22:31:04 +000011 %1 = fsub float -0.0, %0
David Goodwin42a83f22009-08-04 17:53:06 +000012 %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 Goodwin49801872009-08-10 23:06:57 +000017; CHECK: fnmscs s2, s1, s0
David Goodwin831b5002009-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