Use a do-while loop instead of while + boolean.
[oota-llvm.git] / lib / Transforms / Scalar / IndVarSimplify.cpp
index 5273e314839a2f9a340f399e5886ebfe53358970..ce1307c8df3b40e7907e6b46da1737c4abe56261 100644 (file)
@@ -438,7 +438,7 @@ bool IndVarSimplify::runOnLoop(Loop *L, LPPassManager &LPM) {
     IU->AddUsersIfInteresting(cast<Instruction>(NewICmp->getOperand(0)));
 
   // Clean up dead instructions.
-  DeleteDeadPHIs(L->getHeader());
+  Changed |= DeleteDeadPHIs(L->getHeader());
   // Check a post-condition.
   assert(L->isLCSSAForm() && "Indvars did not leave the loop in lcssa form!");
   return Changed;