This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
2.95: loop optimizer fix
- To: <gcc-patches at gcc dot gnu dot org>
- Subject: 2.95: loop optimizer fix
- From: Bernd Schmidt <bernds at redhat dot com>
- Date: Mon, 1 Jan 2001 18:43:39 +0000 (GMT)
This prevents a crash (on ppc targets) in flow for a test case sent to me by
Roger W. Brown.
Bernd
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ChangeLog,v
retrieving revision 1.3667.4.317
diff -u -p -r1.3667.4.317 ChangeLog
--- ChangeLog 2001/01/01 17:54:53 1.3667.4.317
+++ ChangeLog 2001/01/01 18:41:36
@@ -2,6 +2,8 @@
* version.c: Bump.
+ * loop.c (instrument_loop_bct): Set JUMP_LABEL on new jump.
+
2000-12-27 Geoffrey Keating <geoffk@redhat.com>
* config/rs6000/rs6000.md (define_attr "length"): Correct
calculation.
Index: loop.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/loop.c,v
retrieving revision 1.156.4.17
diff -u -p -r1.156.4.17 loop.c
--- loop.c 2000/12/20 13:52:54 1.156.4.17
+++ loop.c 2001/01/01 18:41:39
@@ -9386,6 +9386,7 @@ instrument_loop_bct (loop_start, loop_en
emit_jump_insn_before (gen_decrement_and_branch_on_count (counter_reg,
start_label),
loop_end);
+ JUMP_LABEL (prev_nonnote_insn (loop_end)) = start_label;
LABEL_NUSES (start_label)++;
}