aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJ"orn Rennecke <amylaar@cygnus.co.uk>1999-08-02 22:50:49 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>1999-08-02 23:50:49 +0100
commite76d23764b387e9636b5d568b62531019f7f2273 (patch)
treee65c2ce9ff60d923389ab1b4fec1b80c5cc11cb3 /gcc
parent39c440fc3829fce3619b8c38b5637648b936f95b (diff)
downloadgcc-e76d23764b387e9636b5d568b62531019f7f2273.zip
gcc-e76d23764b387e9636b5d568b62531019f7f2273.tar.gz
gcc-e76d23764b387e9636b5d568b62531019f7f2273.tar.bz2
loop.c (strength_reduce): When doing biv->giv conversion, fix up reg_biv_class.
* loop.c (strength_reduce): When doing biv->giv conversion, fix up reg_biv_class. From-SVN: r28413
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/loop.c9
2 files changed, 13 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ec35439..d844319 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Mon Aug 2 23:46:45 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * loop.c (strength_reduce): When doing biv->giv conversion, fix up
+ reg_biv_class.
+
1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
* config/float-sparc.h: New file.
diff --git a/gcc/loop.c b/gcc/loop.c
index db50a18..0b02cc2 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -4072,6 +4072,7 @@ strength_reduce (scan_start, end, loop_top, insn_count,
fprintf (loop_dump_stream, "is giv of biv %d\n", bl2->regno);
/* Let this giv be discovered by the generic code. */
REG_IV_TYPE (bl->regno) = UNKNOWN_INDUCT;
+ reg_biv_class[bl->regno] = NULL_PTR;
/* We can get better optimization if we can move the giv setting
before the first giv use. */
if (dominator
@@ -4123,7 +4124,13 @@ strength_reduce (scan_start, end, loop_top, insn_count,
}
/* Remove this biv from the chain. */
if (bl->next)
- *bl = *bl->next;
+ {
+ /* We move the following giv from *bl->next into *bl.
+ We have to update reg_biv_class for that moved biv
+ to point to its new address. */
+ *bl = *bl->next;
+ reg_biv_class[bl->regno] = bl;
+ }
else
{
*backbl = 0;