cfgcleanup.c (try_simplify_condjump): Update test to make sure we have a conditional...
authorJ"orn Rennecke <joern.rennecke@superh.com>
Wed, 16 Jun 2004 18:03:11 +0000 (18:03 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Wed, 16 Jun 2004 18:03:11 +0000 (19:03 +0100)
* cfgcleanup.c (try_simplify_condjump): Update test to make
sure we have a conditional branch around am unconditional branch.

From-SVN: r83254

gcc/ChangeLog
gcc/cfgcleanup.c

index 99ae2a256a552fc7cb0ee20ae7095d236bbb354a..ace0f8d9a3c873bcccfe025a61afa43d674ce226 100644 (file)
@@ -1,3 +1,8 @@
+2004-06-16  J"orn Rennecke <joern.rennecke@superh.com>
+
+       * cfgcleanup.c (try_simplify_condjump): Update test to make
+       sure we have a conditional branch around am unconditional branch.
+
 2004-06-16  Daniel Berlin  <dberlin@dberlin.org>
 
        * tree-cfg.c (pass_split_crit_edge): Give it a name and a dump file.
index 90c1f9b8f31d864cb1102e5073edfb93abb10fde..2616a23d07e510b4d9b86c0dc9305943d8496670 100644 (file)
@@ -163,7 +163,8 @@ try_simplify_condjump (basic_block cbranch_block)
      unconditional branch.  */
   cbranch_dest_block = cbranch_jump_edge->dest;
 
-  if (!can_fallthru (jump_block, cbranch_dest_block))
+  if (cbranch_dest_block == EXIT_BLOCK_PTR
+      || !can_fallthru (jump_block, cbranch_dest_block))
     return false;
 
   /* Invert the conditional branch.  */