(copy_loop_body): When delete simplified condjump,
authorJim Wilson <wilson@gcc.gnu.org>
Tue, 25 Jan 1994 00:19:48 +0000 (16:19 -0800)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 25 Jan 1994 00:19:48 +0000 (16:19 -0800)
protect the label, so that it doesn't get deleted also.

From-SVN: r6428

gcc/unroll.c

index eac1e955aa17f021fd272b688a5be50a8307f5c0..20ab17b0dfc9c4fa3478b1be8a2d44ff43eed71b 100644 (file)
@@ -1830,7 +1830,14 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration,
              /* If this is now a no-op, delete it.  */
              if (map->last_pc_value == pc_rtx)
                {
+                 /* Don't let delete_insn delete the label referenced here,
+                    because we might possibly need it later for some other
+                    instruction in the loop.  */
+                 if (JUMP_LABEL (copy))
+                   LABEL_NUSES (JUMP_LABEL (copy))++;
                  delete_insn (copy);
+                 if (JUMP_LABEL (copy))
+                   LABEL_NUSES (JUMP_LABEL (copy))--;
                  copy = 0;
                }
              else