OSDN Git Service

Fix cygwin toolchain build failure reported by Geoffrey Noer.
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Mar 1999 16:09:05 +0000 (16:09 +0000)
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Mar 1999 16:09:05 +0000 (16:09 +0000)
* unroll.c (loop_iterations): Only call loop_find_equiv_value if we
have a REG or SUBREG.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25643 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/unroll.c

index 77d23c1..fc6d1ef 100644 (file)
@@ -1,3 +1,8 @@
+Mon Mar  8 16:04:44 1999  Jim Wilson  <wilson@cygnus.com>
+
+       * unroll.c (loop_iterations): Only call loop_find_equiv_value if we
+       have a REG or SUBREG.
+
 Mon Mar  8 15:27:42 1999  Jeffrey A Law  (law@cygnus.com)
 
        * flow.c (merge_blocks_nomove): For HAVE_cc0 targets, make sure
index 841f06a..32ed531 100644 (file)
@@ -3830,7 +3830,11 @@ loop_iterations (loop_start, loop_end, loop_info)
 
   if (GET_CODE (increment) != CONST_INT)
     {
-      increment = loop_find_equiv_value (loop_start, increment);
+      /* If we have a REG, check to see if REG holds a constant value.  */
+      /* ??? Other RTL, such as (neg (reg)) is possible here, but it isn't
+        clear if it is worthwhile to try to handle such RTL.  */
+      if (GET_CODE (increment) == REG || GET_CODE (increment) == SUBREG)
+       increment = loop_find_equiv_value (loop_start, increment);
 
       if (GET_CODE (increment) != CONST_INT)
        {