]> gcc.gnu.org Git - gcc.git/commitdiff
Fix hpux loop unrolling bug reported by Tim Prince.
authorJim Wilson <wilson@cygnus.com>
Fri, 19 Jun 1998 18:54:44 +0000 (18:54 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Fri, 19 Jun 1998 18:54:44 +0000 (11:54 -0700)
* 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

gcc/ChangeLog
gcc/loop.h
gcc/unroll.c

index ee5700f5df5d6c02fc189efc2a45f1c0e889612d..73465c726d2e9680fa1830661ce2ea7ff29a9246 100644 (file)
@@ -1,3 +1,9 @@
+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>
 
        * config/fp-bit.c (INLINE): Only define if not already defined.
index 8a92a321185a29824f65ae5f4558b7c57051dad7..25c16f0d89b8dbd0e74c13a84a41c6de6bfb4d4b 100644 (file)
@@ -92,8 +92,8 @@ struct induction
                                   would probably lose. */
   unsigned auto_inc_opt : 1;   /* 1 if this giv had its increment output next
                                   to it to try to form an auto-inc address. */
-  unsigned unrolled : 1;       /* 1 if new register has been allocated in
-                                  unrolled loop.  */
+  unsigned unrolled : 1;       /* 1 if new register has been allocated and
+                                  initialized in unrolled loop.  */
   unsigned shared : 1;
   int lifetime;                        /* Length of life of this giv */
   int times_used;              /* # times this giv is used. */
index 46dc7ac4499bb421dbd9cf61845a9e416b05fdf8..e3c43ff9e463665439685c7465084e307033306b 100644 (file)
@@ -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.
This page took 0.070868 seconds and 5 git commands to generate.