[llvm-commits] [llvm] r45186 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Evan Cheng
evan.cheng at apple.com
Tue Dec 18 17:34:39 PST 2007
Author: evancheng
Date: Tue Dec 18 19:34:38 2007
New Revision: 45186
URL: http://llvm.org/viewvc/llvm-project?rev=45186&view=rev
Log:
Don't leave newly created nodes around if it turns out they are not needed.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=45186&r1=45185&r2=45186&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue Dec 18 19:34:38 2007
@@ -1446,7 +1446,8 @@
TLI.isOperationLegal(LoOpt.getOpcode(), LoOpt.getValueType())) {
RetVal = true;
DAG.ReplaceAllUsesOfValueWith(SDOperand(N, 0), LoOpt);
- }
+ } else
+ DAG.DeleteNode(Lo.Val);
}
if (HiExists) {
@@ -1457,7 +1458,8 @@
TLI.isOperationLegal(HiOpt.getOpcode(), HiOpt.getValueType())) {
RetVal = true;
DAG.ReplaceAllUsesOfValueWith(SDOperand(N, 1), HiOpt);
- }
+ } else
+ DAG.DeleteNode(Hi.Val);
}
return RetVal;
More information about the llvm-commits
mailing list