aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2001-12-17 10:21:36 -0800
committerRichard Henderson <rth@gcc.gnu.org>2001-12-17 10:21:36 -0800
commitc04cf67b3ffc8b8e6e6833b8e383299e74211abb (patch)
tree413a06c281d1569f06425c84cdf18e23f84456a7
parent25b44be580d5a9dd0bde5802c82c758890a057ab (diff)
downloadgcc-c04cf67b3ffc8b8e6e6833b8e383299e74211abb.zip
gcc-c04cf67b3ffc8b8e6e6833b8e383299e74211abb.tar.gz
gcc-c04cf67b3ffc8b8e6e6833b8e383299e74211abb.tar.bz2
cfgcleanup.c (outgoing_edges_match): Check for insn match with a single outgoing edge too.
* cfgcleanup.c (outgoing_edges_match): Check for insn match with a single outgoing edge too. From-SVN: r48114
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/cfgcleanup.c11
2 files changed, 12 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 289bec3..e508636 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2001-12-17 Richard Henderson <rth@redhat.com>
+
+ * cfgcleanup.c (outgoing_edges_match): Check for insn match with
+ a single outgoing edge too.
+
Mon Dec 17 18:27:52 CET 2001 Jan Hubicka <jh@suse.cz>
* cfgrtl.c (redirect_edge_and_branch): Do simplify abnormal
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index d13e3a0..b23def8 100644
--- a/gcc/cfgcleanup.c
+++ b/gcc/cfgcleanup.c
@@ -956,11 +956,14 @@ outgoing_edges_match (mode, bb1, bb2)
edge fallthru1 = 0, fallthru2 = 0;
edge e1, e2;
- /* If BB1 has only one successor, we must be looking at an unconditional
- jump. Which, by the assumption above, means that we only need to check
- that BB2 has one successor. */
+ /* 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)
- return (bb2->succ && !bb2->succ->succ_next);
+ {
+ if (! bb2->succ || bb2->succ->succ_next)
+ return false;
+ return insns_match_p (mode, bb1->end, bb2->end);
+ }
/* Match conditional jumps - this may get tricky when fallthru and branch
edges are crossed. */