[llvm-commits] [llvm] r158839 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Pete Cooper
peter_cooper at apple.com
Wed Jun 20 12:35:43 PDT 2012
Author: pete
Date: Wed Jun 20 14:35:43 2012
New Revision: 158839
URL: http://llvm.org/viewvc/llvm-project?rev=158839&view=rev
Log:
Add users of a MERGE_VALUE node to the worklist to process again when the node is removed. Sorry, no test case. Foudn it by inspection of the code
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=158839&r1=158838&r2=158839&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Wed Jun 20 14:35:43 2012
@@ -1322,6 +1322,9 @@
// Replacing results may cause a different MERGE_VALUES to suddenly
// be CSE'd with N, and carry its uses with it. Iterate until no
// uses remain, to ensure that the node can be safely deleted.
+ // First add the users of this node to the work list so that they
+ // can be tried again once they have new operands.
+ AddUsersToWorkList(N);
do {
for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i)
DAG.ReplaceAllUsesOfValueWith(SDValue(N, i), N->getOperand(i));
More information about the llvm-commits
mailing list