forked from OSchip/llvm-project
[X86] Add MOVHPDrm/MOVLPDrm patterns that use VZEXT_LOAD.
We already had patterns that used scalar_to_vector+load. But we can also have a vzload. Found while investigating combining scalar_to_vector+load to vzload. llvm-svn: 364726
This commit is contained in:
parent
fb133b0aab
commit
d1728f8987
|
@ -6349,6 +6349,12 @@ let Predicates = [HasAVX512] in {
|
|||
def : Pat<(v2f64 (X86Unpckl VR128X:$src1,
|
||||
(bc_v2f64 (v2i64 (scalar_to_vector (loadi64 addr:$src2)))))),
|
||||
(VMOVHPDZ128rm VR128X:$src1, addr:$src2)>;
|
||||
def : Pat<(v2f64 (X86Unpckl VR128X:$src1, (X86vzload addr:$src2))),
|
||||
(VMOVHPDZ128rm VR128X:$src1, addr:$src2)>;
|
||||
|
||||
// VMOVLPD patterns
|
||||
def : Pat<(v2f64 (X86Movsd VR128X:$src1, (X86vzload addr:$src2))),
|
||||
(VMOVLPDZ128rm VR128X:$src1, addr:$src2)>;
|
||||
}
|
||||
|
||||
let SchedRW = [WriteFStore] in {
|
||||
|
|
|
@ -699,11 +699,17 @@ let Predicates = [UseAVX] in {
|
|||
def : Pat<(v2f64 (X86Unpckl VR128:$src1,
|
||||
(bc_v2f64 (v2i64 (scalar_to_vector (loadi64 addr:$src2)))))),
|
||||
(VMOVHPDrm VR128:$src1, addr:$src2)>;
|
||||
def : Pat<(v2f64 (X86Unpckl VR128:$src1, (X86vzload addr:$src2))),
|
||||
(VMOVHPDrm VR128:$src1, addr:$src2)>;
|
||||
|
||||
def : Pat<(store (f64 (extractelt
|
||||
(v2f64 (X86VPermilpi VR128:$src, (i8 1))),
|
||||
(iPTR 0))), addr:$dst),
|
||||
(VMOVHPDmr addr:$dst, VR128:$src)>;
|
||||
|
||||
// MOVLPD patterns
|
||||
def : Pat<(v2f64 (X86Movsd VR128:$src1, (X86vzload addr:$src2))),
|
||||
(VMOVLPDrm VR128:$src1, addr:$src2)>;
|
||||
}
|
||||
|
||||
let Predicates = [UseSSE1] in {
|
||||
|
@ -722,11 +728,17 @@ let Predicates = [UseSSE2] in {
|
|||
def : Pat<(v2f64 (X86Unpckl VR128:$src1,
|
||||
(bc_v2f64 (v2i64 (scalar_to_vector (loadi64 addr:$src2)))))),
|
||||
(MOVHPDrm VR128:$src1, addr:$src2)>;
|
||||
def : Pat<(v2f64 (X86Unpckl VR128:$src1, (X86vzload addr:$src2))),
|
||||
(MOVHPDrm VR128:$src1, addr:$src2)>;
|
||||
|
||||
def : Pat<(store (f64 (extractelt
|
||||
(v2f64 (X86Shufp VR128:$src, VR128:$src, (i8 1))),
|
||||
(iPTR 0))), addr:$dst),
|
||||
(MOVHPDmr addr:$dst, VR128:$src)>;
|
||||
|
||||
// MOVLPD patterns
|
||||
def : Pat<(v2f64 (X86Movsd VR128:$src1, (X86vzload addr:$src2))),
|
||||
(MOVLPDrm VR128:$src1, addr:$src2)>;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
|
|
@ -1173,8 +1173,7 @@ define <4 x float> @merge_4f32_f32_2345_volatile(float* %ptr) nounwind uwtable n
|
|||
; SSE2-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
|
||||
; SSE2-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
|
||||
; SSE2-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
|
||||
; SSE2-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
|
||||
; SSE2-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm1[0]
|
||||
; SSE2-NEXT: movhpd {{.*#+}} xmm0 = xmm0[0],mem[0]
|
||||
; SSE2-NEXT: retq
|
||||
;
|
||||
; SSE41-LABEL: merge_4f32_f32_2345_volatile:
|
||||
|
|
Loading…
Reference in New Issue