Fix a REALLY obscure bug in my previous checkin, which was splicing the END
authorChris Lattner <sabre@nondot.org>
Tue, 12 Oct 2004 01:02:29 +0000 (01:02 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 12 Oct 2004 01:02:29 +0000 (01:02 +0000)
marker from one ilist into the middle of another basic block!

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

lib/Transforms/Scalar/IndVarSimplify.cpp

index 3398b376abfd716a82c0aff13344dbd57fc8af9b..00249807cacdb0b792ca1b1fcf51656241067b96 100644 (file)
@@ -138,7 +138,7 @@ namespace {
                   // Splice the cast immediately after the operand in question.
                   BasicBlock::InstListType &InstList =
                     I->getParent()->getInstList();
-                  InstList.splice(It, InstList, CI);
+                  InstList.splice(It, CI->getParent()->getInstList(), CI);
                 }
                 return CI;
               }