OSDN Git Service

* jump.c (duplicate_loop_exit_test): Fix loop header heuristics.
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Jun 2001 13:49:24 +0000 (13:49 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Jun 2001 13:49:24 +0000 (13:49 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43189 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/jump.c

index c39562b..5f480ff 100644 (file)
@@ -1,3 +1,7 @@
+Mon Jun 11 15:47:45 CEST 2001  Jan Hubicka  <jh@suse.cz>
+
+       * jump.c (duplicate_loop_exit_test): Fix loop header heuristics.
+
 2001-06-11  Joseph S. Myers  <jsm28@cam.ac.uk>
 
        * c-decl.c (store_parm_decls): When comparing types in an
index 067b7aa..cc87b68 100644 (file)
@@ -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);