]> granicus.if.org Git - llvm/commitdiff
[LoopUnswitch] Common pushing LIC's user to worklist.
authorXin Tong <trent.xin.tong@gmail.com>
Tue, 28 Feb 2017 03:32:41 +0000 (03:32 +0000)
committerXin Tong <trent.xin.tong@gmail.com>
Tue, 28 Feb 2017 03:32:41 +0000 (03:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296432 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/LoopUnswitch.cpp

index add63eb74e340ddfa601ab6bb21c89dc61942b72..a670c6ed692ddadbca30790459248724dee44324 100644 (file)
@@ -1332,13 +1332,11 @@ void LoopUnswitch::RewriteLoopBodyWithConditionConstant(Loop *L, Value *LIC,
         // dead by replacing all its users and push it onto the worklist so that
         // it can be properly deleted and its operands simplified. 
         UI->replaceAllUsesWith(Replacement);
-        Worklist.push_back(UI);
-        continue;
       }
     }
 
-    // Unable to simplify with non-valueness, push it into the worklist so that
-    // SimplifyCode can attempt to simplify it.
+    // This is a LIC user, push it into the worklist so that SimplifyCode can
+    // attempt to simplify it.
     Worklist.push_back(UI);
 
     // If we know that LIC is not Val, use this info to simplify code.