summaryrefslogtreecommitdiff
path: root/gcc/cfgcleanup.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-17 18:21:36 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-17 18:21:36 +0000
commit337b10d00ca488991803fd259f9a171853c744e9 (patch)
tree413a06c281d1569f06425c84cdf18e23f84456a7 /gcc/cfgcleanup.c
parent996d1ecf2fd33bcaca1c32982cf1e69ce1833bb9 (diff)
downloadgcc-337b10d00ca488991803fd259f9a171853c744e9.tar.gz
* cfgcleanup.c (outgoing_edges_match): Check for insn match with
a single outgoing edge too. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48114 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgcleanup.c')
-rw-r--r--gcc/cfgcleanup.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index d13e3a05349..b23def8b3bc 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. */