aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1999-08-04 07:11:26 +0000
committerJeff Law <law@gcc.gnu.org>1999-08-04 01:11:26 -0600
commite8fe3cc34e9a4cdc8cc183276d772cc6558e94b1 (patch)
tree1c92e9773d1bbf8d3e7a826863050e53253e566c /gcc
parent31534a2cbae288223a092ee1bd723a19d53f2912 (diff)
downloadgcc-e8fe3cc34e9a4cdc8cc183276d772cc6558e94b1.zip
gcc-e8fe3cc34e9a4cdc8cc183276d772cc6558e94b1.tar.gz
gcc-e8fe3cc34e9a4cdc8cc183276d772cc6558e94b1.tar.bz2
flow.c (delete_unreachable_blocks): Do not call merge_blocks or tidy_fallthru_edge if...
* 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: r28483
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/flow.c12
2 files changed, 17 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ad53adf..37afbd6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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 20:21:20 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
* Makefile.in (c-decl.o): Depends on defaults.h.
diff --git a/gcc/flow.c b/gcc/flow.c
index 7ec0832..9ca8f5c 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -1563,7 +1563,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);
}
@@ -1582,6 +1587,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;