forked from OSchip/llvm-project
Add some checks that got lost in the shuffle. This fixes 464.h264ref.
llvm-svn: 53760
This commit is contained in:
parent
f7faa42c6c
commit
1468bec06e
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue