From: Chris Lattner Date: Wed, 10 Dec 2003 22:35:56 +0000 (+0000) Subject: Fix bug: LICM/sink_multiple_exits.ll X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7d3ced934f1bb2c6845676c7333ef879d5219e88;p=oota-llvm.git Fix bug: LICM/sink_multiple_exits.ll Thanks for pointing this out John :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10387 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp index 55b4942bb9a..0d8a848cc0d 100644 --- a/lib/Transforms/Scalar/LICM.cpp +++ b/lib/Transforms/Scalar/LICM.cpp @@ -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;