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]
Other format: [Raw text]

Re: [PATCH] for optimization/10080: Loop unroller nearly useless


> 
> On Wednesday, Mar 19, 2003, at 00:07 America/New_York, Richard 
> Henderson wrote:
> 
> >Err, so are you or are you not handling loops like
> >
> >	unsigned int i;
> >	for (i = 0; i != 1; i += 5)
> >	  ...
> >
> >which iterates UINT_MAX*4+1 times?  Please tell me you are...
> 
> This repeats UINT_MAX * 4 / 5 + 1 times...

I also believe we are still wrong for loop
	for (i = 0; i < UINT_MAX - 1; i += 5)
where UINT_MAX - 1 is not visible as a constant.  Then we will assume
that the loop counter won't wrap around.  We always did so, so it is not
a regression.

Honza


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