diff options
-rw-r--r-- | lib/Target/X86/X86InstrSSE.td | 7 | ||||
-rw-r--r-- | test/CodeGen/X86/2011-12-08-AVXISelBugs.ll | 9 |
2 files changed, 15 insertions, 1 deletions
diff --git a/lib/Target/X86/X86InstrSSE.td b/lib/Target/X86/X86InstrSSE.td index 345f6064ae..756757c62c 100644 --- a/lib/Target/X86/X86InstrSSE.td +++ b/lib/Target/X86/X86InstrSSE.td @@ -628,7 +628,12 @@ let Predicates = [HasAVX] in { (VMOVSDrr (v2f64 (V_SET0)), (EXTRACT_SUBREG (v4f64 VR256:$src), sub_sd)), sub_xmm)>; - // Extract and store. + def : Pat<(v4i64 (X86vzmovl (v4i64 VR256:$src))), + (SUBREG_TO_REG (i32 0), + (VMOVSDrr (v2i64 (V_SET0)), + (EXTRACT_SUBREG (v4i64 VR256:$src), sub_sd)), sub_xmm)>; + +// Extract and store. def : Pat<(store (f32 (vector_extract (v4f32 VR128:$src), (iPTR 0))), addr:$dst), (VMOVSSmr addr:$dst, diff --git a/test/CodeGen/X86/2011-12-08-AVXISelBugs.ll b/test/CodeGen/X86/2011-12-08-AVXISelBugs.ll index d9781027ae..1561784dee 100644 --- a/test/CodeGen/X86/2011-12-08-AVXISelBugs.ll +++ b/test/CodeGen/X86/2011-12-08-AVXISelBugs.ll @@ -69,3 +69,12 @@ entry: %2 = insertelement <3 x i64> <i64 undef, i64 0, i64 0>, i64 %1, i32 0 ret <3 x i64> %2 } + +define void @t5() nounwind { +entry: + %0 = shufflevector <2 x i64> zeroinitializer, <2 x i64> undef, <8 x i32> <i32 0, i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef> + %1 = shufflevector <8 x i64> <i64 0, i64 0, i64 0, i64 undef, i64 undef, i64 0, i64 0, i64 0>, <8 x i64> %0, <8 x i32> <i32 0, i32 1, i32 2, i32 9, i32 8, i32 5, i32 6, i32 7> + store <8 x i64> %1, <8 x i64> addrspace(1)* undef, align 64 + + ret void +} |