flow.c (merge_blocks_move_successor_nojumps): Delete the BARRIER at the end of the...
authorJeffrey A Law <law@cygnus.com>
Tue, 21 Sep 1999 14:47:23 +0000 (14:47 +0000)
committerJeff Law <law@gcc.gnu.org>
Tue, 21 Sep 1999 14:47:23 +0000 (08:47 -0600)
        * flow.c (merge_blocks_move_successor_nojumps): Delete the
        BARRIER at the end of the successor, not the BARRIER before
        the successor.

From-SVN: r29545

gcc/ChangeLog
gcc/flow.c

index 9bdf981d20ef5626ec4adae0f4b9008bffd96fb3..38e0c153d459644bebdfad3081fccba65a8b27cc 100644 (file)
@@ -1,5 +1,9 @@
 Tue Sep 21 06:45:31 1999  Jeffrey A Law  (law@cygnus.com)
 
+       * flow.c (merge_blocks_move_successor_nojumps): Delete the
+       BARRIER at the end of the successor, not the BARRIER before
+       the successor.
+
        * pa.c (pa_add_gc_roots): Fix thinko in last change.
 
 Tue Sep 21 05:29:17 1999  Richard Earnshaw (rearnsha@arm.com)
index 988ccc75e8b52c068ea8936e0a41b54461d919f8..95743d882eb7905c69891f270f9f96763244f53d 100644 (file)
@@ -1907,10 +1907,13 @@ merge_blocks_move_successor_nojumps (e, a, b)
   end = b->end;
   insertpoint = a->end;
 
-  /* We want to delete the BARRIER before the start of the insns we are
+  /* We want to delete the BARRIER after the end of the insns we are
      going to move.  If we don't find a BARRIER, then do nothing.  This
-     can happen in some cases if we have labels we can not delete.  */
-  barrier = prev_nonnote_insn (start);
+     can happen in some cases if we have labels we can not delete. 
+
+     Similarly, do nothing if we can not delete the label at the start
+     of the target block.  */
+  barrier = next_nonnote_insn (end);
   if (GET_CODE (barrier) != BARRIER
       || (GET_CODE (b->head) == CODE_LABEL
          && ! can_delete_label_p (b->head)))