This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] (4.1 project list) vectorizer alignment improvements
- From: Dorit Naishlos <DORIT at il dot ibm dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Ira Rosen <IRAR at il dot ibm dot com>, Keith Besaw <kbesaw at us dot ibm dot com>
- Date: Fri, 10 Jun 2005 17:48:59 +0300
- Subject: Re: [patch] (4.1 project list) vectorizer alignment improvements
Richard Henderson <rth@redhat.com> wrote on 09/06/2005 01:16:46:
> 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?
>
yes.
committed to mainline,
thanks,
dorit
> In which case this is all ok. Sorry for the delay.
>
>
>
> r~