]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/10116 (ce2: invalid merge of "join_bb" in the context of switc...
authorRichard Henderson <rth@redhat.com>
Sun, 23 Mar 2003 20:14:57 +0000 (12:14 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Sun, 23 Mar 2003 20:14:57 +0000 (12:14 -0800)
        PR opt/10116
        * ifcvt.c (find_if_block): Disallow tablejump insns outgoing
        from then_bb or else_bb after flow2.

From-SVN: r64750

gcc/ChangeLog
gcc/ifcvt.c

index fb144abb9b4ed9acda37d9ad878a683529f5fa85..65799f5332718ee717d04f331a5834225f826f00 100644 (file)
@@ -1,3 +1,9 @@
+2003-03-23  Richard Henderson  <rth@redhat.com>
+
+       PR opt/10116
+       * ifcvt.c (find_if_block): Disallow tablejump insns outgoing
+       from then_bb or else_bb after flow2.
+
 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
 
        * configure.in: Check whether it is necessary to link against
index 0cfd06f3029677426fe4099705890db164ae37e1..9236b6a08bbe0baef56091c539c5de507cf01970 100644 (file)
@@ -2365,7 +2365,8 @@ find_if_block (ce_info)
   /* 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, NULL, NULL))))
     return FALSE;
 
   /* If the THEN block has no successors, conditional execution can still
@@ -2412,7 +2413,8 @@ find_if_block (ce_info)
           && 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, NULL, NULL)))
     join_bb = else_succ->dest;
 
   /* Otherwise it is not an IF-THEN or IF-THEN-ELSE combination.  */