Fix Regression/CodeGen/PowerPC/2005-11-30-vastart-crash.ll

llvm-svn: 24547
This commit is contained in:
Chris Lattner 2005-11-30 20:40:54 +00:00
parent 74cdf784cc
commit 90a87cc2f1

View File

@ -434,7 +434,8 @@ PPCTargetLowering::LowerArguments(Function &F, SelectionDAG &DAG) {
needsLoad = true;
}
break;
case MVT::i64: ObjSize = 8;
case MVT::i64:
ObjSize = 8;
if (!ArgLive) break;
if (GPR_remaining > 0) {
SDOperand argHi, argLo;
@ -530,7 +531,10 @@ PPCTargetLowering::LowerArguments(Function &F, SelectionDAG &DAG) {
SDOperand PtrOff = DAG.getConstant(4, getPointerTy());
FIN = DAG.getNode(ISD::ADD, MVT::i32, FIN, PtrOff);
}
DAG.setRoot(DAG.getNode(ISD::TokenFactor, MVT::Other, MemOps));
if (!MemOps.empty()) {
MemOps.push_back(DAG.getRoot());
DAG.setRoot(DAG.getNode(ISD::TokenFactor, MVT::Other, MemOps));
}
}
// Finally, inform the code generator which regs we return values in.