aboutsummaryrefslogtreecommitdiff
path: root/gcc/ifcvt.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2001-07-14 17:00:56 -0700
committerRichard Henderson <rth@gcc.gnu.org>2001-07-14 17:00:56 -0700
commit35cbdf6fefe1ceb2b824856874337b7ee47662e5 (patch)
tree52dcf09cd9b00175c467bfceb2cdbc249e5e2986 /gcc/ifcvt.c
parent1e5fd09422a5b2e3b8bd8b7ee7cb38bed193f984 (diff)
downloadgcc-35cbdf6fefe1ceb2b824856874337b7ee47662e5.zip
gcc-35cbdf6fefe1ceb2b824856874337b7ee47662e5.tar.gz
gcc-35cbdf6fefe1ceb2b824856874337b7ee47662e5.tar.bz2
* ifcvt.c (find_cond_trap): Test for exit block.
From-SVN: r44009
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r--gcc/ifcvt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 6196522..d23fd3a 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -2018,6 +2018,11 @@ find_cond_trap (test_bb, then_edge, else_edge)
else
return FALSE;
+ /* Don't confuse a conditional return with something we want to
+ optimize here. */
+ if (trap_bb == EXIT_BLOCK_PTR)
+ return FALSE;
+
/* The only instruction in the THEN block must be the trap. */
trap = first_active_insn (trap_bb);
if (! (trap == trap_bb->end