diff --git a/llvm/lib/Transforms/Scalar/CondPropagate.cpp b/llvm/lib/Transforms/Scalar/CondPropagate.cpp index d4c583ff03c4..80f6973d9949 100644 --- a/llvm/lib/Transforms/Scalar/CondPropagate.cpp +++ b/llvm/lib/Transforms/Scalar/CondPropagate.cpp @@ -65,7 +65,7 @@ bool CondProp::runOnFunction(Function &F) { MadeChange = false; for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) SimplifyBlock(BB); - EverMadeChange = MadeChange; + EverMadeChange = EverMadeChange || MadeChange; } while (MadeChange); return EverMadeChange; }