cfgcleanup.c (outgoing_edges_match): When there is single outgoing edge and block...
authorJosef Zlomek <zlomekj@suse.cz>
Thu, 13 Feb 2003 18:31:40 +0000 (19:31 +0100)
committerJosef Zlomek <zlomek@gcc.gnu.org>
Thu, 13 Feb 2003 18:31:40 +0000 (18:31 +0000)
* cfgcleanup.c (outgoing_edges_match): When there is single outgoing
edge and block ends with a jump insn it must be simple jump.

From-SVN: r62858

gcc/ChangeLog
gcc/cfgcleanup.c

index 355aec2088aa9a713c98782d7209f49469ee1b35..b60757702ba563f2e86c5e321dbfb1a17c6cc6d1 100644 (file)
@@ -1,3 +1,8 @@
+2003-02-13  Josef Zlomek  <zlomekj@suse.cz>
+
+       * cfgcleanup.c (outgoing_edges_match): When there is single outgoing
+       edge and block ends with a jump insn it must be simple jump.
+
 2003-02-13  Daniel Jacobowitz  <drow@mvista.com>
 
        * Makefile.in (PREPROCESSOR_DEFINES): Add
index 2a23cc08fabf7727a88b25ed3cb1e9cac15862e0..338281a69909c0e79c3d0e03eeba20292858de30 100644 (file)
@@ -1119,9 +1119,11 @@ outgoing_edges_match (mode, bb1, bb2)
   /* If BB1 has only one successor, we may be looking at either an
      unconditional jump, or a fake edge to exit.  */
   if (bb1->succ && !bb1->succ->succ_next
-      && !(bb1->succ->flags & (EDGE_COMPLEX | EDGE_FAKE)))
+      && (bb1->succ->flags & (EDGE_COMPLEX | EDGE_FAKE)) == 0
+      && (GET_CODE (bb1->end) != JUMP_INSN || simplejump_p (bb1->end)))
     return (bb2->succ &&  !bb2->succ->succ_next
-           && (bb2->succ->flags & (EDGE_COMPLEX | EDGE_FAKE)) == 0);
+           && (bb2->succ->flags & (EDGE_COMPLEX | EDGE_FAKE)) == 0
+           && (GET_CODE (bb2->end) != JUMP_INSN || simplejump_p (bb2->end)));
 
   /* Match conditional jumps - this may get tricky when fallthru and branch
      edges are crossed.  */