[PATCH] D131118: [LV] Add generic scalarization support for unpredicated scalable vectors

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 15 09:19:47 PDT 2022


david-arm added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:6870
+          // the generic replicate path which isn't yet implemented.
+          if (!foldTailByMasking())
+            return true;
----------------
I think you can avoid the scalarisation for SVE here simply by asking for the scalarisation cost of the instruction, similarly to how it's done elsewhere. For SVE this should return Invalid. Alternatively you could add a TTI hook to ask if target should scalarise or not, i.e.

  if (!foldTailByMasking())
    return isLegalToScalarize();

We have always considered it 'illegal' to scalarise for SVE.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131118



More information about the llvm-commits mailing list