Fix irix6 -g -O3 -funroll-all-loops bootstrap failure.
authorJim Wilson <wilson@cygnus.com>
Fri, 4 Sep 1998 10:37:49 +0000 (10:37 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Fri, 4 Sep 1998 10:37:49 +0000 (03:37 -0700)
* loop.c (load_mems): Fix JUMP_LABEL field after for_each_rtx call.

From-SVN: r22232

gcc/ChangeLog
gcc/loop.c

index f11cd17a0942b2774de5b060bf93e400cf792199..1b93cfdea3ba5257097ddcfd450aeca1e9530ba3 100644 (file)
@@ -1,3 +1,7 @@
+Fri Sep  4 10:37:07 1998  Jim Wilson  <wilson@cygnus.com>
+
+       * loop.c (load_mems): Fix JUMP_LABEL field after for_each_rtx call.
+
 Fri Sep  4 02:01:05 1998  David S. Miller  <davem@pierdol.cobaltmicro.com>
 
        * config/sparc/sparc.c (output_double_int): In all V9 symbolic
index ac091e93d412c6b90afa5ef2bc6ddb2da723beb2..63ebd0bbe68d6943c5c013b85339bc94c1a316f1 100644 (file)
@@ -8826,7 +8826,18 @@ load_mems (scan_start, end, loop_top, start)
       rr.r2 = label;
 
       for (p = start; p != end; p = NEXT_INSN (p))
-       for_each_rtx (&p, replace_label, &rr);
+       {
+         for_each_rtx (&p, replace_label, &rr);
+
+         /* If this is a JUMP_INSN, then we also need to fix the JUMP_LABEL
+            field.  This is not handled by for_each_rtx because it doesn't
+            handle unprinted ('0') fields.  We need to update JUMP_LABEL
+            because the immediately following unroll pass will use it.
+            replace_label would not work anyways, because that only handles
+            LABEL_REFs.  */
+         if (GET_CODE (p) == JUMP_INSN && JUMP_LABEL (p) == end_label)
+           JUMP_LABEL (p) = label;
+       }
     }
 }