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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53760 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson 2008-07-18 17:46:41 +00:00
parent 79c23effe2
commit 3ecaf1b339

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;