Commit cd423ead by Richard Kenner

(jump_optimize): When deleting a jump, properly set NEXT.

(duplicate_loop_exit_test): Don't insety NOTE_INSN_LOOP_VTOP before deleted
insn; insert first, then delete.

From-SVN: r8194
parent ba213285
...@@ -661,6 +661,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) ...@@ -661,6 +661,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
/* Detect jump to following insn. */ /* Detect jump to following insn. */
if (reallabelprev == insn && condjump_p (insn)) if (reallabelprev == insn && condjump_p (insn))
{ {
next = next_real_insn (JUMP_LABEL (insn));
delete_jump (insn); delete_jump (insn);
changed = 1; changed = 1;
continue; continue;
...@@ -2202,11 +2203,11 @@ duplicate_loop_exit_test (loop_start) ...@@ -2202,11 +2203,11 @@ duplicate_loop_exit_test (loop_start)
emit_barrier_before (loop_start); emit_barrier_before (loop_start);
} }
delete_insn (next_nonnote_insn (loop_start));
/* Mark the exit code as the virtual top of the converted loop. */ /* Mark the exit code as the virtual top of the converted loop. */
emit_note_before (NOTE_INSN_LOOP_VTOP, exitcode); emit_note_before (NOTE_INSN_LOOP_VTOP, exitcode);
delete_insn (next_nonnote_insn (loop_start));
return 1; return 1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment