[PATCH] D48172: [CostModel][AArch64] Add some initial costs for SK_Select and SK_PermuteSingleSrc

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 21 12:51:13 PDT 2018


efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: lib/Target/AArch64/AArch64TargetTransformInfo.cpp:966
+      { TTI::SK_PermuteSingleSrc, MVT::v2i32, 1 }, // mov.
+      { TTI::SK_PermuteSingleSrc, MVT::v4i32, 2 }, // rev+trn or similar.
+      { TTI::SK_PermuteSingleSrc, MVT::v2i64, 1 }, // mov.
----------------
RKSimon wrote:
> efriedma wrote:
> > `egrep -c "[0-3],[0-3],[0-3],[0-3].*Cost [3-4]" lib/Target/AArch64/AArch64PerfectShuffle.h` says there are 182 permutes which cost more than 2.  But I guess this is a reasonable estimate not knowing anything else.
> Out of interest, are those perfect shuffle costs based off throughput or number of instructions?
All the shuffles it uses have the same throughput on an A57, so there isn't really any difference.


Repository:
  rL LLVM

https://reviews.llvm.org/D48172





More information about the llvm-commits mailing list