Don't sink the instruction to before a landingpad instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137672 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling 2011-08-15 22:53:05 +00:00
parent d30243402b
commit 6456a62178

View File

@ -1436,7 +1436,7 @@ static bool TryToSinkInstruction(Instruction *I, BasicBlock *DestBlock) {
} }
BasicBlock::iterator InsertPos = DestBlock->getFirstNonPHI(); BasicBlock::iterator InsertPos = DestBlock->getFirstNonPHI();
if (isa<LandingPadInst>(InsertPos)) ++InsertPos; // Skip landingpad inst.
I->moveBefore(InsertPos); I->moveBefore(InsertPos);
++NumSunkInst; ++NumSunkInst;
return true; return true;