From: Jan Hubicka Date: Mon, 11 Jun 2001 13:49:24 +0000 (+0200) Subject: * jump.c (duplicate_loop_exit_test): Fix loop header heuristics. X-Git-Tag: prereleases/libstdc++-3.0.95~3851 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4bb83350d48a512294f661a484353481b97e7360;p=thirdparty%2Fgcc.git * jump.c (duplicate_loop_exit_test): Fix loop header heuristics. From-SVN: r43189 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c39562b2ca44..5f480ff643b4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Mon Jun 11 15:47:45 CEST 2001 Jan Hubicka + + * jump.c (duplicate_loop_exit_test): Fix loop header heuristics. + 2001-06-11 Joseph S. Myers * c-decl.c (store_parm_decls): When comparing types in an diff --git a/gcc/jump.c b/gcc/jump.c index 067b7aafcdc0..cc87b6876412 100644 --- a/gcc/jump.c +++ b/gcc/jump.c @@ -1257,10 +1257,11 @@ duplicate_loop_exit_test (loop_start) rtx label = JUMP_LABEL (copy); if (label) { - if (PREV_INSN (label) - && GET_CODE (PREV_INSN (label)) == NOTE - && (NOTE_LINE_NUMBER (PREV_INSN (label)) - == NOTE_INSN_LOOP_CONT)) + /* The jump_insn after loop_start should be followed + by barrier and loopback label. */ + if (prev_nonnote_insn (label) + && (PREV_INSN (prev_nonnote_insn (label)) + == NEXT_INSN (loop_start))) predict_insn_def (copy, PRED_LOOP_HEADER, TAKEN); else predict_insn_def (copy, PRED_LOOP_HEADER, NOT_TAKEN);