flow.c (init_propagate_block_info): Watch out for conditional branch to next instruction, and thus one outgoing edge.

* flow.c (init_propagate_block_info): Watch out for conditional
        branch to next instruction, and thus one outgoing edge.

From-SVN: r33775
This commit is contained in:
Richard Henderson 2000-05-08 15:04:39 -07:00 committed by Richard Henderson
parent bdcabcd457
commit 4fb9b83058
2 changed files with 25 additions and 7 deletions

View File

@ -1,3 +1,8 @@
2000-05-08 Richard Henderson <rth@cygnus.com>
* flow.c (init_propagate_block_info): Watch out for conditional
branch to next instruction, and thus one outgoing edge.
2000-05-08 Nick Clifton <nickc@cygnus.com>
* config/i386/i386.h (ELIMINABLE_REGS): Fix comment.

View File

@ -3573,16 +3573,29 @@ init_propagate_block_info (bb, live, local_set, flags)
int i;
/* Identify the successor blocks. */
bb_false = bb->succ->succ_next->dest;
bb_true = bb->succ->dest;
if (bb->succ->flags & EDGE_FALLTHRU)
if (bb->succ->succ_next != NULL)
{
basic_block t = bb_false;
bb_false = bb_true;
bb_true = t;
bb_false = bb->succ->succ_next->dest;
if (bb->succ->flags & EDGE_FALLTHRU)
{
basic_block t = bb_false;
bb_false = bb_true;
bb_true = t;
}
else if (! (bb->succ->succ_next->flags & EDGE_FALLTHRU))
abort ();
}
else
{
/* This can happen with a conditional jump to the next insn. */
if (JUMP_LABEL (bb->end) != bb_true->head)
abort ();
/* Simplest way to do nothing. */
bb_false = bb_true;
}
else if (! (bb->succ->succ_next->flags & EDGE_FALLTHRU))
abort ();
/* Extract the condition from the branch. */
cond_true = XEXP (SET_SRC (PATTERN (bb->end)), 0);