]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
unroll.c (loop_iterations): Don't abort if REG_USERVAR_P set on iteration_var.
authorJeffrey A Law <law@cygnus.com>
Mon, 3 Apr 2000 08:35:12 +0000 (08:35 +0000)
committerJeff Law <law@gcc.gnu.org>
Mon, 3 Apr 2000 08:35:12 +0000 (02:35 -0600)
        2000-01-20  Michael Hayes  <m.hayes@elec.canterbury.ac.nz>
        * unroll.c (loop_iterations): Don't abort if REG_USERVAR_P set
        on iteration_var.

From-SVN: r32879

gcc/ChangeLog
gcc/unroll.c

index f1364d1c8d1f8863e94ab3b2149024438e5f826c..26253bf87b0042dd69250e3d9e468e36ada285f4 100644 (file)
@@ -1,3 +1,9 @@
+Mon Apr  3 02:31:32 2000  Jeffrey A Law  (law@cygnus.com)
+
+       2000-01-20  Michael Hayes  <m.hayes@elec.canterbury.ac.nz>
+        * unroll.c (loop_iterations): Don't abort if REG_USERVAR_P set
+        on iteration_var.
+
 Wed Mar 22 13:11:54 2000  David Edelsohn  <edelsohn@gnu.org>
 
        * rs6000.c (reg_or_u_cint_operand): New function.
index d6dbcf0fbc1d151382bbb30773d1bb03d661cec8..376bc996678b803f76a264efe438cd3f94dc5e57 100644 (file)
@@ -3682,10 +3682,14 @@ loop_iterations (loop_start, loop_end, loop_info)
       return 0;
     }
 
-  /* The only new registers that care created before loop iterations are
-     givs made from biv increments, so this should never occur.  */
-
-  if ((unsigned) REGNO (iteration_var) >= reg_iv_type->num_elements)
+  /* The only new registers that are created before loop iterations
+     are givs made from biv increments or registers created by
+     load_mems.  In the latter case, it is possible that try_copy_prop
+     will propagate a new pseudo into the old iteration register but
+     this will be marked by having the REG_USERVAR_P bit set.  */
+
+  if ((unsigned) REGNO (iteration_var) >= reg_iv_type->num_elements
+      && ! REG_USERVAR_P (iteration_var))
     abort ();
 
   iteration_info (iteration_var, &initial_value, &increment,