[llvm] [AArch64] Add costs for LD3/LD4 shuffles. (PR #89268)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 18 10:51:14 PDT 2024


================
@@ -3815,6 +3815,27 @@ InstructionCost AArch64TTIImpl::getSpliceCost(VectorType *Tp, int Index) {
   return LegalizationCost * LT.first;
 }
 
+/// Check if the mask is a DE-interleave mask of the given factor
+/// \p Factor like:
+///     <Index, Index+Factor, ..., Index+(NumElts-1)*Factor>
+static bool isDeInterleaveMaskOfFactor(ArrayRef<int> Mask, unsigned Factor) {
+  // Check all potential start indices from 0 to (Factor - 1).
+  for (unsigned Index = 0; Index < Factor; Index++) {
+    unsigned i = 0;
----------------
RKSimon wrote:

`unsigned I = 0;`

https://github.com/llvm/llvm-project/pull/89268


More information about the llvm-commits mailing list