summaryrefslogtreecommitdiff
path: root/gcc/ifcvt.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-15 00:00:56 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-15 00:00:56 +0000
commitde5f07bf6960e691e2d030ab536868492bc83bad (patch)
tree52dcf09cd9b00175c467bfceb2cdbc249e5e2986 /gcc/ifcvt.c
parentbf73fcf48e043c1ab310c5b7d71d618b5ca106a8 (diff)
downloadgcc-de5f07bf6960e691e2d030ab536868492bc83bad.tar.gz
* ifcvt.c (find_cond_trap): Test for exit block.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44009 138bc75d-0d04-0410-961f-82ee72b054a4
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 6196522d228..d23fd3a7682 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