Use movlpd to: store lower f64 extracted from v2f64.
Use movhpd to: store upper f64 extracted from v2f64. llvm-svn: 27382
This commit is contained in:
parent
5400727595
commit
b64827e662
|
@ -2712,6 +2712,8 @@ SDOperand X86TargetLowering::LowerOperation(SDOperand Op, SelectionDAG &DAG) {
|
||||||
return Op;
|
return Op;
|
||||||
|
|
||||||
// UNPCKHPD the element to the lowest double word, then movsd.
|
// UNPCKHPD the element to the lowest double word, then movsd.
|
||||||
|
// Note if the lower 64 bits of the result of the UNPCKHPD is then stored
|
||||||
|
// to a f64mem, the whole operation is folded into a single MOVHPDmr.
|
||||||
MVT::ValueType MaskVT = MVT::getIntVectorWithNumElements(4);
|
MVT::ValueType MaskVT = MVT::getIntVectorWithNumElements(4);
|
||||||
std::vector<SDOperand> IdxVec;
|
std::vector<SDOperand> IdxVec;
|
||||||
IdxVec.push_back(DAG.getConstant(1, MVT::getVectorBaseType(MaskVT)));
|
IdxVec.push_back(DAG.getConstant(1, MVT::getVectorBaseType(MaskVT)));
|
||||||
|
|
|
@ -713,12 +713,18 @@ def MOVHPDrm : PDI<0x16, MRMSrcMem, (ops VR128:$dst, VR128:$src1, f64mem:$src2),
|
||||||
def MOVLPSmr : PSI<0x13, MRMDestMem, (ops f64mem:$dst, VR128:$src),
|
def MOVLPSmr : PSI<0x13, MRMDestMem, (ops f64mem:$dst, VR128:$src),
|
||||||
"movlps {$src, $dst|$dst, $src}", []>;
|
"movlps {$src, $dst|$dst, $src}", []>;
|
||||||
def MOVLPDmr : PDI<0x13, MRMDestMem, (ops f64mem:$dst, VR128:$src),
|
def MOVLPDmr : PDI<0x13, MRMDestMem, (ops f64mem:$dst, VR128:$src),
|
||||||
"movlpd {$src, $dst|$dst, $src}", []>;
|
"movlpd {$src, $dst|$dst, $src}",
|
||||||
|
[(store (f64 (vector_extract (v2f64 VR128:$src),
|
||||||
|
(i32 0))), addr:$dst)]>;
|
||||||
|
|
||||||
def MOVHPSmr : PSI<0x17, MRMDestMem, (ops f64mem:$dst, VR128:$src),
|
def MOVHPSmr : PSI<0x17, MRMDestMem, (ops f64mem:$dst, VR128:$src),
|
||||||
"movhps {$src, $dst|$dst, $src}", []>;
|
"movhps {$src, $dst|$dst, $src}", []>;
|
||||||
def MOVHPDmr : PDI<0x17, MRMDestMem, (ops f64mem:$dst, VR128:$src),
|
def MOVHPDmr : PDI<0x17, MRMDestMem, (ops f64mem:$dst, VR128:$src),
|
||||||
"movhpd {$src, $dst|$dst, $src}", []>;
|
"movhpd {$src, $dst|$dst, $src}",
|
||||||
|
[(store (f64 (vector_extract
|
||||||
|
(v2f64 (vector_shuffle VR128:$src, (undef),
|
||||||
|
UNPCKH_shuffle_mask)), (i32 0))),
|
||||||
|
addr:$dst)]>;
|
||||||
|
|
||||||
let isTwoAddress = 1 in {
|
let isTwoAddress = 1 in {
|
||||||
def MOVLHPSrr : PSI<0x16, MRMSrcReg, (ops VR128:$dst, VR128:$src1, VR128:$src2),
|
def MOVLHPSrr : PSI<0x16, MRMSrcReg, (ops VR128:$dst, VR128:$src1, VR128:$src2),
|
||||||
|
@ -1561,10 +1567,6 @@ def MOVPD2SDrr : SDI<0x10, MRMSrcReg, (ops FR64:$dst, VR128:$src),
|
||||||
"movsd {$src, $dst|$dst, $src}",
|
"movsd {$src, $dst|$dst, $src}",
|
||||||
[(set FR64:$dst, (vector_extract (v2f64 VR128:$src),
|
[(set FR64:$dst, (vector_extract (v2f64 VR128:$src),
|
||||||
(i32 0)))]>;
|
(i32 0)))]>;
|
||||||
def MOVPD2SDmr : SDI<0x10, MRMDestMem, (ops f64mem:$dst, VR128:$src),
|
|
||||||
"movsd {$src, $dst|$dst, $src}",
|
|
||||||
[(store (f64 (vector_extract (v2f64 VR128:$src),
|
|
||||||
(i32 0))), addr:$dst)]>;
|
|
||||||
def MOVPDI2DIrr : PDI<0x7E, MRMSrcReg, (ops R32:$dst, VR128:$src),
|
def MOVPDI2DIrr : PDI<0x7E, MRMSrcReg, (ops R32:$dst, VR128:$src),
|
||||||
"movd {$src, $dst|$dst, $src}",
|
"movd {$src, $dst|$dst, $src}",
|
||||||
[(set R32:$dst, (vector_extract (v4i32 VR128:$src),
|
[(set R32:$dst, (vector_extract (v4i32 VR128:$src),
|
||||||
|
|
Loading…
Reference in New Issue