Fix bug: LICM/sink_multiple_exits.ll
authorChris Lattner <sabre@nondot.org>
Wed, 10 Dec 2003 22:35:56 +0000 (22:35 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 10 Dec 2003 22:35:56 +0000 (22:35 +0000)
Thanks for pointing this out John  :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10387 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/LICM.cpp

index 55b4942bb9ae30f7ff18eb9ec9a48cff4534e7e7..0d8a848cc0d76444992bf7af8904c86f7577ba50 100644 (file)
@@ -451,7 +451,7 @@ void LICM::sink(Instruction &I) {
           // instruction, otherwise clone the original instruction and insert
           // the copy.
           Instruction *New;
-          if (InsertedBlocks.empty()) {
+          if (InsertedBlocks.size() == 1) {
             I.getParent()->getInstList().remove(&I);
             ExitBlock->getInstList().insert(InsertPt, &I);
             New = &I;