The landingpad instruction isn't loop-invariant.

llvm-svn: 137628
This commit is contained in:
Bill Wendling 2011-08-15 18:22:49 +00:00
parent 88294cdbe0
commit 9af5b22b76
1 changed files with 3 additions and 0 deletions

View File

@ -99,6 +99,9 @@ bool Loop::makeLoopInvariant(Instruction *I, bool &Changed,
return false;
if (I->mayReadFromMemory())
return false;
// The landingpad instruction is immobile.
if (isa<LandingPadInst>(I))
return false;
// Determine the insertion point, unless one was given.
if (!InsertPt) {
BasicBlock *Preheader = getLoopPreheader();