This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Loop unroll fixes
- To: mark at codesourcery dot com (Mark Mitchell)
- Subject: Re: Loop unroll fixes
- From: Zoltan Hidvegi <hzoli at hzoli dot 2y dot net>
- Date: Wed, 24 Oct 2001 13:11:18 -0500 (CDT)
- Cc: hzoli at hzoli dot 2y dot net, wilson at cygnus dot com, gcc-patches at gcc dot gnu dot org,bernds at redhat dot com, Franz dot Sirl-kernel at lauterbach dot com
> > The standard defines the unsigned overflow as modulo 2^word_size
> > operation, but the result of signed overflow is undefined.
>
> Ah, good; if the loop variable is signed, then you could apply your
> optimization.
Actually, what I am doing in not an optimization, my patch does not
make any loop that is correctly infinite in the current gcc version
finite. This this fix could be applied, then the infinite loop bug
can be addressed in a different patch. I would argue that infinite
loop is a different bug I that did not address, but opinions can
differ on that.
Zoli