forked from OSchip/llvm-project
[X86][SSE] Fix load folding for (V)CVTDQ2PD
This only requires a 64-bit memory source, not the whole 128-bits. But the 128-bit case is still supported via X86InstrInfo::foldMemoryOperandImpl llvm-svn: 297523
This commit is contained in:
parent
9cc7e3561d
commit
128a10a41d
|
@ -2165,7 +2165,7 @@ let hasSideEffects = 0, mayLoad = 1 in
|
|||
def VCVTDQ2PDrm : S2SI<0xE6, MRMSrcMem, (outs VR128:$dst), (ins i64mem:$src),
|
||||
"vcvtdq2pd\t{$src, $dst|$dst, $src}",
|
||||
[(set VR128:$dst,
|
||||
(v2f64 (X86VSintToFP (bc_v4i32 (loadv2i64 addr:$src)))))]>,
|
||||
(v2f64 (X86VSintToFP (bc_v4i32 (v2i64 (X86vzload addr:$src))))))]>,
|
||||
VEX, Sched<[WriteCvtI2FLd]>, VEX_WIG;
|
||||
def VCVTDQ2PDrr : S2SI<0xE6, MRMSrcReg, (outs VR128:$dst), (ins VR128:$src),
|
||||
"vcvtdq2pd\t{$src, $dst|$dst, $src}",
|
||||
|
@ -2188,7 +2188,7 @@ let hasSideEffects = 0, mayLoad = 1 in
|
|||
def CVTDQ2PDrm : S2SI<0xE6, MRMSrcMem, (outs VR128:$dst), (ins i64mem:$src),
|
||||
"cvtdq2pd\t{$src, $dst|$dst, $src}",
|
||||
[(set VR128:$dst,
|
||||
(v2f64 (X86VSintToFP (bc_v4i32 (loadv2i64 addr:$src)))))],
|
||||
(v2f64 (X86VSintToFP (bc_v4i32 (v2i64 (X86vzload addr:$src))))))],
|
||||
IIC_SSE_CVT_PD_RR>, Sched<[WriteCvtI2FLd]>;
|
||||
def CVTDQ2PDrr : S2SI<0xE6, MRMSrcReg, (outs VR128:$dst), (ins VR128:$src),
|
||||
"cvtdq2pd\t{$src, $dst|$dst, $src}",
|
||||
|
|
|
@ -5,8 +5,7 @@
|
|||
define <2 x double> @signbits_sext_v2i64_sitofp_v2f64(i32 %a0, i32 %a1) nounwind {
|
||||
; X32-LABEL: signbits_sext_v2i64_sitofp_v2f64:
|
||||
; X32: # BB#0:
|
||||
; X32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
|
||||
; X32-NEXT: vcvtdq2pd %xmm0, %xmm0
|
||||
; X32-NEXT: vcvtdq2pd {{[0-9]+}}(%esp), %xmm0
|
||||
; X32-NEXT: retl
|
||||
;
|
||||
; X64-LABEL: signbits_sext_v2i64_sitofp_v2f64:
|
||||
|
|
|
@ -262,8 +262,7 @@ define <2 x double> @sitofp_v2i32_v2f64(<1 x i64>*) nounwind {
|
|||
; X86-NEXT: movq (%eax), %mm0
|
||||
; X86-NEXT: paddd %mm0, %mm0
|
||||
; X86-NEXT: movq %mm0, (%esp)
|
||||
; X86-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
|
||||
; X86-NEXT: cvtdq2pd %xmm0, %xmm0
|
||||
; X86-NEXT: cvtdq2pd (%esp), %xmm0
|
||||
; X86-NEXT: movl %ebp, %esp
|
||||
; X86-NEXT: popl %ebp
|
||||
; X86-NEXT: retl
|
||||
|
|
Loading…
Reference in New Issue