summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/avx-vshufp.ll
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2011-12-31 23:24:49 +0000
committerCraig Topper <craig.topper@gmail.com>2011-12-31 23:24:49 +0000
commit3ee6d22c7820353f0b545fc7eb6721c1c7208960 (patch)
treea461ed15486db5e716ef53465b71e276d5aa5782 /test/CodeGen/X86/avx-vshufp.ll
parente00805d52fd918a370fde8f87434ab1be4eadfcd (diff)
downloadllvm-3ee6d22c7820353f0b545fc7eb6721c1c7208960.tar.gz
llvm-3ee6d22c7820353f0b545fc7eb6721c1c7208960.tar.bz2
llvm-3ee6d22c7820353f0b545fc7eb6721c1c7208960.tar.xz
Add patterns for integer forms of SHUFPD/VSHUFPD with a memory load.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147393 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/avx-vshufp.ll')
-rw-r--r--test/CodeGen/X86/avx-vshufp.ll64
1 files changed, 64 insertions, 0 deletions
diff --git a/test/CodeGen/X86/avx-vshufp.ll b/test/CodeGen/X86/avx-vshufp.ll
index a60d8c25dc..45883b7173 100644
--- a/test/CodeGen/X86/avx-vshufp.ll
+++ b/test/CodeGen/X86/avx-vshufp.ll
@@ -16,6 +16,22 @@ entry:
ret <8 x float> %shuffle
}
+; CHECK: vshufps $-53, %ymm
+define <8 x i32> @A3(<8 x i32> %a, <8 x i32> %b) nounwind uwtable readnone ssp {
+entry:
+ %shuffle = shufflevector <8 x i32> %a, <8 x i32> %b, <8 x i32> <i32 3, i32 2, i32 8, i32 11, i32 7, i32 6, i32 12, i32 15>
+ ret <8 x i32> %shuffle
+}
+
+; CHECK: vshufps $-53, (%{{.*}}), %ymm
+define <8 x i32> @A4(<8 x i32>* %a, <8 x i32>* %b) nounwind uwtable readnone ssp {
+entry:
+ %a2 = load <8 x i32>* %a
+ %b2 = load <8 x i32>* %b
+ %shuffle = shufflevector <8 x i32> %a2, <8 x i32> %b2, <8 x i32> <i32 3, i32 2, i32 8, i32 11, i32 7, i32 6, i32 12, i32 15>
+ ret <8 x i32> %shuffle
+}
+
; CHECK: vshufpd $10, %ymm
define <4 x double> @B(<4 x double> %a, <4 x double> %b) nounwind uwtable readnone ssp {
entry:
@@ -32,6 +48,22 @@ entry:
ret <4 x double> %shuffle
}
+; CHECK: vshufpd $10, %ymm
+define <4 x i64> @B3(<4 x i64> %a, <4 x i64> %b) nounwind uwtable readnone ssp {
+entry:
+ %shuffle = shufflevector <4 x i64> %a, <4 x i64> %b, <4 x i32> <i32 0, i32 5, i32 2, i32 7>
+ ret <4 x i64> %shuffle
+}
+
+; CHECK: vshufpd $10, (%{{.*}}), %ymm
+define <4 x i64> @B4(<4 x i64>* %a, <4 x i64>* %b) nounwind uwtable readnone ssp {
+entry:
+ %a2 = load <4 x i64>* %a
+ %b2 = load <4 x i64>* %b
+ %shuffle = shufflevector <4 x i64> %a2, <4 x i64> %b2, <4 x i32> <i32 0, i32 5, i32 2, i32 7>
+ ret <4 x i64> %shuffle
+}
+
; CHECK: vshufps $-53, %ymm
define <8 x float> @C(<8 x float> %a, <8 x float> %b) nounwind uwtable readnone ssp {
entry:
@@ -76,6 +108,22 @@ entry:
ret <4 x float> %shuffle
}
+; CHECK: vshufps $-53, %xmm
+define <4 x i32> @A3128(<4 x i32> %a, <4 x i32> %b) nounwind uwtable readnone ssp {
+entry:
+ %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 3, i32 2, i32 4, i32 7>
+ ret <4 x i32> %shuffle
+}
+
+; CHECK: vshufps $-53, (%{{.*}}), %xmm
+define <4 x i32> @A4128(<4 x i32>* %a, <4 x i32>* %b) nounwind uwtable readnone ssp {
+entry:
+ %a2 = load <4 x i32>* %a
+ %b2 = load <4 x i32>* %b
+ %shuffle = shufflevector <4 x i32> %a2, <4 x i32> %b2, <4 x i32> <i32 3, i32 2, i32 4, i32 7>
+ ret <4 x i32> %shuffle
+}
+
; CHECK: vshufpd $1, %xmm
define <2 x double> @B128(<2 x double> %a, <2 x double> %b) nounwind uwtable readnone ssp {
entry:
@@ -91,3 +139,19 @@ entry:
%shuffle = shufflevector <2 x double> %a2, <2 x double> %b2, <2 x i32> <i32 1, i32 2>
ret <2 x double> %shuffle
}
+
+; CHECK: vshufpd $1, %xmm
+define <2 x i64> @B3128(<2 x i64> %a, <2 x i64> %b) nounwind uwtable readnone ssp {
+entry:
+ %shuffle = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> <i32 1, i32 2>
+ ret <2 x i64> %shuffle
+}
+
+; CHECK: vshufpd $1, (%{{.*}}), %xmm
+define <2 x i64> @B4128(<2 x i64>* %a, <2 x i64>* %b) nounwind uwtable readnone ssp {
+entry:
+ %a2 = load <2 x i64>* %a
+ %b2 = load <2 x i64>* %b
+ %shuffle = shufflevector <2 x i64> %a2, <2 x i64> %b2, <2 x i32> <i32 1, i32 2>
+ ret <2 x i64> %shuffle
+}