diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-01-31 21:00:00 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-01-31 21:00:00 +0000 |
commit | 27b32b87ed8fdde58902457023705a0bc85ebf84 (patch) | |
tree | 19a53b7c5da5199ba774d6065ff5e53cfa115329 /llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp | |
parent | 9cc55f5b1f5234fe5532bef3a5cb414d8e439661 (diff) | |
download | bcm5719-llvm-27b32b87ed8fdde58902457023705a0bc85ebf84.tar.gz bcm5719-llvm-27b32b87ed8fdde58902457023705a0bc85ebf84.zip |
Revert 46556 and 46585. Dan please fix the PseudoSourceValue problem and re-commit.
llvm-svn: 46623
Diffstat (limited to 'llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp')
-rw-r--r-- | llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp b/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp index 6c5b79daa7d..f8dfbe3efaa 100644 --- a/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp +++ b/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp @@ -804,23 +804,25 @@ LowerOperation(SDOperand Op, SelectionDAG &DAG) { SDOperand Offset = DAG.getNode(ISD::ADD, MVT::i32, DAG.getRegister(SP::I6, MVT::i32), DAG.getConstant(VarArgsFrameOffset, MVT::i32)); - const Value *SV = cast<SrcValueSDNode>(Op.getOperand(2))->getValue(); - return DAG.getStore(Op.getOperand(0), Offset, Op.getOperand(1), SV, 0); + SrcValueSDNode *SV = cast<SrcValueSDNode>(Op.getOperand(2)); + return DAG.getStore(Op.getOperand(0), Offset, + Op.getOperand(1), SV->getValue(), SV->getOffset()); } case ISD::VAARG: { SDNode *Node = Op.Val; MVT::ValueType VT = Node->getValueType(0); SDOperand InChain = Node->getOperand(0); SDOperand VAListPtr = Node->getOperand(1); - const Value *SV = cast<SrcValueSDNode>(Node->getOperand(2))->getValue(); - SDOperand VAList = DAG.getLoad(getPointerTy(), InChain, VAListPtr, SV, 0); + SrcValueSDNode *SV = cast<SrcValueSDNode>(Node->getOperand(2)); + SDOperand VAList = DAG.getLoad(getPointerTy(), InChain, VAListPtr, + SV->getValue(), SV->getOffset()); // Increment the pointer, VAList, to the next vaarg SDOperand NextPtr = DAG.getNode(ISD::ADD, getPointerTy(), VAList, DAG.getConstant(MVT::getSizeInBits(VT)/8, getPointerTy())); // Store the incremented VAList to the legalized pointer InChain = DAG.getStore(VAList.getValue(1), NextPtr, - VAListPtr, SV, 0); + VAListPtr, SV->getValue(), SV->getOffset()); // Load the actual argument out of the pointer VAList, unless this is an // f64 load. if (VT != MVT::f64) { |