This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Regression [v850,mep...]: sign_extend in loop breaks zero-overhead loop generation
- From: Paulo Matos <pmatos at broadcom dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Thu, 30 Jan 2014 15:19:33 +0000
- Subject: RE: Regression [v850,mep...]: sign_extend in loop breaks zero-overhead loop generation
- Authentication-results: sourceware.org; auth=none
- References: <19EB96622A777C4AB91610E763265F463F2F43 at SJEXCHMB14 dot corp dot ad dot broadcom dot com> <87bnytk0fs dot fsf at igel dot home> <19EB96622A777C4AB91610E763265F463F3030 at SJEXCHMB14 dot corp dot ad dot broadcom dot com> <871tzpjycb dot fsf at igel dot home>
> -----Original Message-----
> From: Andreas Schwab [mailto:schwab@linux-m68k.org]
> Sent: 30 January 2014 15:15
> To: Paulo Matos
> Cc: gcc@gcc.gnu.org
> Subject: Re: Regression [v850,mep...]: sign_extend in loop breaks zero-overhead
> loop generation
>
> Paulo Matos <pmatos@broadcom.com> writes:
>
> > If instead I write:
> > void
> > foo (short blockSize)
> > {
> > short i;
> > unsigned short loopCount;
> > loopCount = (unsigned short) (blockSize + delayLength) % 8;
> > for (i = 0; i < loopCount; i++)
> > *temp_ptr++ = x ^ *temp_ptr;
> > }
>
> This is still undefined.
>
OK, of course. Don't know what I am doing today.
It's undefined because 'i' might overflow... I will get back to this. Thanks for pointing this out.
> Andreas.
>
> --
> Andreas Schwab, schwab@linux-m68k.org
> GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
> "And now for something completely different."