OSDN Git Service

PR middle-end/11414
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 24 Oct 2003 00:53:05 +0000 (00:53 +0000)
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 24 Oct 2003 00:53:05 +0000 (00:53 +0000)
* loop.c (load_mems): Use redirect_jump to forward jumps from
the original loop end label to the new "loop sink" block's label.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72876 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/loop.c

index e29d3bc..e414c23 100644 (file)
@@ -1,5 +1,11 @@
 2003-10-23  Roger Sayle  <roger@eyesopen.com>
 
+       PR middle-end/11414
+       * loop.c (load_mems): Use redirect_jump to forward jumps from
+       the original loop end label to the new "loop sink" block's label.
+
+2003-10-23  Roger Sayle  <roger@eyesopen.com>
+
        PR middle-end/12705
        * optabs.c (expand_binop): When expanding complex operations
        inline, always calculate result into a new temporary register.
index c5b4060..667833d 100644 (file)
@@ -10005,20 +10005,12 @@ load_mems (const struct loop *loop)
        }
     }
 
+  /* Now, we need to replace all references to the previous exit
+     label with the new one.  */
   if (label != NULL_RTX && end_label != NULL_RTX)
-    {
-      /* Now, we need to replace all references to the previous exit
-        label with the new one.  */
-      replace_label_data rr;
-      rr.r1 = end_label;
-      rr.r2 = label;
-      rr.update_label_nuses = true;
-
-      for (p = loop->start; p != loop->end; p = NEXT_INSN (p))
-       {
-         for_each_rtx (&p, replace_label, &rr);
-       }
-    }
+    for (p = loop->start; p != loop->end; p = NEXT_INSN (p))
+      if (GET_CODE (p) == JUMP_INSN && JUMP_LABEL (p) == end_label)
+       redirect_jump (p, label, false);
 
   cselib_finish ();
 }