diff options
author | Richard Henderson <rth@redhat.com> | 2002-02-07 19:36:35 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2002-02-07 19:36:35 -0800 |
commit | 5c7f5a5f556f11be24e728ed044c1f3e06612866 (patch) | |
tree | 12d5a23167dec00ec887438effdb7e200979e0b6 /gcc | |
parent | 9dd7fc76c707a3c0034d29092b39fb6f0c18abff (diff) | |
download | gcc-5c7f5a5f556f11be24e728ed044c1f3e06612866.zip gcc-5c7f5a5f556f11be24e728ed044c1f3e06612866.tar.gz gcc-5c7f5a5f556f11be24e728ed044c1f3e06612866.tar.bz2 |
loop.c (strength_reduce): Sink final_value when not eliminating a biv.
* loop.c (strength_reduce): Sink final_value when not
eliminating a biv.
From-SVN: r49606
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/loop.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 019a5ec..23bde4a 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 {. @@ -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 |