(a) Remove conditionally removed code in SelectXAddr. Basically, hope for the
    best that the A-form and D-form address predicates catch everything before
    the code decides to emit a X-form address.
(b) Expand vector store test cases to include the usual suspects.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60034 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Scott Michel
2008-11-25 17:29:43 +00:00
parent 21bfe0b448
commit 18fae69723
2 changed files with 75 additions and 28 deletions

View File

@@ -591,33 +591,11 @@ SPUDAGToDAGISel::SelectXFormAddr(SDValue Op, SDValue N, SDValue &Base,
SDValue &Index) {
if (!SelectAFormAddr(Op, N, Base, Index)
&& !SelectDFormAddr(Op, N, Base, Index)) {
#if 0
// Default form of a X-form address is r(r) in operands 0 and 1:
SDValue Op0 = N.getOperand(0);
SDValue Op1 = N.getOperand(1);
if ((Op0.getOpcode() == ISD::Register
|| Op.getOpcode() == ISD::CopyFromReg)
&& (Op1.getOpcode() == ISD::Register
|| Op.getOpcode() == ISD::CopyFromReg)) {
if (Op.getOpcode() == ISD::Register)
Base = Op0;
else
Base = Op0.getOperand(1);
if (Op1.getOpcode() == ISD::Register)
Index = Op1;
else
Index = Op1.getOperand(1);
return true;
}
#else
// All else fails, punt and use an X-form address:
// If the address is neither A-form or D-form, punt and use an X-form
// address:
Base = N.getOperand(0);
Index = N.getOperand(1);
return true;
#endif
}
return false;