This is the mail archive of the gcc@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: Semi-Latent Bug in tree vectorizer


On Fri, 2005-04-08 at 18:58 +0200, Jakub Jelinek wrote:
> 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.
But is that likely the cause for getting a different set of virtual
operands for the scalar and vector versions of the store?  That's
the real problem here.

jeff



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