diff --git a/llvm/lib/Target/X86/X86InstrAVX512.td b/llvm/lib/Target/X86/X86InstrAVX512.td index 12709a4180ac..12716f2db34f 100644 --- a/llvm/lib/Target/X86/X86InstrAVX512.td +++ b/llvm/lib/Target/X86/X86InstrAVX512.td @@ -4291,12 +4291,8 @@ let Predicates = [HasAVX512] in { def : Pat<(v2f64 (X86Movlpd VR128X:$src1, VR128X:$src2)), (VMOVSDZrr VR128X:$src1, (COPY_TO_REGCLASS VR128X:$src2, FR64X))>; - def : Pat<(v2i64 (X86Movlpd VR128X:$src1, VR128X:$src2)), - (VMOVSDZrr VR128X:$src1, (COPY_TO_REGCLASS VR128X:$src2, FR64X))>; def : Pat<(v4f32 (X86Movlps VR128X:$src1, VR128X:$src2)), (VMOVSDZrr VR128X:$src1, (COPY_TO_REGCLASS VR128X:$src2, FR64X))>; - def : Pat<(v4i32 (X86Movlps VR128X:$src1, VR128X:$src2)), - (VMOVSDZrr VR128X:$src1, (COPY_TO_REGCLASS VR128X:$src2, FR64X))>; } let AddedComplexity = 15 in @@ -6116,13 +6112,9 @@ let Predicates = [HasAVX512] in { // VMOVLPS patterns def : Pat<(v4f32 (X86Movlps VR128X:$src1, (load addr:$src2))), (VMOVLPSZ128rm VR128X:$src1, addr:$src2)>; - def : Pat<(v4i32 (X86Movlps VR128X:$src1, (load addr:$src2))), - (VMOVLPSZ128rm VR128X:$src1, addr:$src2)>; // VMOVLPD patterns def : Pat<(v2f64 (X86Movlpd VR128X:$src1, (load addr:$src2))), (VMOVLPDZ128rm VR128X:$src1, addr:$src2)>; - def : Pat<(v2i64 (X86Movlpd VR128X:$src1, (load addr:$src2))), - (VMOVLPDZ128rm VR128X:$src1, addr:$src2)>; def : Pat<(v2f64 (X86Movsd VR128X:$src1, (v2f64 (scalar_to_vector (loadf64 addr:$src2))))), (VMOVLPDZ128rm VR128X:$src1, addr:$src2)>; @@ -6168,16 +6160,10 @@ let Predicates = [HasAVX512] in { def : Pat<(store (v4f32 (X86Movlps (load addr:$src1), VR128X:$src2)), addr:$src1), (VMOVLPSZ128mr addr:$src1, VR128X:$src2)>; - def : Pat<(store (v4i32 (X86Movlps - (bc_v4i32 (loadv2i64 addr:$src1)), VR128X:$src2)), addr:$src1), - (VMOVLPSZ128mr addr:$src1, VR128X:$src2)>; // VMOVLPD patterns def : Pat<(store (v2f64 (X86Movlpd (load addr:$src1), VR128X:$src2)), addr:$src1), (VMOVLPDZ128mr addr:$src1, VR128X:$src2)>; - def : Pat<(store (v2i64 (X86Movlpd (load addr:$src1), VR128X:$src2)), - addr:$src1), - (VMOVLPDZ128mr addr:$src1, VR128X:$src2)>; } //===----------------------------------------------------------------------===// // FMA - Fused Multiply Operations diff --git a/llvm/lib/Target/X86/X86InstrSSE.td b/llvm/lib/Target/X86/X86InstrSSE.td index 7e4671fbe793..f27c247bd4fc 100644 --- a/llvm/lib/Target/X86/X86InstrSSE.td +++ b/llvm/lib/Target/X86/X86InstrSSE.td @@ -940,14 +940,10 @@ let Predicates = [UseAVX] in { // Shuffle with VMOVLPS def : Pat<(v4f32 (X86Movlps VR128:$src1, (load addr:$src2))), (VMOVLPSrm VR128:$src1, addr:$src2)>; - def : Pat<(v4i32 (X86Movlps VR128:$src1, (load addr:$src2))), - (VMOVLPSrm VR128:$src1, addr:$src2)>; // Shuffle with VMOVLPD def : Pat<(v2f64 (X86Movlpd VR128:$src1, (load addr:$src2))), (VMOVLPDrm VR128:$src1, addr:$src2)>; - def : Pat<(v2i64 (X86Movlpd VR128:$src1, (load addr:$src2))), - (VMOVLPDrm VR128:$src1, addr:$src2)>; def : Pat<(v2f64 (X86Movsd VR128:$src1, (v2f64 (scalar_to_vector (loadf64 addr:$src2))))), (VMOVLPDrm VR128:$src1, addr:$src2)>; @@ -956,15 +952,9 @@ let Predicates = [UseAVX] in { def : Pat<(store (v4f32 (X86Movlps (load addr:$src1), VR128:$src2)), addr:$src1), (VMOVLPSmr addr:$src1, VR128:$src2)>; - def : Pat<(store (v4i32 (X86Movlps - (bc_v4i32 (loadv2i64 addr:$src1)), VR128:$src2)), addr:$src1), - (VMOVLPSmr addr:$src1, VR128:$src2)>; def : Pat<(store (v2f64 (X86Movlpd (load addr:$src1), VR128:$src2)), addr:$src1), (VMOVLPDmr addr:$src1, VR128:$src2)>; - def : Pat<(store (v2i64 (X86Movlpd (load addr:$src1), VR128:$src2)), - addr:$src1), - (VMOVLPDmr addr:$src1, VR128:$src2)>; } let Predicates = [UseSSE1] in { @@ -976,8 +966,6 @@ let Predicates = [UseSSE1] in { // Shuffle with MOVLPS def : Pat<(v4f32 (X86Movlps VR128:$src1, (load addr:$src2))), (MOVLPSrm VR128:$src1, addr:$src2)>; - def : Pat<(v4i32 (X86Movlps VR128:$src1, (load addr:$src2))), - (MOVLPSrm VR128:$src1, addr:$src2)>; def : Pat<(X86Movlps VR128:$src1, (bc_v4f32 (v2i64 (scalar_to_vector (loadi64 addr:$src2))))), (MOVLPSrm VR128:$src1, addr:$src2)>; @@ -986,18 +974,12 @@ let Predicates = [UseSSE1] in { def : Pat<(store (v4f32 (X86Movlps (load addr:$src1), VR128:$src2)), addr:$src1), (MOVLPSmr addr:$src1, VR128:$src2)>; - def : Pat<(store (v4i32 (X86Movlps - (bc_v4i32 (loadv2i64 addr:$src1)), VR128:$src2)), - addr:$src1), - (MOVLPSmr addr:$src1, VR128:$src2)>; } let Predicates = [UseSSE2] in { // Shuffle with MOVLPD def : Pat<(v2f64 (X86Movlpd VR128:$src1, (load addr:$src2))), (MOVLPDrm VR128:$src1, addr:$src2)>; - def : Pat<(v2i64 (X86Movlpd VR128:$src1, (load addr:$src2))), - (MOVLPDrm VR128:$src1, addr:$src2)>; def : Pat<(v2f64 (X86Movsd VR128:$src1, (v2f64 (scalar_to_vector (loadf64 addr:$src2))))), (MOVLPDrm VR128:$src1, addr:$src2)>; @@ -1006,9 +988,6 @@ let Predicates = [UseSSE2] in { def : Pat<(store (v2f64 (X86Movlpd (load addr:$src1), VR128:$src2)), addr:$src1), (MOVLPDmr addr:$src1, VR128:$src2)>; - def : Pat<(store (v2i64 (X86Movlpd (load addr:$src1), VR128:$src2)), - addr:$src1), - (MOVLPDmr addr:$src1, VR128:$src2)>; } //===----------------------------------------------------------------------===// @@ -1058,8 +1037,6 @@ let Predicates = [UseAVX] in { (bc_v4i32 (v2i64 (X86vzload addr:$src2)))), (VMOVHPSrm VR128:$src1, addr:$src2)>; - // VMOVHPD patterns - // FIXME: Instead of X86Unpckl, there should be a X86Movlhpd here, the problem // is during lowering, where it's not possible to recognize the load fold // cause it has two uses through a bitcast. One use disappears at isel time