diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp --- a/polly/lib/CodeGen/CodeGeneration.cpp +++ b/polly/lib/CodeGen/CodeGeneration.cpp @@ -153,7 +153,7 @@ switch (IT->getIntrinsicID()) { case Intrinsic::lifetime_start: case Intrinsic::lifetime_end: - BB->getInstList().erase(InstIt); + IT->eraseFromParent(); break; default: break;