diff options
author | Chris Lattner <sabre@nondot.org> | 2005-11-30 20:40:54 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-11-30 20:40:54 +0000 |
commit | 80720a921987e36c83236d375919172afd20d79c (patch) | |
tree | e00bf0fa2ee9e9556c1d935b91655bb528409618 /lib/Target/PowerPC/PPCISelLowering.cpp | |
parent | af6aa077d4128cb09ba4872430811f1916e9e422 (diff) |
Fix Regression/CodeGen/PowerPC/2005-11-30-vastart-crash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24547 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCISelLowering.cpp')
-rw-r--r-- | lib/Target/PowerPC/PPCISelLowering.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Target/PowerPC/PPCISelLowering.cpp b/lib/Target/PowerPC/PPCISelLowering.cpp index 1ef1d3e9d0..0f7afbc7fb 100644 --- a/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/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. |