summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-11-30 20:40:54 +0000
committerChris Lattner <sabre@nondot.org>2005-11-30 20:40:54 +0000
commit3713e6b49c1d13f8453e47262802b573d9c30a06 (patch)
tree35f3284ab330c50525da7e4321bef28ae26b57a4 /llvm/lib
parentbd065599e6bffe97666eef8be493d321069af2cd (diff)
downloadbcm5719-llvm-3713e6b49c1d13f8453e47262802b573d9c30a06.tar.gz
bcm5719-llvm-3713e6b49c1d13f8453e47262802b573d9c30a06.zip
Fix Regression/CodeGen/PowerPC/2005-11-30-vastart-crash.ll
llvm-svn: 24547
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/PowerPC/PPCISelLowering.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index 1ef1d3e9d0e..0f7afbc7fbf 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -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.
OpenPOWER on IntegriCloud