aboutsummaryrefslogtreecommitdiff
path: root/gcc/unroll.c
diff options
context:
space:
mode:
authorGraham Stott <grahams@redhat.com>2002-02-27 15:01:10 +0000
committerGraham Stott <grahams@gcc.gnu.org>2002-02-27 15:01:10 +0000
commit8ed805d20c65c2b262321b16c2825d9df5836c97 (patch)
tree7ed483297ee6b822dfdfa7fc51773ad97b0b8418 /gcc/unroll.c
parentfd478a0ad4be8fe0f7b1d2b50c01a4a8fc6a8ea9 (diff)
downloadgcc-8ed805d20c65c2b262321b16c2825d9df5836c97.zip
gcc-8ed805d20c65c2b262321b16c2825d9df5836c97.tar.gz
gcc-8ed805d20c65c2b262321b16c2825d9df5836c97.tar.bz2
unroll.c (loop_iterations): Return 0 if the add_val for a BIV is REG.
* unroll.c (loop_iterations): Return 0 if the add_val for a BIV is REG. From-SVN: r50100
Diffstat (limited to 'gcc/unroll.c')
-rw-r--r--gcc/unroll.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/unroll.c b/gcc/unroll.c
index 9a0cfcf..2b94147 100644
--- a/gcc/unroll.c
+++ b/gcc/unroll.c
@@ -3744,7 +3744,18 @@ loop_iterations (loop)
for (biv_inc = bl->biv; biv_inc; biv_inc = biv_inc->next_iv)
{
if (loop_insn_first_p (v->insn, biv_inc->insn))
- offset -= INTVAL (biv_inc->add_val);
+ {
+ if (REG_P (biv_inc->add_val))
+ {
+ if (loop_dump_stream)
+ fprintf (loop_dump_stream,
+ "Loop iterations: Basic induction var add_val is REG %d.\n",
+ REGNO (biv_inc->add_val));
+ return 0;
+ }
+
+ offset -= INTVAL (biv_inc->add_val);
+ }
}
}
if (loop_dump_stream)