Remove chains. Unnecessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59783 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling 2008-11-21 02:22:59 +00:00
parent 98adea1149
commit 6c63f62729
2 changed files with 8 additions and 14 deletions

View File

@ -5148,7 +5148,6 @@ SDValue DAGCombiner::visitVECTOR_SHUFFLE(SDNode *N) {
}
SDValue DAGCombiner::visitSADDO(SDNode *N) {
SDValue Chain = N->getOperand(2);
SDValue LHS = N->getOperand(0);
SDValue RHS = N->getOperand(1);
@ -5157,17 +5156,16 @@ SDValue DAGCombiner::visitSADDO(SDNode *N) {
SDValue Cmp = DAG.getSetCC(MVT::i1, Sum, LHS, ISD::SETLT);
AddToWorkList(Cmp.getNode());
MVT ValueVTs[] = { LHS.getValueType(), MVT::i1, MVT::Other };
SDValue Ops[] = { Sum, Cmp, Chain };
MVT ValueVTs[] = { LHS.getValueType(), MVT::i1 };
SDValue Ops[] = { Sum, Cmp };
SDValue Merge = DAG.getMergeValues(DAG.getVTList(&ValueVTs[0], 3),
&Ops[0], 3);
SDValue Merge = DAG.getMergeValues(DAG.getVTList(&ValueVTs[0], 2),
&Ops[0], 2);
SDNode *MNode = Merge.getNode();
AddToWorkList(MNode);
DAG.ReplaceAllUsesOfValueWith(SDValue(N, 0), SDValue(MNode, 0));
DAG.ReplaceAllUsesOfValueWith(SDValue(N, 1), SDValue(MNode, 1));
DAG.ReplaceAllUsesOfValueWith(SDValue(N, 2), SDValue(MNode, 2));
// Since the node is now dead, remove it from the graph.
removeFromWorkList(N);

View File

@ -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: {