From 7940acc401ef788bf2e287bd77250a3a125c9e80 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Fri, 4 Sep 1998 10:37:49 +0000 Subject: [PATCH] Fix irix6 -g -O3 -funroll-all-loops bootstrap failure. * loop.c (load_mems): Fix JUMP_LABEL field after for_each_rtx call. From-SVN: r22232 --- gcc/ChangeLog | 4 ++++ gcc/loop.c | 13 ++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f11cd17a094..1b93cfdea3b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Fri Sep 4 10:37:07 1998 Jim Wilson + + * loop.c (load_mems): Fix JUMP_LABEL field after for_each_rtx call. + Fri Sep 4 02:01:05 1998 David S. Miller * config/sparc/sparc.c (output_double_int): In all V9 symbolic diff --git a/gcc/loop.c b/gcc/loop.c index ac091e93d41..63ebd0bbe68 100644 --- a/gcc/loop.c +++ b/gcc/loop.c @@ -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; + } } } -- 2.30.2