From: Richard Henderson Date: Sun, 23 Mar 2003 20:18:55 +0000 (-0800) Subject: re PR rtl-optimization/10116 (ce2: invalid merge of "join_bb" in the context of switc... X-Git-Tag: releases/gcc-3.2.3~81 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b8880e93112633ac45052912a6411a5d01ad09e;p=thirdparty%2Fgcc.git re PR rtl-optimization/10116 (ce2: invalid merge of "join_bb" in the context of switch statements) PR opt/10116 * ifcvt.c (find_if_block): Disallow tablejump insns outgoing from then_bb or else_bb after flow2. From-SVN: r64752 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f239816e285b..d4999c014e4d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2003-03-23 Richard Henderson + + PR opt/10116 + * ifcvt.c (find_if_block): Disallow tablejump insns outgoing + from then_bb or else_bb after flow2. + 2003-03-22 John David Anglin * pa.c (output_cbranch, output_bb, output_bvb): Output nop for diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index a2b4cbd9512d..e40dfe9a46b6 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -2045,7 +2045,8 @@ find_if_block (test_bb, then_edge, else_edge) /* The THEN block of an IF-THEN combo must have zero or one successors. */ if (then_succ != NULL_EDGE && (then_succ->succ_next != NULL_EDGE - || (then_succ->flags & EDGE_COMPLEX))) + || (then_succ->flags & EDGE_COMPLEX) + || (flow2_completed && tablejump_p (then_bb->end)))) return FALSE; /* If the THEN block has no successors, conditional execution can still @@ -2092,7 +2093,8 @@ find_if_block (test_bb, then_edge, else_edge) && then_succ->dest == else_succ->dest && else_bb->pred->pred_next == NULL_EDGE && else_succ->succ_next == NULL_EDGE - && ! (else_succ->flags & EDGE_COMPLEX)) + && ! (else_succ->flags & EDGE_COMPLEX) + && ! (flow2_completed && tablejump_p (else_bb->end))) join_bb = else_succ->dest; /* Otherwise it is not an IF-THEN or IF-THEN-ELSE combination. */