summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorFranz Sirl <Franz.Sirl-kernel@lauterbach.com>2001-02-25 00:08:01 +0000
committerFranz Sirl <sirl@gcc.gnu.org>2001-02-25 00:08:01 +0000
commitc7b306770070affddc81bcf409e1b1420f49c35d (patch)
treec66d79240411c9adfee5a681888a862805dd86ac /gcc
parentbd015d378330fc78f85d28ed8c094837e23baca8 (diff)
downloadgcc-c7b306770070affddc81bcf409e1b1420f49c35d.tar.gz
loop.c (check_dbra_loop): A biv has uses besides counting if it is used to set another biv.
2001-02-24 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> * loop.c (check_dbra_loop): A biv has uses besides counting if it is used to set another biv. From-SVN: r40042
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/loop.c9
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 00ce4bd4348..d363794c076 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2001-02-24 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
+
+ * loop.c (check_dbra_loop): A biv has uses besides counting if it is
+ used to set another biv.
+
Sat Feb 24 06:45:21 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* tree.h (BLOCK_DEAD): New macro.
diff --git a/gcc/loop.c b/gcc/loop.c
index 252e27eb087..7eb4d0df450 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -7259,6 +7259,7 @@ check_dbra_loop (loop, insn_count)
if (bl->giv_count == 0 && ! loop->exit_count)
{
rtx bivreg = regno_reg_rtx[bl->regno];
+ struct iv_class *blt;
/* If there are no givs for this biv, and the only exit is the
fall through at the end of the loop, then
@@ -7295,6 +7296,14 @@ check_dbra_loop (loop, insn_count)
break;
}
}
+
+ /* A biv has uses besides counting if it is used to set another biv. */
+ for (blt = ivs->list; blt; blt = blt->next)
+ if (blt->init_set && reg_mentioned_p (bivreg, SET_SRC (blt->init_set)))
+ {
+ no_use_except_counting = 0;
+ break;
+ }
}
if (no_use_except_counting)