From: Chris Lattner Date: Mon, 11 Mar 2002 23:28:45 +0000 (+0000) Subject: Fix bug: test/Regression/Other/2002-03-11-InstCombineHang.ll X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a007bc2c14937edf67a0cb2f98ec4985c51da75d;p=oota-llvm.git Fix bug: test/Regression/Other/2002-03-11-InstCombineHang.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1864 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 08cf74637e1..1b0196e3e87 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(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(Op1)) {