Add users of a MERGE_VALUE node to the worklist to process again when the node is...
authorPete Cooper <peter_cooper@apple.com>
Wed, 20 Jun 2012 19:35:43 +0000 (19:35 +0000)
committerPete Cooper <peter_cooper@apple.com>
Wed, 20 Jun 2012 19:35:43 +0000 (19:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158839 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/DAGCombiner.cpp

index 4b56e41b72cbc78fe65982c46c9cab4c4297eabd..95dd2e6219b23fcd41cbde6e980f987252237dfe 100644 (file)
@@ -1322,6 +1322,9 @@ SDValue DAGCombiner::visitMERGE_VALUES(SDNode *N) {
   // 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));