From 9fff2187a21f765ed87a25c48552a6942450f3e2 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 5 Jan 2010 16:31:45 +0000 Subject: [PATCH] Set Changed properly after calling DeleteDeadPHIs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92735 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/IndVarSimplify.cpp | 2 +- lib/Transforms/Scalar/LoopStrengthReduce.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 5273e314839..ce1307c8df3 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -438,7 +438,7 @@ bool IndVarSimplify::runOnLoop(Loop *L, LPPassManager &LPM) { IU->AddUsersIfInteresting(cast(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; diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 85f7368fb33..fa820ed8e40 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -2723,7 +2723,7 @@ bool LoopStrengthReduce::runOnLoop(Loop *L, LPPassManager &LPM) { // At this point, it is worth checking to see if any recurrence PHIs are also // dead, so that we can remove them as well. - DeleteDeadPHIs(L->getHeader()); + Changed |= DeleteDeadPHIs(L->getHeader()); return Changed; }