From: Craig Topper Date: Tue, 17 Jul 2018 16:24:33 +0000 (+0000) Subject: [X86] Remove some standalone patterns in favor of the patterns in the MOVLPD instruct... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e40f77a66b72358e1679c953723fbf443fba69ac;p=llvm [X86] Remove some standalone patterns in favor of the patterns in the MOVLPD instruction definitions. Previously we passed 'null_frag' into the instruction definition. The multiclass is shared with MOVHPD which doesn't use null_frag. It turns out by passing X86Movsd it produces patterns equivalent to some standalone patterns. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337299 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86InstrAVX512.td b/lib/Target/X86/X86InstrAVX512.td index b90cc5ac045..3a1f840139e 100644 --- a/lib/Target/X86/X86InstrAVX512.td +++ b/lib/Target/X86/X86InstrAVX512.td @@ -6458,7 +6458,7 @@ defm VMOVHPDZ128 : avx512_mov_hilo_packed<0x16, "vmovhpd", X86Unpckl, v2f64x_info>, EVEX_CD8<64, CD8VT1>, PD, VEX_W; defm VMOVLPSZ128 : avx512_mov_hilo_packed<0x12, "vmovlps", null_frag, v4f32x_info>, EVEX_CD8<32, CD8VT2>, PS; -defm VMOVLPDZ128 : avx512_mov_hilo_packed<0x12, "vmovlpd", null_frag, +defm VMOVLPDZ128 : avx512_mov_hilo_packed<0x12, "vmovlpd", X86Movsd, v2f64x_info>, EVEX_CD8<64, CD8VT1>, PD, VEX_W; let Predicates = [HasAVX512] in { @@ -6473,10 +6473,6 @@ let Predicates = [HasAVX512] in { def : Pat<(v2f64 (X86Unpckl VR128X:$src1, (bc_v2f64 (v2i64 (scalar_to_vector (loadi64 addr:$src2)))))), (VMOVHPDZ128rm VR128X:$src1, addr:$src2)>; - // VMOVLPD patterns - def : Pat<(v2f64 (X86Movsd VR128X:$src1, - (v2f64 (scalar_to_vector (loadf64 addr:$src2))))), - (VMOVLPDZ128rm VR128X:$src1, addr:$src2)>; } let SchedRW = [WriteFStore] in { diff --git a/lib/Target/X86/X86InstrSSE.td b/lib/Target/X86/X86InstrSSE.td index 89b47ef3cc2..448be0eda0e 100644 --- a/lib/Target/X86/X86InstrSSE.td +++ b/lib/Target/X86/X86InstrSSE.td @@ -695,7 +695,7 @@ multiclass sse12_mov_hilo_packedopc, SDPatternOperator psnode, "\t{$src2, $dst|$dst, $src2}">; } -defm MOVL : sse12_mov_hilo_packed<0x12, null_frag, null_frag, "movlp">; +defm MOVL : sse12_mov_hilo_packed<0x12, null_frag, X86Movsd, "movlp">; let SchedRW = [WriteFStore] in { let Predicates = [UseAVX] in { @@ -720,13 +720,6 @@ def MOVLPDmr : PDI<0x13, MRMDestMem, (outs), (ins f64mem:$dst, VR128:$src), (iPTR 0))), addr:$dst)]>; } // SchedRW -let Predicates = [UseAVX] in { - // Shuffle with VMOVLPD - def : Pat<(v2f64 (X86Movsd VR128:$src1, - (v2f64 (scalar_to_vector (loadf64 addr:$src2))))), - (VMOVLPDrm VR128:$src1, addr:$src2)>; -} - let Predicates = [UseSSE1] in { // (store (vector_shuffle (load addr), v2, <4, 5, 2, 3>), addr) using MOVLPS def : Pat<(store (i64 (extractelt (bc_v2i64 (v4f32 VR128:$src2)), @@ -734,13 +727,6 @@ let Predicates = [UseSSE1] in { (MOVLPSmr addr:$src1, VR128:$src2)>; } -let Predicates = [UseSSE2] in { - // Shuffle with MOVLPD - def : Pat<(v2f64 (X86Movsd VR128:$src1, - (v2f64 (scalar_to_vector (loadf64 addr:$src2))))), - (MOVLPDrm VR128:$src1, addr:$src2)>; -} - //===----------------------------------------------------------------------===// // SSE 1 & 2 - Move Hi packed FP Instructions //===----------------------------------------------------------------------===//