From 4fb9b83058f9bb7c27c2fde58ef724a316a7b97f Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 8 May 2000 15:04:39 -0700 Subject: 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 --- gcc/ChangeLog | 5 +++++ gcc/flow.c | 25 +++++++++++++++++++------ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 81867aa..3318d80 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-05-08 Richard Henderson + + * flow.c (init_propagate_block_info): Watch out for conditional + branch to next instruction, and thus one outgoing edge. + 2000-05-08 Nick Clifton * config/i386/i386.h (ELIMINABLE_REGS): Fix comment. diff --git a/gcc/flow.c b/gcc/flow.c index 5e05b02..c978ff1 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -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->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; - bb_true = t; } - 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); -- cgit v1.1