mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
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:
parent
79c23effe2
commit
3ecaf1b339
@ -39,6 +39,10 @@ bool llvm::MergeBlockIntoPredecessor(BasicBlock* BB, Pass* P) {
|
|||||||
|
|
||||||
// Can't merge if there are multiple predecessors.
|
// Can't merge if there are multiple predecessors.
|
||||||
if (!PredBB) return false;
|
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));
|
succ_iterator SI(succ_begin(PredBB)), SE(succ_end(PredBB));
|
||||||
BasicBlock* OnlySucc = BB;
|
BasicBlock* OnlySucc = BB;
|
||||||
|
Loading…
Reference in New Issue
Block a user