[PATCH] ARM cost model: Add costs for vector selects

Renato Golin renato.golin at linaro.org
Thu Feb 7 02:49:47 PST 2013


LGTM, too.


On 7 February 2013 01:13, Nadav Rotem <nrotem at apple.com> wrote:

> It's odd that in the ARM backend SELECTS are marked as expand, but there
> is a pattern to match the expanded form and turn it into vbsel.
>
> In any case, this change  LGTM.
>
>
> On Feb 6, 2013, at 4:41 PM, Arnold Schwaighofer <aschwaighofer at apple.com>
> wrote:
>
> > Oh, yes.
> >
> > <0001-ARM-cost-model-Add-costs-for-vector-selects.patch>
> >
> > Thanks,
> > Arnold
> >
> > On Feb 6, 2013, at 6:18 PM, Nadav Rotem <nrotem at apple.com> wrote:
> >
> >> +  static const CostTblEntry<MVT> NEONSelectTbl[] = {
> >> +    { ISD::SELECT,   MVT::v8i8,   1},
> >> +    { ISD::SELECT,   MVT::v16i8,  1},
> >> +    { ISD::SELECT,   MVT::v4i16,  1},
> >> +    { ISD::SELECT,   MVT::v8i16,  1},
> >> +    { ISD::SELECT,   MVT::v2i32,  1},
> >> +    { ISD::SELECT,   MVT::v4i32,  1},
> >> +    { ISD::SELECT,   MVT::v2i64,  1},
> >> +    { ISD::SELECT,   MVT::v2f32,  1},
> >> +    { ISD::SELECT,   MVT::v4f32,  1},
> >> +    { ISD::SELECT,   MVT::v2f64,  1},
> >> +  };
> >> +
> >>
> >> You don't need to use a table if you know that vector selects are free
> for all legal types.
> >>
> >> Thanks,
> >> Nadav
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130207/9ad1a530/attachment.html>


More information about the llvm-commits mailing list