Fix abort in loop_iterations
authorBernd Schmidt <bernds@cygnus.co.uk>
Mon, 29 Nov 1999 10:51:09 +0000 (10:51 +0000)
committerBernd Schmidt <crux@gcc.gnu.org>
Mon, 29 Nov 1999 10:51:09 +0000 (10:51 +0000)
From-SVN: r30698

gcc/ChangeLog
gcc/unroll.c

index ef7b57da8ab28bbbf2ae0e73fd2b5cbf562c741c..717e1e2599df2da58b5102ce78a3838b6b7affa0 100644 (file)
@@ -1,3 +1,8 @@
+1999-11-29  Bernd Schmidt  <bernds@cygnus.co.uk>
+
+       * unroll.c (loop_iterations): Don't abort if iteration variable
+       was made by loop.
+
 1999-11-29  David S. Miller  <davem@redhat.com>
 
        * config/sparc/sparc.c (init_cumulative_args): Fix type of third
index 3994e79c2264e212c30f0508f0147aa1c04cfa2d..94451e1717bae3c5c74c2ce11e06059645bf3bcf 100644 (file)
@@ -3687,11 +3687,9 @@ 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.  */
-
+  /* This can happen due to optimization in load_mems.  */
   if ((unsigned) REGNO (iteration_var) >= reg_iv_type->num_elements)
-    abort ();
+    return 0;
 
   iteration_info (iteration_var, &initial_value, &increment,
                  loop_start, loop_end);