]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* cse.c (cse_basic_block): Skip note instructions.
authorRoman Zippel <zippel@linux-m68k.org>
Tue, 28 Aug 2001 01:29:48 +0000 (01:29 +0000)
committerRichard Henderson <rth@gcc.gnu.org>
Tue, 28 Aug 2001 01:29:48 +0000 (18:29 -0700)
From-SVN: r45221

gcc/ChangeLog
gcc/cse.c

index 8b6260462c93734ee8844db88dbc7b94d3aeec63..65ef6910bf0c76381f5b58bff915cd73d297f6c9 100644 (file)
@@ -1,3 +1,7 @@
+2001-08-27  Roman Zippel  <zippel@linux-m68k.org>
+        
+       * cse.c (cse_basic_block): Skip note instructions.
+
 2001-08-27  Richard Henderson  <rth@redhat.com>
 
        * combine.c (combine_simplify_rtx): Don't reverse condition
index 8ab41a0e8c3f6fb074601607540fe391a89ddc34..a870919ddb6786cdd84830e4d5de5ff2095c1b35 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -7354,14 +7354,15 @@ cse_basic_block (from, to, next_branch, around_loop)
      we can cse into the loop.  Don't do this if we changed the jump
      structure of a loop unless we aren't going to be following jumps.  */
 
+  insn = prev_nonnote_insn(to);
   if ((cse_jumps_altered == 0
        || (flag_cse_follow_jumps == 0 && flag_cse_skip_blocks == 0))
       && around_loop && to != 0
       && GET_CODE (to) == NOTE && NOTE_LINE_NUMBER (to) == NOTE_INSN_LOOP_END
-      && GET_CODE (PREV_INSN (to)) == JUMP_INSN
-      && JUMP_LABEL (PREV_INSN (to)) != 0
-      && LABEL_NUSES (JUMP_LABEL (PREV_INSN (to))) == 1)
-    cse_around_loop (JUMP_LABEL (PREV_INSN (to)));
+      && GET_CODE (insn) == JUMP_INSN
+      && JUMP_LABEL (insn) != 0
+      && LABEL_NUSES (JUMP_LABEL (insn)) == 1)
+    cse_around_loop (JUMP_LABEL (insn));
 
   free (qty_table + max_reg);