This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

unroll.c (loop_iterations): Only call loop_find_equiv_value if we


I have installed this patch.

This fixes a latent bug in Michael Hayes' loop_find_equiv_value change
from last November that was exposed by Joern Rennecke's recent iteration_info
change.  This caused a cygwin toolchain build failure.

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.

Index: unroll.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/unroll.c,v
retrieving revision 1.52
diff -p -r1.52 unroll.c
*** unroll.c	1999/03/02 08:48:09	1.52
--- unroll.c	1999/03/09 00:04:20
*************** loop_iterations (loop_start, loop_end, l
*** 3830,3836 ****
  
    if (GET_CODE (increment) != CONST_INT)
      {
!       increment = loop_find_equiv_value (loop_start, increment);
  
        if (GET_CODE (increment) != CONST_INT)
  	{
--- 3830,3840 ----
  
    if (GET_CODE (increment) != CONST_INT)
      {
!       /* 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)
  	{


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]