summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2012-04-10 21:40:28 +0000
committerEvan Cheng <evan.cheng@apple.com>2012-04-10 21:40:28 +0000
commit3aef2ff514c879f98571fb91ddbe1142466a6266 (patch)
tree91b2d29d1a572c60661d2d8b02c79f7cedf852d0 /test
parent507bb7a42fce6502f90268712cbc32158c17bb59 (diff)
downloadllvm-3aef2ff514c879f98571fb91ddbe1142466a6266.tar.gz
llvm-3aef2ff514c879f98571fb91ddbe1142466a6266.tar.bz2
llvm-3aef2ff514c879f98571fb91ddbe1142466a6266.tar.xz
Handle llvm.fma.* intrinsics. rdar://10914096
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154439 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/ARM/fma.ll30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/fma.ll b/test/CodeGen/ARM/fma.ll
new file mode 100644
index 0000000000..ff8aa34e52
--- /dev/null
+++ b/test/CodeGen/ARM/fma.ll
@@ -0,0 +1,30 @@
+; RUN: llc < %s -mtriple=thumbv7-apple-ios -mattr=+vfp4 | FileCheck %s
+
+define float @test_f32(float %a, float %b, float %c) nounwind readnone ssp {
+entry:
+; CHECK: test_f32
+; CHECK: vfma.f32
+ %call = tail call float @llvm.fma.f32(float %a, float %b, float %c) nounwind readnone
+ ret float %call
+}
+
+define double @test_f64(double %a, double %b, double %c) nounwind readnone ssp {
+entry:
+; CHECK: test_f64
+; CHECK: vfma.f64
+ %call = tail call double @llvm.fma.f64(double %a, double %b, double %c) nounwind readnone
+ ret double %call
+}
+
+define <2 x float> @test_v2f32(<2 x float> %a, <2 x float> %b, <2 x float> %c) nounwind readnone ssp {
+entry:
+; CHECK: test_v2f32
+; CHECK: vfma.f32
+ %0 = tail call <2 x float> @llvm.fma.v2f32(<2 x float> %a, <2 x float> %b, <2 x float> %c) nounwind
+ ret <2 x float> %0
+}
+
+declare float @llvm.fma.f32(float, float, float) nounwind readnone
+declare double @llvm.fma.f64(double, double, double) nounwind readnone
+
+declare <2 x float> @llvm.fma.v2f32(<2 x float>, <2 x float>, <2 x float>) nounwind readnone