[PATCH] D100486: [COST]Improve cost model for shuffles in SLP.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 12 13:07:12 PST 2021


RKSimon added a comment.

Sorry for the slow response on this one - please can you split the DAG legalization change out as the first patch and the TTI change as a followup?



================
Comment at: llvm/include/llvm/Analysis/VectorUtils.h:401
 
+SmallVector<SmallVector<SmallVector<int>>>
+computeShuffleMasks(ArrayRef<int> Mask, unsigned NumOfSrcRegs,
----------------
Description comment?


================
Comment at: llvm/include/llvm/Analysis/VectorUtils.h:402
+SmallVector<SmallVector<SmallVector<int>>>
+computeShuffleMasks(ArrayRef<int> Mask, unsigned NumOfSrcRegs,
+                    unsigned NumOfDestRegs);
----------------
Should this be splitShuffleMasks?


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:2140
+      }
+      Output = Op0;
     }
----------------
I'm rather surprised this didn't reduce further (same for the TTI) - maybe there's more functionality that can be moved into the computeShuffleMasks helper? 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100486/new/

https://reviews.llvm.org/D100486



More information about the llvm-commits mailing list