aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2011-12-15 22:11:31 +0000
committerChad Rosier <mcrosier@apple.com>2011-12-15 22:11:31 +0000
commitc8dd20170e312ad644b6f8aedc5293d3362d91c1 (patch)
tree82f361716450b93eb64a84d13253fab03890f02c
parent7bcfc9950bac0f411f9671e8d6ce483bd219727e (diff)
downloadexternal_llvm-c8dd20170e312ad644b6f8aedc5293d3362d91c1.zip
external_llvm-c8dd20170e312ad644b6f8aedc5293d3362d91c1.tar.gz
external_llvm-c8dd20170e312ad644b6f8aedc5293d3362d91c1.tar.bz2
Add missing zmovl AVX patterns which were causing crashes.
Patch by Elena Demikhovsky <elena.demikhovsky@intel.com>! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146689 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86InstrSSE.td6
-rw-r--r--test/CodeGen/X86/2011-12-08-AVXISelBugs.ll8
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/Target/X86/X86InstrSSE.td b/lib/Target/X86/X86InstrSSE.td
index 24e7ee4..8c16fe5 100644
--- a/lib/Target/X86/X86InstrSSE.td
+++ b/lib/Target/X86/X86InstrSSE.td
@@ -618,6 +618,9 @@ let Predicates = [HasAVX] in {
(SUBREG_TO_REG (i64 0),
(v2f64 (VMOVSDrr (v2f64 (V_SET0)), FR64:$src)),
sub_xmm)>;
+ def : Pat<(v4i64 (X86vzmovl (insert_subvector undef,
+ (v2i64 (scalar_to_vector (loadi64 addr:$src))), (i32 0)))),
+ (SUBREG_TO_REG (i64 0), (VMOVSDrm addr:$src), sub_sd)>;
// Move low f64 and clear high bits.
def : Pat<(v4f64 (X86vzmovl (v4f64 VR256:$src))),
@@ -800,6 +803,9 @@ let Predicates = [HasAVX] in {
def : Pat<(v8i32 (X86vzmovl
(insert_subvector undef, (v4i32 VR128:$src), (i32 0)))),
(SUBREG_TO_REG (i32 0), (VMOVAPSrr VR128:$src), sub_xmm)>;
+def : Pat<(v4i64 (X86vzmovl
+ (insert_subvector undef, (v2i64 VR128:$src), (i32 0)))),
+ (SUBREG_TO_REG (i32 0), (VMOVAPSrr VR128:$src), sub_xmm)>;
def : Pat<(v8f32 (X86vzmovl
(insert_subvector undef, (v4f32 VR128:$src), (i32 0)))),
(SUBREG_TO_REG (i32 0), (VMOVAPSrr VR128:$src), sub_xmm)>;
diff --git a/test/CodeGen/X86/2011-12-08-AVXISelBugs.ll b/test/CodeGen/X86/2011-12-08-AVXISelBugs.ll
index 26670c1..d978102 100644
--- a/test/CodeGen/X86/2011-12-08-AVXISelBugs.ll
+++ b/test/CodeGen/X86/2011-12-08-AVXISelBugs.ll
@@ -61,3 +61,11 @@ t2.exit: ; preds = %0, %loop
return: ; preds = %loop.cond
ret void
}
+
+define <3 x i64> @t4() nounwind {
+entry:
+ %0 = load <2 x i64> addrspace(1)* undef, align 16
+ %1 = extractelement <2 x i64> %0, i32 0
+ %2 = insertelement <3 x i64> <i64 undef, i64 0, i64 0>, i64 %1, i32 0
+ ret <3 x i64> %2
+}