diff options
author | Jim Wilson <wilson@cygnus.com> | 1998-06-19 18:54:44 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1998-06-19 11:54:44 -0700 |
commit | 7e7ca3a1bd935133caa153c9c58c884641604959 (patch) | |
tree | 87e0bca439aa9c3eede052c05bebd84e9756863d /gcc/unroll.c | |
parent | 643a7267dfd1aae8deee17a411747a3699ec2691 (diff) | |
download | gcc-7e7ca3a1bd935133caa153c9c58c884641604959.zip gcc-7e7ca3a1bd935133caa153c9c58c884641604959.tar.gz gcc-7e7ca3a1bd935133caa153c9c58c884641604959.tar.bz2 |
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
Diffstat (limited to 'gcc/unroll.c')
-rw-r--r-- | gcc/unroll.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/unroll.c b/gcc/unroll.c index 46dc7ac..e3c43ff 100644 --- a/gcc/unroll.c +++ b/gcc/unroll.c @@ -2907,7 +2907,6 @@ find_splittable_givs (bl, unroll_type, loop_start, loop_end, increment, rtx tem = gen_reg_rtx (v->mode); record_base_value (REGNO (tem), v->add_val, 0); - v->unrolled = 1; /* If the address giv has a constant in its new_reg 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, 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 new_reg into it. This is not guaranteed to give a valid instruction on machines with complex addressing modes. |