aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/vec_shuffle-28.ll
diff options
context:
space:
mode:
authorMon P Wang <wangmp@apple.com>2008-12-23 04:05:08 +0000
committerMon P Wang <wangmp@apple.com>2008-12-23 04:05:08 +0000
commit2fe269def29c2ad21f2906f0a1baaffeaf20f900 (patch)
tree461e65c640315504c1192e2bcc9917b118c731dd /test/CodeGen/X86/vec_shuffle-28.ll
parent62c75ea397bdb3b4de7138a1d67311310da01f40 (diff)
downloadexternal_llvm-2fe269def29c2ad21f2906f0a1baaffeaf20f900.zip
external_llvm-2fe269def29c2ad21f2906f0a1baaffeaf20f900.tar.gz
external_llvm-2fe269def29c2ad21f2906f0a1baaffeaf20f900.tar.bz2
Added shuffle and splat test cases for r61365.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61366 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/vec_shuffle-28.ll')
-rw-r--r--test/CodeGen/X86/vec_shuffle-28.ll33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/CodeGen/X86/vec_shuffle-28.ll b/test/CodeGen/X86/vec_shuffle-28.ll
new file mode 100644
index 0000000..e73b824
--- /dev/null
+++ b/test/CodeGen/X86/vec_shuffle-28.ll
@@ -0,0 +1,33 @@
+; RUN: llvm-as < %s | llc -march=x86 -mattr=sse41 -o %t -f
+; RUN: grep punpcklwd %t | count 1
+; RUN: grep pextrw %t | count 8
+; RUN: grep pinsrw %t | count 8
+
+
+; Pack various elements via shuffles.
+define <8 x i16> @shuf1(<8 x i16> %T0, <8 x i16> %T1) nounwind readnone {
+entry:
+ %tmp7 = shufflevector <8 x i16> %T0, <8 x i16> %T1, <8 x i32> < i32 1, i32 8, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef , i32 undef >
+ ret <8 x i16> %tmp7
+}
+
+
+define <8 x i16> @shuf2(<8 x i16> %T0, <8 x i16> %T1) nounwind readnone {
+entry:
+ %tmp8 = shufflevector <8 x i16> %T0, <8 x i16> %T1, <8 x i32> < i32 undef, i32 undef, i32 7, i32 2, i32 8, i32 undef, i32 undef , i32 undef >
+ ret <8 x i16> %tmp8
+}
+
+
+define <8 x i16> @shuf3(<8 x i16> %T0, <8 x i16> %T1) nounwind readnone {
+entry:
+ %tmp9 = shufflevector <8 x i16> %T0, <8 x i16> %T1, <8 x i32> < i32 0, i32 1, i32 undef, i32 undef, i32 3, i32 11, i32 undef , i32 undef >
+ ret <8 x i16> %tmp9
+}
+
+
+define <8 x i16> @shuf4(<8 x i16> %T0, <8 x i16> %T1) nounwind readnone {
+entry:
+ %tmp9 = shufflevector <8 x i16> %T0, <8 x i16> %T1, <8 x i32> < i32 8, i32 9, i32 undef, i32 undef, i32 11, i32 3, i32 undef , i32 undef >
+ ret <8 x i16> %tmp9
+}