summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/vec_shuffle-38.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-08-31 02:05:24 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-08-31 02:05:24 +0000
commit0899f5c62dc63d199185a2d09e434d992975e700 (patch)
tree2f96b83bd5f5de106a95aaad769ebb56eccdd98f /test/CodeGen/X86/vec_shuffle-38.ll
parent3d93861c23b1bafa8ae609de94edd5740ffbf6b9 (diff)
downloadllvm-0899f5c62dc63d199185a2d09e434d992975e700.tar.gz
llvm-0899f5c62dc63d199185a2d09e434d992975e700.tar.bz2
llvm-0899f5c62dc63d199185a2d09e434d992975e700.tar.xz
Fix (movhps load) lowering / pattern to match more cases. rdar://10050549
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138848 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/vec_shuffle-38.ll')
-rw-r--r--test/CodeGen/X86/vec_shuffle-38.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGen/X86/vec_shuffle-38.ll b/test/CodeGen/X86/vec_shuffle-38.ll
index fe83cd44ea..978f59eec7 100644
--- a/test/CodeGen/X86/vec_shuffle-38.ll
+++ b/test/CodeGen/X86/vec_shuffle-38.ll
@@ -24,3 +24,22 @@ define <2 x i64> @hdi(<2 x i64> %p) nounwind optsize ssp {
ret <2 x i64> %shuffle
}
+; rdar://10050549
+%struct.Float2 = type { float, float }
+
+define <4 x float> @loadhpi(%struct.Float2* %vPtr, <4 x float> %vecin1) nounwind readonly ssp {
+entry:
+; CHECK: loadhpi
+; CHECK-NOT: movq
+; CHECK: movhps (
+ %tmp1 = bitcast %struct.Float2* %vPtr to <1 x i64>*
+ %addptr7 = getelementptr inbounds <1 x i64>* %tmp1, i64 0
+ %tmp2 = bitcast <1 x i64>* %addptr7 to float*
+ %tmp3 = load float* %tmp2, align 4
+ %vec = insertelement <4 x float> undef, float %tmp3, i32 0
+ %addptr.i12 = getelementptr inbounds float* %tmp2, i64 1
+ %tmp4 = load float* %addptr.i12, align 4
+ %vecin2 = insertelement <4 x float> %vec, float %tmp4, i32 1
+ %shuffle = shufflevector <4 x float> %vecin1, <4 x float> %vecin2, <4 x i32> <i32 0, i32 1, i32 4, i32 5>
+ ret <4 x float> %shuffle
+}