mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-02 21:31:41 +00:00
Re-commit the last bit of change that was backed out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25983 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2216d8ad2f
commit
7dd281b3e5
@ -369,17 +369,11 @@ bool X86DAGToDAGISel::SelectAddr(SDOperand N, SDOperand &Base, SDOperand &Scale,
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (AM.BaseType == X86ISelAddressMode::RegBase) {
|
if (AM.BaseType == X86ISelAddressMode::RegBase) {
|
||||||
if (AM.Base.Reg.Val) {
|
if (!AM.Base.Reg.Val)
|
||||||
if (AM.Base.Reg.getOpcode() != ISD::Register)
|
|
||||||
AM.Base.Reg = Select(AM.Base.Reg);
|
|
||||||
} else {
|
|
||||||
AM.Base.Reg = CurDAG->getRegister(0, MVT::i32);
|
AM.Base.Reg = CurDAG->getRegister(0, MVT::i32);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AM.IndexReg.Val)
|
if (!AM.IndexReg.Val)
|
||||||
AM.IndexReg = Select(AM.IndexReg);
|
|
||||||
else
|
|
||||||
AM.IndexReg = CurDAG->getRegister(0, MVT::i32);
|
AM.IndexReg = CurDAG->getRegister(0, MVT::i32);
|
||||||
|
|
||||||
getAddressOperands(AM, Base, Scale, Index, Disp);
|
getAddressOperands(AM, Base, Scale, Index, Disp);
|
||||||
@ -441,11 +435,6 @@ bool X86DAGToDAGISel::SelectLEAAddr(SDOperand N, SDOperand &Base,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SelectBase)
|
|
||||||
AM.Base.Reg = Select(AM.Base.Reg);
|
|
||||||
if (SelectIndex)
|
|
||||||
AM.IndexReg = Select(AM.IndexReg);
|
|
||||||
|
|
||||||
getAddressOperands(AM, Base, Scale, Index, Disp);
|
getAddressOperands(AM, Base, Scale, Index, Disp);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user