c6x.c (hwloop_optimize): Handle case where the old iteration reg is used after the loop.

* config/c6x/c6x.c (hwloop_optimize): Handle case where the old
	iteration reg is used after the loop.

From-SVN: r246160
This commit is contained in:
Bernd Schmidt 2017-03-15 13:36:50 +00:00 committed by Bernd Schmidt
parent d579c38510
commit 6c194efb23
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2017-03-15 Bernd Schmidt <bschmidt@redhat.com>
* config/c6x/c6x.c (hwloop_optimize): Handle case where the old
iteration reg is used after the loop.
2017-03-14 Martin Sebor <msebor@redhat.com>
PR tree-optimization/79800

View File

@ -5789,8 +5789,9 @@ hwloop_optimize (hwloop_info loop)
start_sequence ();
insn = emit_insn (gen_mvilc (loop->iter_reg));
if (loop->iter_reg_used_outside)
insn = emit_move_insn (loop->iter_reg, const0_rtx);
insn = emit_insn (gen_sploop (GEN_INT (sp_ii)));
seq = get_insns ();
if (!single_succ_p (entry_bb) || vec_safe_length (loop->incoming) > 1)