[PATCH 1/2] Cost model: Add check for reverse shuffles to CostModel analysis

Renato Golin renato.golin at linaro.org
Sat Feb 9 11:37:14 PST 2013


I'm guessing this could be used in your other patch about detecting reverse
stride, are they related or conflicting?

--renato


On 8 February 2013 18:40, Arnold Schwaighofer <aschwaighofer at apple.com>wrote:

> Updated patch.
>
>
>
>
> Thanks
>
> On Feb 8, 2013, at 11:44 AM, Nadav Rotem <nrotem at apple.com> wrote:
>
> > LGTM!  A few minor comments:
> >
> > There is an extra line break here.
> >
> > +
> > +static bool isReverseVectorMask(SmallVector<int, 16> &Mask) {
> > +  for (unsigned i = 0, MaskSize = Mask.size(); i < MaskSize; ++i)
> > +    if (Mask[i] != (int)(MaskSize - 1 - i))
> > +      return false;
> > +  return true;
> > +}
> > +
> >
> > We should also check for -1's in the mask.
> >
> > +    if (NumVecElems == Mask.size() &&
> > +        isReverseVectorMask(Mask))
> >
> >
> > The expression above can fit in one line.
> >
> >
> > Thanks,
> > Nadav
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130209/ea10dcaf/attachment.html>


More information about the llvm-commits mailing list