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]

patch applide to loop.c - Re: Codegen bug with strength reduction - more details


Approved by Jim Wilson.

Wed Feb 17 16:59:28 1999  J"orn Rennecke <amylaar@cygnus.co.uk>

	* loop.c (strength_reduce): Don't move giv insn for biv turned giv
	below scan_start.

Index: loop.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/loop.c,v
retrieving revision 1.131
diff -p -r1.131 loop.c
*** loop.c	1999/02/06 00:46:54	1.131
--- loop.c	1999/02/15 23:24:37
*************** strength_reduce (scan_start, end, loop_t
*** 4046,4051 ****
--- 4046,4052 ----
  	      /* We can get better optimization if we can move the giv setting
  		 before the first giv use.  */
  	      if (dominator
+ 		  && ! loop_insn_first_p (dominator, scan_start)
  		  && ! reg_set_between_p (bl2->biv->src_reg, loop_start,
  					  dominator)
  		  && ! reg_used_between_p (giv, loop_start, dominator)



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