[3/8] Add flags to dr_with_seg_len_pair_t

Richard Biener richard.guenther@gmail.com
Fri Nov 15 12:00:00 GMT 2019


On Fri, Nov 15, 2019 at 12:33 PM Richard Sandiford
<richard.sandiford@arm.com> wrote:
>
> Richard Biener <richard.guenther@gmail.com> writes:
> > On Mon, Nov 11, 2019 at 7:47 PM Richard Sandiford
> > <richard.sandiford@arm.com> wrote:
> >>
> >> This patch adds a bunch of flags to dr_with_seg_len_pair_t,
> >> for use by later patches.  The update to tree-loop-distribution.c
> >> is conservatively correct, but might be tweakable later.
> >
> > Does this all work with interleaved SLP loads/stores like
> >
> >   a[i] = b[i];
> >   tem1 = b[i+1];
> >   tem2 = b[i+2];
> >   a[i+2] = tem2;
> >   a[i+1] = tem1;
> >
> > where we don't preserve the scalar order but emit code at the
> > latest stmt of the grouped access?
>
> Yeah.  vect-alias-check-9.c is a less sophisticated example of that.
> In both cases vect_preserves_scalar_order_p is false.
>
> > That is, what does "preserve scalar oder" actually mean?
>
> It's supposed to mean that if a memory access A from the first
> group and a memory access B from the second group occur within
> the same scalar iteration, the order of the accesses in the
> vector loop body will be the same as it was in the scalar loop body.
> In other words, the order of the vector stmts honours any dependencies
> between the accesses that occur within one iteration of the scalar loop.

OK, I see.  The patch is OK then.

Thanks,
Richard.

> Thanks,
> Richard



More information about the Gcc-patches mailing list