aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/loop.c')
-rw-r--r--gcc/loop.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index 5c92ec3..f675a87 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -5143,6 +5143,11 @@ strength_reduce (loop, flags)
fprintf (loop_dump_stream, "Reg %d: biv eliminated\n",
bl->regno);
}
+ /* See above note wrt final_value. But since we couldn't eliminate
+ the biv, we must set the value after the loop instead of before. */
+ else if (bl->final_value && ! bl->reversed)
+ loop_insn_sink (loop, gen_move_insn (bl->biv->dest_reg,
+ bl->final_value));
}
/* Go through all the instructions in the loop, making all the