Revert commit r207302 since build failures
[oota-llvm.git] / lib / Transforms / Utils / SimplifyInstructions.cpp
index 33b3637..c62aa66 100644 (file)
@@ -76,15 +76,7 @@ namespace {
                 ++NumSimplified;
                 Changed = true;
               }
-            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();
-              Changed |= res;
-            }
+            Changed |= RecursivelyDeleteTriviallyDeadInstructions(I, TLI);
           }
 
         // Place the list of instructions to simplify on the next loop iteration