diff options
author | Jeff Law <law@gcc.gnu.org> | 1993-05-07 11:15:01 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1993-05-07 11:15:01 -0600 |
commit | b2586fe0cbe611faf62d1c876afb306a897d8571 (patch) | |
tree | a580bad136d36ca5e399846c6526b244ae933126 | |
parent | 6cecf4ce3c74bc0b04b2de762de8b0123c1786b4 (diff) | |
download | gcc-b2586fe0cbe611faf62d1c876afb306a897d8571.zip gcc-b2586fe0cbe611faf62d1c876afb306a897d8571.tar.gz gcc-b2586fe0cbe611faf62d1c876afb306a897d8571.tar.bz2 |
loop.c (strength_reduce): Handle case where loop_end is the end of the current function.
* loop.c (strength_reduce): Handle case where loop_end is the
end of the current function.
From-SVN: r4378
-rw-r--r-- | gcc/loop.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -3148,9 +3148,15 @@ strength_reduce (scan_start, end, loop_top, insn_count, /* Save insn immediately after the loop_end. Insns inserted after loop_end must be put before this insn, so that they will appear in the right - order (i.e. loop order). */ + order (i.e. loop order). - end_insert_before = NEXT_INSN (loop_end); + If loop_end is the end of the current function, then emit a + NOTE_INSN_DELETED after loop_end and set end_insert_before to the + dummy note insn. */ + if (NEXT_INSN (loop_end) != 0) + end_insert_before = NEXT_INSN (loop_end); + else + end_insert_before = emit_note_after (NOTE_INSN_DELETED, loop_end); /* Scan through loop to find all possible bivs. */ |