[llvm-commits] [llvm] r59783 - in /llvm/trunk/lib/CodeGen/SelectionDAG: DAGCombiner.cpp SelectionDAGBuild.cpp
Bill Wendling
isanbard at gmail.com
Thu Nov 20 18:22:59 PST 2008
Author: void
Date: Thu Nov 20 20:22:59 2008
New Revision: 59783
URL: http://llvm.org/viewvc/llvm-project?rev=59783&view=rev
Log:
Remove chains. Unnecessary.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=59783&r1=59782&r2=59783&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu Nov 20 20:22:59 2008
@@ -5148,7 +5148,6 @@
}
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 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);
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=59783&r1=59782&r2=59783&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Thu Nov 20 20:22:59 2008
@@ -4095,21 +4095,17 @@
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: {
More information about the llvm-commits
mailing list