forked from OSchip/llvm-project
Fix r114632. Return if the only terminator is an unconditional branch after the redundant ones are deleted.
llvm-svn: 114688
This commit is contained in:
parent
836341a17a
commit
1596f7f6f3
|
@ -284,9 +284,11 @@ ARMBaseInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB,MachineBasicBlock *&TBB,
|
|||
LastInst->eraseFromParent();
|
||||
LastInst = SecondLastInst;
|
||||
LastOpc = LastInst->getOpcode();
|
||||
if (I == MBB.begin() || !isUnpredicatedTerminator(--I))
|
||||
break;
|
||||
else {
|
||||
if (I == MBB.begin() || !isUnpredicatedTerminator(--I)) {
|
||||
// Return now the only terminator is an unconditional branch.
|
||||
TBB = LastInst->getOperand(0).getMBB();
|
||||
return false;
|
||||
} else {
|
||||
SecondLastInst = I;
|
||||
SecondLastOpc = SecondLastInst->getOpcode();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue