aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
index 75910ef00d..4bc0128bd5 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
@@ -4095,21 +4095,17 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
case Intrinsic::sadd_with_overflow: {
// Convert to "ISD::SADDO" instruction.
- SDValue Chain = getRoot();
SDValue Op1 = getValue(I.getOperand(1));
SDValue Op2 = getValue(I.getOperand(2));
MVT Ty = Op1.getValueType();
- MVT ValueVTs[] = { Ty, MVT::i1, MVT::Other };
- SDValue Ops[] = { Op1, Op2, Chain };
+ MVT ValueVTs[] = { Ty, MVT::i1 };
+ SDValue Ops[] = { Op1, Op2 };
- SDValue Result = DAG.getNode(ISD::SADDO, DAG.getVTList(&ValueVTs[0], 3),
- &Ops[0], 3);
+ SDValue Result = DAG.getNode(ISD::SADDO, DAG.getVTList(&ValueVTs[0], 2),
+ &Ops[0], 2);
setValue(&I, Result);
-
- unsigned NumArgRegs = Result.getNode()->getNumValues() - 1;
- DAG.setRoot(SDValue(Result.getNode(), NumArgRegs));
return 0;
}
case Intrinsic::uadd_with_overflow: {