diff options
Diffstat (limited to 'llvm/lib/Transforms/Scalar/Reassociate.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/Reassociate.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/Reassociate.cpp b/llvm/lib/Transforms/Scalar/Reassociate.cpp index 1ec7fcea109..ac0d7b8f1dd 100644 --- a/llvm/lib/Transforms/Scalar/Reassociate.cpp +++ b/llvm/lib/Transforms/Scalar/Reassociate.cpp @@ -2198,8 +2198,10 @@ PreservedAnalyses ReassociatePass::run(Function &F, FunctionAnalysisManager &) { // trivially dead instructions have been removed. while (!ToRedo.empty()) { Instruction *I = ToRedo.pop_back_val(); - if (isInstructionTriviallyDead(I)) + if (isInstructionTriviallyDead(I)) { RecursivelyEraseDeadInsts(I, ToRedo); + MadeChange = true; + } } // Now that we have removed dead instructions, we can reoptimize the |