Simplify logic. NFC.
authorChad Rosier <mcrosier@codeaurora.org>
Wed, 6 Apr 2016 13:27:13 +0000 (13:27 +0000)
committerChad Rosier <mcrosier@codeaurora.org>
Wed, 6 Apr 2016 13:27:13 +0000 (13:27 +0000)
llvm-svn: 265537

llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp

index 5847ad2..4d2f4bc 100644 (file)
@@ -128,14 +128,12 @@ bool LoopInstSimplify::runOnLoop(Loop *L, LPPassManager &LPM) {
             ++NumSimplified;
           }
         }
-        bool res = RecursivelyDeleteTriviallyDeadInstructions(I, TLI);
-        if (res) {
-          // RecursivelyDeleteTriviallyDeadInstruction can remove
-          // more than one instruction, so simply incrementing the
-          // iterator does not work. When instructions get deleted
-          // re-iterate instead.
+        if (RecursivelyDeleteTriviallyDeadInstructions(I, TLI)) {
+          // RecursivelyDeleteTriviallyDeadInstruction can remove more than one
+          // instruction, so simply incrementing the iterator does not work.
+          // When instructions get deleted re-iterate instead.
           BI = BB->begin(); BE = BB->end();
-          LocalChanged |= res;
+          LocalChanged = true;
         }
 
         if (IsSubloopHeader && !isa<PHINode>(I))