Fix bug: LICM/sink_multiple_exits.ll
[oota-llvm.git] / 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;