summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/vec_splat-2.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-04-20 09:05:16 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-04-20 09:05:16 +0000
commit5328031c484e26a78c061607d7a59d301bf23b00 (patch)
tree230fc8f1065fcd02837e0930d28328378e517c73 /test/CodeGen/X86/vec_splat-2.ll
parent46d1d66009bfb4f43b2fd6399bc6b2ab1f379e93 (diff)
downloadllvm-5328031c484e26a78c061607d7a59d301bf23b00.tar.gz
llvm-5328031c484e26a78c061607d7a59d301bf23b00.tar.bz2
llvm-5328031c484e26a78c061607d7a59d301bf23b00.tar.xz
v16i8 splat with 2 punpcklbw and a single pshufd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27877 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/vec_splat-2.ll')
-rw-r--r--test/CodeGen/X86/vec_splat-2.ll26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/CodeGen/X86/vec_splat-2.ll b/test/CodeGen/X86/vec_splat-2.ll
new file mode 100644
index 0000000000..c1958fde2c
--- /dev/null
+++ b/test/CodeGen/X86/vec_splat-2.ll
@@ -0,0 +1,26 @@
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pshufd | wc -l | grep 1
+
+void %test(<2 x long>* %P, sbyte %x) {
+ %tmp = insertelement <16 x sbyte> zeroinitializer, sbyte %x, uint 0 ; <<16 x sbyte>> [#uses=1]
+ %tmp36 = insertelement <16 x sbyte> %tmp, sbyte %x, uint 1
+ %tmp38 = insertelement <16 x sbyte> %tmp36, sbyte %x, uint 2
+ %tmp40 = insertelement <16 x sbyte> %tmp38, sbyte %x, uint 3
+ %tmp42 = insertelement <16 x sbyte> %tmp40, sbyte %x, uint 4
+ %tmp44 = insertelement <16 x sbyte> %tmp42, sbyte %x, uint 5
+ %tmp46 = insertelement <16 x sbyte> %tmp44, sbyte %x, uint 6
+ %tmp48 = insertelement <16 x sbyte> %tmp46, sbyte %x, uint 7
+ %tmp50 = insertelement <16 x sbyte> %tmp48, sbyte %x, uint 8
+ %tmp52 = insertelement <16 x sbyte> %tmp50, sbyte %x, uint 9
+ %tmp54 = insertelement <16 x sbyte> %tmp52, sbyte %x, uint 10
+ %tmp56 = insertelement <16 x sbyte> %tmp54, sbyte %x, uint 11
+ %tmp58 = insertelement <16 x sbyte> %tmp56, sbyte %x, uint 12
+ %tmp60 = insertelement <16 x sbyte> %tmp58, sbyte %x, uint 13
+ %tmp62 = insertelement <16 x sbyte> %tmp60, sbyte %x, uint 14
+ %tmp64 = insertelement <16 x sbyte> %tmp62, sbyte %x, uint 15
+ %tmp68 = load <2 x long>* %P
+ %tmp71 = cast <2 x long> %tmp68 to <16 x sbyte>
+ %tmp73 = add <16 x sbyte> %tmp71, %tmp64
+ %tmp73 = cast <16 x sbyte> %tmp73 to <2 x long>
+ store <2 x long> %tmp73, <2 x long>* %P
+ ret void
+}