Revert commit r207302 since build failures
[oota-llvm.git] / lib / Transforms / Scalar / LoopInstSimplify.cpp
index ab1a9393c526c7c05377945ea4364405544a42ea..a61923cabf1e094ac579a84292ec4bf5fb9b4b62 100644 (file)
@@ -127,15 +127,7 @@ 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.
-          BI = BB->begin(); BE = BB->end();
-          LocalChanged |= res;
-        }
+        LocalChanged |= RecursivelyDeleteTriviallyDeadInstructions(I, TLI);
 
         if (IsSubloopHeader && !isa<PHINode>(I))
           break;