Duncan pointed out that the LandingPadInst might read memory. (It might also

write to memory.) Marking it as such makes some checks for immobility go away.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137655 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling
2011-08-15 21:14:31 +00:00
parent 0455bb89cd
commit 9d6070f161
3 changed files with 4 additions and 6 deletions

View File

@ -99,9 +99,6 @@ 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();