summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-08 03:36:35 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-08 03:36:35 +0000
commitd2aa2d17ec7846b227792204623ff71c43ebfade (patch)
tree12d5a23167dec00ec887438effdb7e200979e0b6
parent3ff150a90f5a17e6311251cd33bf904baf9ffaac (diff)
downloadppe42-gcc-d2aa2d17ec7846b227792204623ff71c43ebfade.tar.gz
ppe42-gcc-d2aa2d17ec7846b227792204623ff71c43ebfade.zip
* loop.c (strength_reduce): Sink final_value when not
eliminating a biv. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49606 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/loop.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 019a5eccf63..23bde4ae480 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2002-02-07 Richard Henderson <rth@redhat.com>
+
+ * loop.c (strength_reduce): Sink final_value when not
+ eliminating a biv.
+
2002-02-07 David O'Brien <obrien@FreeBSD.org>
* config/sparc/freebsd.h: Fix mismatched spec {.
diff --git a/gcc/loop.c b/gcc/loop.c
index 5c92ec37cf2..f675a87f0de 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
OpenPOWER on IntegriCloud