aboutsummaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2001-08-28 01:29:48 +0000
committerRichard Henderson <rth@gcc.gnu.org>2001-08-27 18:29:48 -0700
commitb5a696fb77de13c828495626919dcd1f5507fddc (patch)
treed019ebe7616fcb21468f64c393f960115b5666ea /gcc/cse.c
parentfa4e13e0355e5e50f96bde424b27555aa2630527 (diff)
downloadgcc-b5a696fb77de13c828495626919dcd1f5507fddc.zip
gcc-b5a696fb77de13c828495626919dcd1f5507fddc.tar.gz
gcc-b5a696fb77de13c828495626919dcd1f5507fddc.tar.bz2
* cse.c (cse_basic_block): Skip note instructions.
From-SVN: r45221
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index 8ab41a0..a870919 100644
--- 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);