]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
flow.c (delete_unreachable_blocks): Do not call merge_blocks or tidy_fallthru_edge...
authorJeffrey A Law <law@cygnus.com>
Wed, 4 Aug 1999 07:09:48 +0000 (07:09 +0000)
committerJeff Law <law@gcc.gnu.org>
Wed, 4 Aug 1999 07:09:48 +0000 (01:09 -0600)
        * flow.c (delete_unreachable_blocks): Do not call merge_blocks
        or tidy_fallthru_edge if the last insn in the block is not
        an unconditional jump or a simple conditional jump.

From-SVN: r28482

gcc/ChangeLog
gcc/flow.c

index c13d9fe91bfb4640936551a2bb7475114586c75b..88032f8623ce4699bce7fc8225642cf16fbd0bbe 100644 (file)
@@ -1,3 +1,9 @@
+Wed Aug  4 01:08:44 1999  Jeffrey A Law  (law@cygnus.com)
+
+        * flow.c (delete_unreachable_blocks): Do not call merge_blocks
+        or tidy_fallthru_edge if the last insn in the block is not
+        an unconditional jump or a simple conditional jump.
+
 Tue Aug  3 03:51:20 1999  Jeffrey A Law  (law@cygnus.com)
 
        * cse.c (cse_insn): Fix dumb thinko in last change.
index edcee2919ad7cadf7685784be1c2a1d72f9e65f1..ac8fd6337ff2a6c9f2f6b91e2a54fb28013f68b1 100644 (file)
@@ -1562,7 +1562,12 @@ delete_unreachable_blocks ()
         check that the edge is not a FALLTHRU edge.  */
       if ((s = b->succ) != NULL
          && s->succ_next == NULL
-         && s->dest == c)
+         && s->dest == c
+         /* If the last insn is not a normal conditional jump
+            (or an unconditional jump), then we can not tidy the
+            fallthru edge because we can not delete the jump.  */
+         && GET_CODE (b->end) == JUMP_INSN
+         && condjump_p (b->end))
        tidy_fallthru_edge (s, b, c);
     }
 
@@ -1581,6 +1586,11 @@ delete_unreachable_blocks ()
             && (s->flags & EDGE_EH) == 0
             && (c = s->dest) != EXIT_BLOCK_PTR
             && c->pred->pred_next == NULL
+            /* If the last insn is not a normal conditional jump
+               (or an unconditional jump), then we can not merge
+               the blocks because we can not delete the jump.  */
+            && GET_CODE (b->end) == JUMP_INSN
+            && condjump_p (b->end)
             && merge_blocks (s, b, c))
        continue;