summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/PowerPC
diff options
context:
space:
mode:
authorSean Fertile <sfertile@ca.ibm.com>2016-12-09 17:21:42 +0000
committerSean Fertile <sfertile@ca.ibm.com>2016-12-09 17:21:42 +0000
commit1c4109b4c236de94e38c45189baf383e66de5b81 (patch)
treef571b1709f774592af5838c6721f7d44a2d7b2c2 /llvm/test/CodeGen/PowerPC
parentbedb5d906c097ba8117a1b3232f527ae1acffe37 (diff)
downloadbcm5719-llvm-1c4109b4c236de94e38c45189baf383e66de5b81.tar.gz
bcm5719-llvm-1c4109b4c236de94e38c45189baf383e66de5b81.zip
[PPC] Add intrinsics for vector extract word and vector insert word.
Revision: https://reviews.llvm.org/D26547 llvm-svn: 289227
Diffstat (limited to 'llvm/test/CodeGen/PowerPC')
-rw-r--r--llvm/test/CodeGen/PowerPC/p9-xxinsertw-xxextractuw.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/PowerPC/p9-xxinsertw-xxextractuw.ll b/llvm/test/CodeGen/PowerPC/p9-xxinsertw-xxextractuw.ll
index 8b4a76757c3..e3326595d13 100644
--- a/llvm/test/CodeGen/PowerPC/p9-xxinsertw-xxextractuw.ll
+++ b/llvm/test/CodeGen/PowerPC/p9-xxinsertw-xxextractuw.ll
@@ -990,3 +990,21 @@ entry:
%vecins = insertelement <4 x i32> %a, i32 %i, i32 %el
ret <4 x i32> %vecins
}
+define <4 x i32> @intrinsicInsertTest(<4 x i32> %a, <2 x i64> %b) {
+entry:
+; CHECK-LABEL:intrinsicInsertTest
+; CHECK: xxinsertw 34, 35, 3
+; CHECK: blr
+ %ans = tail call <4 x i32> @llvm.ppc.vsx.xxinsertw(<4 x i32> %a, <2 x i64> %b, i32 3)
+ ret <4 x i32> %ans
+}
+declare <4 x i32> @llvm.ppc.vsx.xxinsertw(<4 x i32>, <2 x i64>, i32)
+define <2 x i64> @intrinsicExtractTest(<2 x i64> %a) {
+entry:
+; CHECK-LABEL: intrinsicExtractTest
+; CHECK: xxextractuw 0, 34, 5
+; CHECK: blr
+ %ans = tail call <2 x i64> @llvm.ppc.vsx.xxextractuw(<2 x i64> %a, i32 5)
+ ret <2 x i64> %ans
+}
+declare <2 x i64> @llvm.ppc.vsx.xxextractuw(<2 x i64>, i32)
OpenPOWER on IntegriCloud