[AArch64] Add worst case shuffle costs
authorDavid Green <david.green@arm.com>
Fri, 23 Jul 2021 08:01:58 +0000 (09:01 +0100)
committerDavid Green <david.green@arm.com>
Fri, 23 Jul 2021 08:01:58 +0000 (09:01 +0100)
commit38986c678285063f0dc1bd5752593bfdbe5068a2
tree089e4589874ac744b8fee513371588eb7d99f4ad
parent06d2fb55ca75250f27f46894a692ae8738ccf6de
[AArch64] Add worst case shuffle costs

This adds some missing single source shuffle costs for AArch64, of i16
and i8 vectors. v4i16 are the same as v4i32 with a worse case cost of 3
coming from the perfect shuffle tables. The larger vector sizes expand
into a constant pool, plus a load (and adrp) and a tbl. I arbitrarily
chose 8 for the cost to be expensive but not too expensive.

Differential Revision: https://reviews.llvm.org/D106241
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
llvm/test/Analysis/CostModel/AArch64/reduce-and.ll
llvm/test/Analysis/CostModel/AArch64/reduce-minmax.ll
llvm/test/Analysis/CostModel/AArch64/reduce-or.ll
llvm/test/Analysis/CostModel/AArch64/reduce-xor.ll
llvm/test/Analysis/CostModel/AArch64/shuffle-other.ll
llvm/test/Analysis/CostModel/AArch64/vector-reduce.ll