summaryrefslogtreecommitdiff
path: root/test/CodeGen/PowerPC/vsx-elementary-arith.ll
diff options
context:
space:
mode:
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>2015-07-05 06:03:51 +0000
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>2015-07-05 06:03:51 +0000
commit8be316bf232d03f387df9093fb71fa1d6d392a88 (patch)
tree4febe56f787b329e0f1dcd094e2969e2f6d0be24 /test/CodeGen/PowerPC/vsx-elementary-arith.ll
parent8720b26a581595b9061457d7440dea613ac849aa (diff)
Add missing builtins to the PPC back end for ABI compliance (vol. 2)
This patch corresponds to review: http://reviews.llvm.org/D10874 Back end portion of the second round of additions to altivec.h. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241398 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PowerPC/vsx-elementary-arith.ll')
-rw-r--r--test/CodeGen/PowerPC/vsx-elementary-arith.ll31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/vsx-elementary-arith.ll b/test/CodeGen/PowerPC/vsx-elementary-arith.ll
index d8f76bb989e..5416f667aef 100644
--- a/test/CodeGen/PowerPC/vsx-elementary-arith.ll
+++ b/test/CodeGen/PowerPC/vsx-elementary-arith.ll
@@ -116,5 +116,36 @@ entry:
; CHECK: xssqrtdp {{[0-9]+}}
}
+; Vector forms
+; Function Attrs: nounwind
+define <4 x float> @emit_xvrsqrtesp() {
+entry:
+; CHECK-LABEL: @emit_xvrsqrtesp
+ %vf = alloca <4 x float>, align 16
+ %vfr = alloca <4 x float>, align 16
+ %0 = load <4 x float>, <4 x float>* %vf, align 16
+ %call = call <4 x float> @llvm.ppc.vsx.xvrsqrtesp(<4 x float> %0)
+; CHECK: xvrsqrtesp {{[0-9]+}}, {{[0-9]+}}
+ ret <4 x float> %call
+}
+
+; Function Attrs: nounwind
+define <2 x double> @emit_xvrsqrtedp() {
+entry:
+; CHECK-LABEL: @emit_xvrsqrtedp
+ %vd = alloca <2 x double>, align 16
+ %vdr = alloca <2 x double>, align 16
+ %0 = load <2 x double>, <2 x double>* %vd, align 16
+ %call = call <2 x double> @llvm.ppc.vsx.xvrsqrtedp(<2 x double> %0)
+ ret <2 x double> %call
+; CHECK: xvrsqrtedp {{[0-9]+}}, {{[0-9]+}}
+}
+
; Function Attrs: nounwind
declare double @sqrt(double)
+
+; Function Attrs: nounwind readnone
+declare <4 x float> @llvm.ppc.vsx.xvrsqrtesp(<4 x float>)
+
+; Function Attrs: nounwind readnone
+declare <2 x double> @llvm.ppc.vsx.xvrsqrtedp(<2 x double>)