diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1992-08-11 12:42:35 -0700 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1992-08-11 12:42:35 -0700 |
commit | 715e6efb423ec714465e1c187616db850d48a7d0 (patch) | |
tree | 9434d9f136eaff025f97065e4fa442780115c0d6 | |
parent | 899eb12d04c95c768dad93b88c24f0edfd100886 (diff) | |
download | gcc-715e6efb423ec714465e1c187616db850d48a7d0.zip gcc-715e6efb423ec714465e1c187616db850d48a7d0.tar.gz gcc-715e6efb423ec714465e1c187616db850d48a7d0.tar.bz2 |
(copy_loop_body): Only copy VTOP note if it will end up
before a loop exit test.
From-SVN: r1796
-rw-r--r-- | gcc/unroll.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/unroll.c b/gcc/unroll.c index f8c2fca..18ab396 100644 --- a/gcc/unroll.c +++ b/gcc/unroll.c @@ -1807,7 +1807,12 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration, break; case NOTE: - if (NOTE_LINE_NUMBER (insn) != NOTE_INSN_DELETED) + /* VTOP notes are valid only before the loop exit test. If placed + anywhere else, loop may generate bad code. */ + + if (NOTE_LINE_NUMBER (insn) != NOTE_INSN_DELETED + && (NOTE_LINE_NUMBER (insn) != NOTE_INSN_LOOP_VTOP + || (last_iteration && unroll_type != UNROLL_COMPLETELY))) copy = emit_note (NOTE_SOURCE_FILE (insn), NOTE_LINE_NUMBER (insn)); else |