Fix a REALLY obscure bug in my previous checkin, which was splicing the END
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
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp
index 3398b37..0024980 100644
--- a/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -138,7 +138,7 @@
// 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;
}