diff options
author | J"orn Rennecke <amylaar@cygnus.co.uk> | 1999-06-09 14:09:50 +0000 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 1999-06-09 15:09:50 +0100 |
commit | 7c2772f1052c66bd8f3b22697967f7823a52fd5a (patch) | |
tree | 41422384629654787fb37678478e1b1115b423fd /gcc | |
parent | ff27cf73c281adc0d840af5dd9e33cb0083cee02 (diff) | |
download | gcc-7c2772f1052c66bd8f3b22697967f7823a52fd5a.zip gcc-7c2772f1052c66bd8f3b22697967f7823a52fd5a.tar.gz gcc-7c2772f1052c66bd8f3b22697967f7823a52fd5a.tar.bz2 |
loop.c (loop_insn_first_p): Don't compare LUIDs when P is a note...
* loop.c (loop_insn_first_p): Don't compare LUIDs when P
is a note; use <= for the compare; advance P while it is
a NOTE.
From-SVN: r27454
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/loop.c | 11 |
2 files changed, 14 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c0b2113..eff5e8a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Wed Jun 9 19:44:26 1999 J"orn Rennecke <amylaar@cygnus.co.uk> + + * loop.c (loop_insn_first_p): Don't compare LUIDs when P + is a note; use <= for the compare; advance P while it is + a NOTE. + Wed Jun 9 13:12:24 1999 Jeffrey A Law (law@cygnus.com) * varasm.c (remove_from_pending_weak_list): Verify t->name @@ -8199,11 +8199,16 @@ loop_insn_first_p (insn, reference) if (p == reference || ! q) return 1; + /* Either of P or Q might be a NOTE. Notes have the same LUID as the + previous insn, hence the <= comparison below does not work if + P is a note. */ if (INSN_UID (p) < max_uid_for_loop - && INSN_UID (q) < max_uid_for_loop) - return INSN_LUID (p) < INSN_LUID (q); + && INSN_UID (q) < max_uid_for_loop + && GET_CODE (p) != NOTE) + return INSN_LUID (p) <= INSN_LUID (q); - if (INSN_UID (p) >= max_uid_for_loop) + if (INSN_UID (p) >= max_uid_for_loop + || GET_CODE (p) == NOTE) p = NEXT_INSN (p); if (INSN_UID (q) >= max_uid_for_loop) q = NEXT_INSN (q); |