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

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 14 09:59:37 PDT 2018


RKSimon added inline comments.


================
Comment at: lib/Target/AArch64/AArch64TargetTransformInfo.cpp:963
+  if (Kind == TTI::SK_Select) {
+    static const CostTblEntry SelectTbl[] = {
+        {ISD::VECTOR_SHUFFLE, MVT::v2i32, 1},
----------------
evandro wrote:
> I'm not sure that the costs of 64 and 128 bits long vectors should be different.
I'm going off the codegen in the shuffle-select.ll tests below where 2X32 selects are a move and 4X32 selects are a rev+trn.

If you have better cost estimates please suggest them - I don't know much about the aarch64 microarch and I'm really just wanting to fix regressions in D48174 caused by the existing (dubious) shuffle costs.


================
Comment at: lib/Target/AArch64/AArch64TargetTransformInfo.cpp:978
+  if (Kind == TTI::SK_PermuteSingleSrc) {
+    static const CostTblEntry PermuteTbl[] = {
+        {ISD::VECTOR_SHUFFLE, MVT::v2i32, 1},
----------------
evandro wrote:
> Ditto.
I wasn't sure what the best form shuffle test were for these cases - do you know what the likely worst offending shuffle masks will be? If you can give me some hints I'd be happy to create a shuffle-single-src.ll costs test file to at least cover these types.


Repository:
  rL LLVM

https://reviews.llvm.org/D48172





More information about the llvm-commits mailing list