We already had the pattern for just the scalar to vector and bitcast,
but not the case where we wanted zeroes in the high half of the xmm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368972
91177308-0d34-0410-b5e6-
96231b3b80d8
def : Pat<(x86mmx (MMX_X86movdq2q (v2i64 (nonvolatile_load addr:$src)))),
(x86mmx (MMX_MOVQ64rm addr:$src))>;
+def : Pat<(v2i64 (X86vzmovl (scalar_to_vector
+ (i64 (bitconvert (x86mmx VR64:$src)))))),
+ (MMX_MOVQ2DQrr VR64:$src)>;
+
// Misc.
let SchedRW = [SchedWriteShuffle.MMX] in {
let Uses = [EDI], Predicates = [HasMMX, HasSSE1,Not64BitMode] in
; X64: # %bb.0:
; X64-NEXT: movq (%rdi), %mm0
; X64-NEXT: paddd %mm0, %mm0
-; X64-NEXT: movq %mm0, %rax
-; X64-NEXT: movq %rax, %xmm0
+; X64-NEXT: movq2dq %mm0, %xmm0
; X64-NEXT: cvtdq2ps %xmm0, %xmm0
; X64-NEXT: retq
%2 = bitcast <1 x i64>* %0 to x86_mmx*