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 patch for IA-64 abort on ping


This fixes an IA-64 abort that occurs while compiling ping at -O2.

This is the same problem as my last unroll patch in a different place.
An increment needs to be extended when used by an extended giv in case it
isn't a constant.

2000-09-18  Jim Wilson  <wilson@cygnus.com>

	* unroll.c (loop_iterations): Pass increment to extend_for_giv_value
	before passing it to fold_rtx_mult_add.

Index: unroll.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/unroll.c,v
retrieving revision 1.109
diff -p -r1.109 unroll.c
*** unroll.c	2000/09/18 22:48:52	1.109
--- unroll.c	2000/09/18 23:17:38
*************** loop_iterations (loop)
*** 3686,3693 ****
  	{
  	  struct induction *biv_inc;
  
! 	  increment
! 	    = fold_rtx_mult_add (v->mult_val, increment, const0_rtx, v->mode);
  	  /* The caller assumes that one full increment has occured at the
  	     first loop test.  But that's not true when the biv is incremented
  	     after the giv is set (which is the usual case), e.g.:
--- 3686,3694 ----
  	{
  	  struct induction *biv_inc;
  
! 	  increment = fold_rtx_mult_add (v->mult_val,
! 					 extend_value_for_giv (v, increment),
! 					 const0_rtx, v->mode);
  	  /* The caller assumes that one full increment has occured at the
  	     first loop test.  But that's not true when the biv is incremented
  	     after the giv is set (which is the usual case), e.g.:

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