summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-13 21:54:10 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-13 21:54:10 +0000
commite7d93d2e5512dbdc97960743e84f3daa268805f8 (patch)
treec409c04d90245a344cb5f9b78de84f492a8190e5
parente5eb2a2dfa9c3f985d5fec6e61410524846c3063 (diff)
downloadppe42-gcc-e7d93d2e5512dbdc97960743e84f3daa268805f8.tar.gz
ppe42-gcc-e7d93d2e5512dbdc97960743e84f3daa268805f8.zip
* unroll.c (loop_iterations): If we cannot prove iteration variable
is set once in each iteration, punt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38996 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/unroll.c15
2 files changed, 20 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index cea3dc86717..d775e76da5e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2001-01-13 Jakub Jelinek <jakub@redhat.com>
+
+ * unroll.c (loop_iterations): If we cannot prove iteration variable
+ is set once in each iteration, punt.
+
Sun Jan 14 00:23:15 2001 Denis Chertykov <denisc@overta.ru>
* config/avr/avr.md ("strlenhi"): Remove clobber of input address.
diff --git a/gcc/unroll.c b/gcc/unroll.c
index 11be66d89cc..9289595d039 100644
--- a/gcc/unroll.c
+++ b/gcc/unroll.c
@@ -3577,6 +3577,13 @@ loop_iterations (loop)
/* Grab initial value, only useful if it is a constant. */
bl = REG_IV_CLASS (ivs, REGNO (iteration_var));
initial_value = bl->initial_value;
+ if (!bl->biv->always_executed || bl->biv->maybe_multiple)
+ {
+ if (loop_dump_stream)
+ fprintf (loop_dump_stream,
+ "Loop iterations: Basic induction var not set once in each iteration.\n");
+ return 0;
+ }
increment = biv_total_increment (bl);
}
@@ -3589,6 +3596,14 @@ loop_iterations (loop)
if (REGNO (v->src_reg) >= ivs->n_regs)
abort ();
+ if (!v->always_executed || v->maybe_multiple)
+ {
+ if (loop_dump_stream)
+ fprintf (loop_dump_stream,
+ "Loop iterations: General induction var not set once in each iteration.\n");
+ return 0;
+ }
+
bl = REG_IV_CLASS (ivs, REGNO (v->src_reg));
/* Increment value is mult_val times the increment value of the biv. */
OpenPOWER on IntegriCloud