summaryrefslogtreecommitdiff
path: root/gcc/loop.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2003-10-24 00:53:05 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2003-10-24 00:53:05 +0000
commit1b24cd79cbe08c9391202b83b39ec0d8a6e92800 (patch)
tree16169e3b0ae191a2517d3ca85d8440981607daa7 /gcc/loop.c
parent9ab791c04479a779de0a91bba2acc26a35fb8c2c (diff)
downloadgcc-1b24cd79cbe08c9391202b83b39ec0d8a6e92800.tar.gz
re PR middle-end/11414 (Segementation fault compiling csets.adb)
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. From-SVN: r72876
Diffstat (limited to 'gcc/loop.c')
-rw-r--r--gcc/loop.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index c5b40608142..667833d64a5 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -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 ();
}