This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] for optimization/10080: Loop unroller nearly useless
- From: Jan Hubicka <jh at suse dot cz>
- To: Geert Bosch <bosch at gnat dot com>
- Cc: Richard Henderson <rth at redhat dot com>,Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>,gcc-patches at gcc dot gnu dot org, falk dot hueffner at student dot uni-tuebingen dot de
- Date: Thu, 20 Mar 2003 12:35:23 +0100
- Subject: Re: [PATCH] for optimization/10080: Loop unroller nearly useless
- References: <20030319050749.GA6909@redhat.com> <25719BD2-5A1D-11D7-9722-00039344BF4A@gnat.com>
>
> 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