diff options
author | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-05-05 15:47:48 +0000 |
---|---|---|
committer | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-05-05 15:47:48 +0000 |
commit | dffae35bcf6e3f57fbd540d18701c990696ceb2b (patch) | |
tree | 315ec9cbec1a9a0e83753a33232b1d7e14b8f756 /gcc/unroll.c | |
parent | 468c97e2155ac10eeaf87b636f372ddc4a67d685 (diff) | |
download | gcc-dffae35bcf6e3f57fbd540d18701c990696ceb2b.tar.gz |
* unroll.c (copy_loop_body): Don't copy VTOP notes from copy_notes_from.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26786 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/unroll.c')
-rw-r--r-- | gcc/unroll.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/unroll.c b/gcc/unroll.c index f1080aae701..7e584c961d0 100644 --- a/gcc/unroll.c +++ b/gcc/unroll.c @@ -2193,9 +2193,17 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration, { for (insn = copy_notes_from; insn != loop_end; insn = NEXT_INSN (insn)) { + /* VTOP notes are valid only before the loop exit test. + If placed anywhere else, loop may generate bad code. + There is no need to test for NOTE_INSN_LOOP_CONT notes + here, since COPY_NOTES_FROM will be at most one or two (for cc0) + instructions before the last insn in the loop, and if the + end test is that short, there will be a VTOP note between + the CONT note and the test. */ if (GET_CODE (insn) == NOTE && NOTE_LINE_NUMBER (insn) != NOTE_INSN_DELETED - && NOTE_LINE_NUMBER (insn) != NOTE_INSN_BASIC_BLOCK) + && NOTE_LINE_NUMBER (insn) != NOTE_INSN_BASIC_BLOCK + && NOTE_LINE_NUMBER (insn) != NOTE_INSN_LOOP_VTOP) emit_note (NOTE_SOURCE_FILE (insn), NOTE_LINE_NUMBER (insn)); } } |