Should reset DBI_Prev if DBI_Next == 0.
authorZhou Sheng <zhousheng00@gmail.com>
Mon, 23 Feb 2009 10:14:11 +0000 (10:14 +0000)
committerZhou Sheng <zhousheng00@gmail.com>
Mon, 23 Feb 2009 10:14:11 +0000 (10:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65314 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/InstructionCombining.cpp

index 1a4396bace352e1c2f65e4064a68afc87aead9d7..7f2cab96ec5550993c0d12cc8d794a152f99841f 100644 (file)
@@ -12419,6 +12419,8 @@ static void AddReachableCodeToWorklist(BasicBlock *BB,
           DBI_Prev->eraseFromParent();
         }
         DBI_Prev = DBI_Next;
+      } else {
+        DBI_Prev = 0;
       }
 
       IC.AddToWorkList(Inst);