[PATCH] ARM cost model: Add costs for vector selects
Nadav Rotem
nrotem at apple.com
Wed Feb 6 16:18:58 PST 2013
+ 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
On Feb 6, 2013, at 4:15 PM, Arnold Schwaighofer <aschwaighofer at apple.com> wrote:
> Vector selects are cheap on NEON. They get lowered to a vbsl instruction.
>
> <0001-ARM-cost-model-Add-costs-for-vector-selects.patch>
More information about the llvm-commits
mailing list