* ifcvt.c (find_cond_trap): Test for exit block.
authorRichard Henderson <rth@redhat.com>
Sun, 15 Jul 2001 00:00:56 +0000 (17:00 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Sun, 15 Jul 2001 00:00:56 +0000 (17:00 -0700)
From-SVN: r44009

gcc/ChangeLog
gcc/ifcvt.c

index bc4cfcffeda51ebb8f56ab4b2b9ef6e4a294c8e2..1d9c94dab2fb7653bd6f43652178fd5ee2082754 100644 (file)
@@ -1,3 +1,7 @@
+2001-04-14  Richard Henderson  <rth@redhat.com>
+
+       * ifcvt.c (find_cond_trap): Test for exit block.
+
 Sun Jul 15 00:50:20 CEST 2001  Jan Hubicka  <jh@suse.cz>
 
        Re-install recently reverted patch.
index 6196522d228ee9a872ed101abcc26a2c88800b39..d23fd3a76825d41b872de940ba54d9b66b63ec74 100644 (file)
@@ -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