Blocks that cond-br and uncond-br/fallthrough to same block should have

only one successor.

llvm-svn: 37324
This commit is contained in:
Dale Johannesen 2007-05-24 18:31:55 +00:00
parent ecaa8a0fb4
commit 86fb3a132a

View File

@ -672,7 +672,10 @@ static bool CorrectExtraCFGEdges(MachineBasicBlock &MBB,
MachineBasicBlock::pred_iterator SI = MBB.succ_begin();
while (SI != MBB.succ_end()) {
if (*SI == DestA) {
if (*SI == DestA && DestA == DestB) {
DestA = DestB = 0;
++SI;
} else if (*SI == DestA) {
DestA = 0;
++SI;
} else if (*SI == DestB) {