summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/opt-shuff-tstore.ll
diff options
context:
space:
mode:
authortstellar <tstellar@91177308-0d34-0410-b5e6-96231b3b80d8>2012-09-18 19:40:39 +0000
committertstellar <tstellar@91177308-0d34-0410-b5e6-96231b3b80d8>2012-09-18 19:40:39 +0000
commit15d14cb83df480dd4aab6435873ca50254891a2d (patch)
treee5ef7d77a1e7703b625d5de82d50c26e4944cdc7 /test/CodeGen/X86/opt-shuff-tstore.ll
Create R600 Branch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/R600/@164161 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/opt-shuff-tstore.ll')
-rw-r--r--test/CodeGen/X86/opt-shuff-tstore.ll39
1 files changed, 39 insertions, 0 deletions
diff --git a/test/CodeGen/X86/opt-shuff-tstore.ll b/test/CodeGen/X86/opt-shuff-tstore.ll
new file mode 100644
index 00000000000..3e720844c43
--- /dev/null
+++ b/test/CodeGen/X86/opt-shuff-tstore.ll
@@ -0,0 +1,39 @@
+; RUN: llc -mcpu=corei7 -mtriple=x86_64-linux < %s -mattr=+sse2,+sse41 | FileCheck %s
+
+; CHECK: func_4_8
+; A single memory write
+; CHECK: movd
+; CHECK-NEXT: ret
+define void @func_4_8(<4 x i8> %param, <4 x i8>* %p) {
+ %r = add <4 x i8> %param, <i8 1, i8 2, i8 3, i8 4>
+ store <4 x i8> %r, <4 x i8>* %p
+ ret void
+}
+
+; CHECK: func_4_16
+; CHECK: movq
+; CHECK-NEXT: ret
+define void @func_4_16(<4 x i16> %param, <4 x i16>* %p) {
+ %r = add <4 x i16> %param, <i16 1, i16 2, i16 3, i16 4>
+ store <4 x i16> %r, <4 x i16>* %p
+ ret void
+}
+
+; CHECK: func_8_8
+; CHECK: movq
+; CHECK-NEXT: ret
+define void @func_8_8(<8 x i8> %param, <8 x i8>* %p) {
+ %r = add <8 x i8> %param, <i8 1, i8 2, i8 3, i8 4, i8 1, i8 2, i8 3, i8 4>
+ store <8 x i8> %r, <8 x i8>* %p
+ ret void
+}
+
+; CHECK: func_2_32
+; CHECK: movq
+; CHECK-NEXT: ret
+define void @func_2_32(<2 x i32> %param, <2 x i32>* %p) {
+ %r = add <2 x i32> %param, <i32 1, i32 2>
+ store <2 x i32> %r, <2 x i32>* %p
+ ret void
+}
+