Add some checks that got lost in the shuffle. This fixes 464.h264ref.

llvm-svn: 53760
This commit is contained in:
Owen Anderson 2008-07-18 17:46:41 +00:00
parent f7faa42c6c
commit 1468bec06e
1 changed files with 4 additions and 0 deletions

View File

@ -39,6 +39,10 @@ bool llvm::MergeBlockIntoPredecessor(BasicBlock* BB, Pass* P) {
// Can't merge if there are multiple predecessors.
if (!PredBB) return false;
// Don't break self-loops.
if (PredBB == BB) return false;
// Don't break invokes.
if (isa<InvokeInst>(PredBB->getTerminator())) return false;
succ_iterator SI(succ_begin(PredBB)), SE(succ_end(PredBB));
BasicBlock* OnlySucc = BB;