loop.c (maybe_eliminate_biv): Check regno against max_reg_before_loop.
authorGraham Stott <grahams@rcp.co.uk>
Thu, 13 May 1999 00:57:05 +0000 (18:57 -0600)
committerJeff Law <law@gcc.gnu.org>
Thu, 13 May 1999 00:57:05 +0000 (18:57 -0600)
        * loop.c (maybe_eliminate_biv): Check regno against
        max_reg_before_loop.

From-SVN: r26918

gcc/ChangeLog
gcc/loop.c

index 6727dd59cc782b22c02c7617bf6912c06f49bea2..24c75b9cf64c27b2cef483c34c80d36b8dacaa3d 100644 (file)
@@ -1,5 +1,8 @@
 Thu May 13 01:49:55 1999  Graham Stott <GrahamS@RCP.co.uk>
 
+        * loop.c (maybe_eliminate_biv): Check regno against
+        max_reg_before_loop.
+
        * i386.c (memory_address_info): Correct the scale
        factor test.
 
index 55f52bf6c51ecd32955a7eacc8291f541c8ef790..192461a934cbf11784e9930f56094f41ca66c257 100644 (file)
@@ -8131,7 +8131,8 @@ maybe_eliminate_biv (bl, loop_start, end, eliminate_p, threshold, insn_count)
                {
                  int regno = REGNO (SET_DEST (set));
 
-                 if (REG_IV_TYPE (regno) == GENERAL_INDUCT
+                 if (regno < max_reg_before_loop
+                     && REG_IV_TYPE (regno) == GENERAL_INDUCT
                      && REG_IV_INFO (regno)->src_reg == bl->biv->src_reg)
                    p = last;
                }