This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Semi-Latent Bug in tree vectorizer
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jeffrey A Law <law at redhat dot com>
- Cc: dorit at il dot ibm dot com, gcc at gcc dot gnu dot org
- Date: Fri, 8 Apr 2005 18:58:54 +0200
- Subject: Re: Semi-Latent Bug in tree vectorizer
- References: <1112979122.5728.22.camel@localhost.localdomain>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Apr 08, 2005 at 10:52:02AM -0600, Jeffrey A Law wrote:
> There's a rather annoying bug in the vectorizer which can cause us to
> have SSA_NAMEs which are used, but never defined.
>
> Consider this testcase compiled with -msse2 -ftree-vectorize:
>
> typedef char achar __attribute__ ((__aligned__(16)));
> int main1 ()
> {
> struct {
> achar *p;
> achar *q;
> } s;
> int i;
> achar x[16];
> achar cb[16];
> s.p = x;
> i = 0;
> do
> {
> s.p[i] = cb[i];
> i++;
> } while (i < 16);
>
> if (s.p[0])
> abort ();
> }
See middle-end/20794, there is discussion about declaring this
invalid. When a type with size that is not an integral multiple
of alignment (e.g. smaller size than alignment) is used in an
array, we have the choice either to violate the alignment
request for second and some subsequent array elements,
or make the elements bigger, but then pointer arithmetics
won't work very well.
Jakub