]> 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:18:55 +0000 (12:18 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Sun, 23 Mar 2003 20:18:55 +0000 (12:18 -0800)
        PR opt/10116
        * ifcvt.c (find_if_block): Disallow tablejump insns outgoing
        from then_bb or else_bb after flow2.

From-SVN: r64752

gcc/ChangeLog
gcc/ifcvt.c

index f239816e285b0329bb88cf3fa839593e70a985e8..d4999c014e4d046197aa6610785da7042ccafb82 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-22  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
        * pa.c (output_cbranch, output_bb, output_bvb): Output nop for
index a2b4cbd9512d1fda08d4488c4bb41ce39393ebb5..e40dfe9a46b6323d803b1f66c89b875f4df1f41a 100644 (file)
@@ -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.  */