summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/2012-05-19-avx2-store.ll
diff options
context:
space:
mode:
authorNadav Rotem <nadav.rotem@intel.com>2012-05-19 20:30:08 +0000
committerNadav Rotem <nadav.rotem@intel.com>2012-05-19 20:30:08 +0000
commit87d35e8c715f5116b072ef8fd742c0cfb6fb5ce4 (patch)
treee87b7d6b3b1ae7bd578bc3912652633bd1775590 /test/CodeGen/X86/2012-05-19-avx2-store.ll
parent4fc8a5de44c2fc3ce82d5467bd96dfe25aa3a0e9 (diff)
downloadllvm-87d35e8c715f5116b072ef8fd742c0cfb6fb5ce4.tar.gz
llvm-87d35e8c715f5116b072ef8fd742c0cfb6fb5ce4.tar.bz2
llvm-87d35e8c715f5116b072ef8fd742c0cfb6fb5ce4.tar.xz
On Haswell, perfer storing YMM registers using a single instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157129 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/2012-05-19-avx2-store.ll')
-rw-r--r--test/CodeGen/X86/2012-05-19-avx2-store.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/X86/2012-05-19-avx2-store.ll b/test/CodeGen/X86/2012-05-19-avx2-store.ll
new file mode 100644
index 0000000000..61fef90139
--- /dev/null
+++ b/test/CodeGen/X86/2012-05-19-avx2-store.ll
@@ -0,0 +1,14 @@
+; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx2 | FileCheck %s
+
+define void @double_save(<4 x i32>* %Ap, <4 x i32>* %Bp, <8 x i32>* %P) nounwind ssp {
+entry:
+ ; CHECK: vmovaps
+ ; CHECK: vmovaps
+ ; CHECK: vinsertf128
+ ; CHECK: vmovups
+ %A = load <4 x i32>* %Ap
+ %B = load <4 x i32>* %Bp
+ %Z = shufflevector <4 x i32>%A, <4 x i32>%B, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
+ store <8 x i32> %Z, <8 x i32>* %P, align 16
+ ret void
+}