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

Nadav Rotem nrotem at apple.com
Wed Feb 6 17:13:57 PST 2013


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




More information about the llvm-commits mailing list