aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-06-26 19:17:37 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1995-06-26 19:17:37 -0400
commitf47f2c17db22e355a48c7aa99ff3ce4529f24b80 (patch)
treef2e4130180fa5dec890cac26daadb178578c542a
parent0184223489d6ddf887c169e01dc9cd7325677fbc (diff)
downloadgcc-f47f2c17db22e355a48c7aa99ff3ce4529f24b80.zip
gcc-f47f2c17db22e355a48c7aa99ff3ce4529f24b80.tar.gz
gcc-f47f2c17db22e355a48c7aa99ff3ce4529f24b80.tar.bz2
(find_splittable_regs): When completely unrolling loop, check for
non-invariant initial biv values. From-SVN: r10056
-rw-r--r--gcc/unroll.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/unroll.c b/gcc/unroll.c
index 0d6e693..76543d9 100644
--- a/gcc/unroll.c
+++ b/gcc/unroll.c
@@ -2397,12 +2397,13 @@ find_splittable_regs (unroll_type, loop_start, loop_end, end_insert_before,
{
/* If the initial value of the biv is itself (i.e. it is too
complicated for strength_reduce to compute), or is a hard
- register, then we must create a new pseudo reg to hold the
- initial value of the biv. */
+ register, or it isn't invariant, then we must create a new
+ pseudo reg to hold the initial value of the biv. */
if (GET_CODE (bl->initial_value) == REG
&& (REGNO (bl->initial_value) == bl->regno
- || REGNO (bl->initial_value) < FIRST_PSEUDO_REGISTER))
+ || REGNO (bl->initial_value) < FIRST_PSEUDO_REGISTER
+ || ! invariant_p (bl->initial_value)))
{
rtx tem = gen_reg_rtx (bl->biv->mode);