aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 08cf74637e..1b0196e3e8 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -43,8 +43,8 @@ static Instruction *CombineBinOp(BinaryOperator *I) {
if (I->getType()->isIntegral() && cast<ConstantInt>(Op2)->equalsInt(0)){
// Eliminate 'add int %X, 0'
I->replaceAllUsesWith(Op1); // FIXME: This breaks the worklist
- LocalChange = true;
- break;
+ Changed = true;
+ return I;
}
if (Instruction *IOp1 = dyn_cast<Instruction>(Op1)) {