unroll.c (copy_loop_body): Always properly update JUMP_LABEL and LABEL_NUSES.
authorJan Hubicka <jh@suse.cz>
Mon, 7 Jan 2002 11:00:39 +0000 (12:00 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Mon, 7 Jan 2002 11:00:39 +0000 (11:00 +0000)
* unroll.c (copy_loop_body): Always properly update JUMP_LABEL and
LABEL_NUSES.

From-SVN: r48600

gcc/ChangeLog
gcc/unroll.c

index 122981b288a20247e5ae4b779c7279434781ae36..ebae515e68a15ae303e493a2405a948854a45703 100644 (file)
@@ -1,3 +1,8 @@
+Mon Jan  7 11:59:34 CET 2002  Jan Hubicka  <jh@suse.cz>
+
+       * unroll.c (copy_loop_body): Always properly update JUMP_LABEL and
+       LABEL_NUSES.
+
 2002-01-07  Graham Stott  <grahams@redhat.com>
 
         * config/i386/i386.h: Update copyright date.
index 5f1560df2014de07a54fd39759df0e51ecf1f85b..f9fd669cde7252c9917b51d700b89d145d9e7041 100644 (file)
@@ -2073,14 +2073,16 @@ copy_loop_body (loop, copy_start, copy_end, map, exit_label, last_iteration,
          copy = emit_jump_insn (pattern);
          REG_NOTES (copy) = initial_reg_note_copy (REG_NOTES (insn), map);
 
-         if (JUMP_LABEL (insn) == start_label && insn == copy_end
-             && ! last_iteration)
+         if (JUMP_LABEL (insn))
            {
-             /* Update JUMP_LABEL make invert_jump work correctly.  */
              JUMP_LABEL (copy) = get_label_from_map (map,
                                                      CODE_LABEL_NUMBER
                                                      (JUMP_LABEL (insn)));
              LABEL_NUSES (JUMP_LABEL (copy))++;
+           }
+         if (JUMP_LABEL (insn) == start_label && insn == copy_end
+             && ! last_iteration)
+           {
 
              /* This is a branch to the beginning of the loop; this is the
                 last insn being copied; and this is not the last iteration.