Fix a dumb bug of mine where we were mishandling the PPC ABI (undef handling).

This fixes voronoi and bh in Olden, allowing all of olden to pass!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23133 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2005-08-29 22:22:57 +00:00
parent ba8a0e0d7f
commit 7107c10501

View File

@ -1479,8 +1479,7 @@ SDOperand PPC32DAGToDAGISel::Select(SDOperand Op) {
PPC::F8, PPC::F9, PPC::F10, PPC::F11, PPC::F12, PPC::F13 PPC::F8, PPC::F9, PPC::F10, PPC::F11, PPC::F12, PPC::F13
}; };
for (unsigned i = 2, e = N->getNumOperands(); i != e; ++i) for (unsigned i = 2, e = N->getNumOperands(); i != e; ++i) {
if (N->getOperand(i).getOpcode() != ISD::UNDEF) {
unsigned DestReg = 0; unsigned DestReg = 0;
MVT::ValueType RegTy; MVT::ValueType RegTy;
if (N->getOperand(i).getValueType() == MVT::i32) { if (N->getOperand(i).getValueType() == MVT::i32) {
@ -1495,11 +1494,13 @@ SDOperand PPC32DAGToDAGISel::Select(SDOperand Op) {
RegTy = MVT::f64; // Even if this is really f32! RegTy = MVT::f64; // Even if this is really f32!
} }
if (N->getOperand(i).getOpcode() != ISD::UNDEF) {
SDOperand Reg = CurDAG->getRegister(DestReg, RegTy); SDOperand Reg = CurDAG->getRegister(DestReg, RegTy);
Chain = CurDAG->getNode(ISD::CopyToReg, MVT::Other, Chain, Reg, Chain = CurDAG->getNode(ISD::CopyToReg, MVT::Other, Chain, Reg,
Select(N->getOperand(i))); Select(N->getOperand(i)));
CallOperands.push_back(Reg); CallOperands.push_back(Reg);
} }
}
// Finally, once everything is in registers to pass to the call, emit the // Finally, once everything is in registers to pass to the call, emit the
// call itself. // call itself.