Fix bug: test/Regression/Other/2002-03-11-InstCombineHang.ll
authorChris Lattner <sabre@nondot.org>
Mon, 11 Mar 2002 23:28:45 +0000 (23:28 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 11 Mar 2002 23:28:45 +0000 (23:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1864 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/InstructionCombining.cpp

index 08cf74637e1660c50826579843aa67418433b04f..1b0196e3e8759e81909ccc61da0a734a91b3b0b7 100644 (file)
@@ -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)) {