aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2012-01-30 07:50:31 +0000
committerCraig Topper <craig.topper@gmail.com>2012-01-30 07:50:31 +0000
commitcc30006391ef3dac5240b8b2197a7129440f34ad (patch)
tree0ae143c75eab3155f51ca45837c32ddc26af031d /test
parent41b9920a1332eeeeda0ed03218d9efad641f5adf (diff)
downloadexternal_llvm-cc30006391ef3dac5240b8b2197a7129440f34ad.zip
external_llvm-cc30006391ef3dac5240b8b2197a7129440f34ad.tar.gz
external_llvm-cc30006391ef3dac5240b8b2197a7129440f34ad.tar.bz2
Fix pattern for memory form of PSHUFD for use with FP vectors to remove bitcast to an integer vector that normal code wouldn't have. Also remove bitcasts from code that turns splat vector loads into a shuffle as it was making the broken pattern necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149232 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/X86/avx-shuffle.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGen/X86/avx-shuffle.ll b/test/CodeGen/X86/avx-shuffle.ll
index ee038ce..08b668c 100644
--- a/test/CodeGen/X86/avx-shuffle.ll
+++ b/test/CodeGen/X86/avx-shuffle.ll
@@ -96,3 +96,16 @@ define i32 @test10(<4 x i32> %a) nounwind {
%r = extractelement <8 x i32> %b, i32 2
ret i32 %r
}
+
+define <4 x float> @test11(<4 x float> %a) nounwind {
+; CHECK: pshufd $27
+ %tmp1 = shufflevector <4 x float> %a, <4 x float> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
+ ret <4 x float> %tmp1
+}
+
+define <4 x float> @test12(<4 x float>* %a) nounwind {
+; CHECK: pshufd $27, (
+ %tmp0 = load <4 x float>* %a
+ %tmp1 = shufflevector <4 x float> %tmp0, <4 x float> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
+ ret <4 x float> %tmp1
+}