Commit 7e7ca3a1 by Jim Wilson Committed by Jim Wilson

Fix hpux loop unrolling bug reported by Tim Prince.

	* loop.h (struct induction): Clarify comment for unrolled field.
	* unroll.c (find_splittable_givs): Move set of unrolled field
	after address validity check.

From-SVN: r20598
parent 643a7267
1998-06-19 Jim Wilson <wilson@cygnus.com>
* loop.h (struct induction): Clarify comment for unrolled field.
* unroll.c (find_splittable_givs): Move set of unrolled field
after address validity check.
Fri Jun 19 18:38:04 1998 Michael Meissner <meissner@cygnus.com> Fri Jun 19 18:38:04 1998 Michael Meissner <meissner@cygnus.com>
* config/fp-bit.c (INLINE): Only define if not already defined. * config/fp-bit.c (INLINE): Only define if not already defined.
......
...@@ -92,8 +92,8 @@ struct induction ...@@ -92,8 +92,8 @@ struct induction
would probably lose. */ would probably lose. */
unsigned auto_inc_opt : 1; /* 1 if this giv had its increment output next unsigned auto_inc_opt : 1; /* 1 if this giv had its increment output next
to it to try to form an auto-inc address. */ to it to try to form an auto-inc address. */
unsigned unrolled : 1; /* 1 if new register has been allocated in unsigned unrolled : 1; /* 1 if new register has been allocated and
unrolled loop. */ initialized in unrolled loop. */
unsigned shared : 1; unsigned shared : 1;
int lifetime; /* Length of life of this giv */ int lifetime; /* Length of life of this giv */
int times_used; /* # times this giv is used. */ int times_used; /* # times this giv is used. */
......
...@@ -2907,7 +2907,6 @@ find_splittable_givs (bl, unroll_type, loop_start, loop_end, increment, ...@@ -2907,7 +2907,6 @@ find_splittable_givs (bl, unroll_type, loop_start, loop_end, increment,
rtx tem = gen_reg_rtx (v->mode); rtx tem = gen_reg_rtx (v->mode);
record_base_value (REGNO (tem), v->add_val, 0); record_base_value (REGNO (tem), v->add_val, 0);
v->unrolled = 1;
/* If the address giv has a constant in its new_reg value, /* If the address giv has a constant in its new_reg value,
then this constant can be pulled out and put in value, then this constant can be pulled out and put in value,
...@@ -2960,6 +2959,10 @@ find_splittable_givs (bl, unroll_type, loop_start, loop_end, increment, ...@@ -2960,6 +2959,10 @@ find_splittable_givs (bl, unroll_type, loop_start, loop_end, increment,
continue; continue;
} }
/* We set this after the address check, to guarantee that
the register will be initialized. */
v->unrolled = 1;
/* To initialize the new register, just move the value of /* To initialize the new register, just move the value of
new_reg into it. This is not guaranteed to give a valid new_reg into it. This is not guaranteed to give a valid
instruction on machines with complex addressing modes. instruction on machines with complex addressing modes.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment