Author: lattner Date: Sat Feb 2 21:20:59 2008 New Revision: 46673 URL: http://llvm.org/viewvc/llvm-project?rev=46673&view=rev Log: don't do ReplaceUses on a result that doesn't exist.
Modified: llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp Modified: llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp?rev=46673&r1=46672&r2=46673&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp Sat Feb 2 21:20:59 2008 @@ -732,8 +732,10 @@ SDOperand Ops[] = { N1, Tmp2, N3, Chain, InFlag }; SDNode *ResNode = CurDAG->getTargetNode(Opc, MVT::Other, MVT::Flag, Ops, 5); Chain = SDOperand(ResNode, 0); - InFlag = SDOperand(ResNode, 1); - ReplaceUses(SDOperand(Op.Val, 1), InFlag); + if (Op.Val->getNumValues() == 2) { + InFlag = SDOperand(ResNode, 1); + ReplaceUses(SDOperand(Op.Val, 1), InFlag); + } ReplaceUses(SDOperand(Op.Val, 0), SDOperand(Chain.Val, Chain.ResNo)); return NULL; } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits