This is the mail archive of the 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: [patch] (4.1 project list) vectorizer alignment improvements

On Wed, Jun 01, 2005 at 11:46:50PM +0300, Dorit Naishlos wrote:
> > I'm thinking of something like
> >
> >    for (i = 0; i < N; ++i) {
> >      a[i] += a[i+4];
> >      b[i+1] += b[i+5];
> >    }
> >
> > or something like that.  The point being that a[i] and a[i+4] are 4
> > units apart, as are b[i+1] and b[i+5].  But a[i] and b[i+1] are not
> > co-aligned, which would seem to break the bulk processing that you're
> > doing here.
> >
> no, cause none of the accesses to array 'b' will be recorded as having the
> same alignment as any of the accesses to array 'a'.

Ok, bad example.  I wanted something where we *do* have a 
dependence-distance, and some of the references are co-aligned
and some aren't.  Perhaps

	a[i] += a[i+4];
	a[i+N+1] += a[i+N+5];

But I guess the vector being per-statement means that's ok.  We'll
have [i] and [i+4] on one list and [i+N+1] and [i+N+5] on another,
but ne'er the twain shall meet.  Correct?

In which case this is all ok.  Sorry for the delay.


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