[PATCH] D102253: [LV] Prevent vectorization with unsupported element types.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 8 09:58:15 PDT 2021


sdesmalen added inline comments.


================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1327
 
+  bool isElementTypeLegalForScalableVector(Type *Ty) const;
+
----------------
Missing doxygen comment.


================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h:278
 
+  bool isElementTypeLegalForScalableVector(Type *Ty) const;
+
----------------
To reduce the diff, can you just rename isLegalElementTypeForSVE?


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:1524
+  /// vectorize with scalable vectors.
+  bool isLegalToVectorizeInstTypesForScalable() {
+    for (BasicBlock *BB : TheLoop->blocks())
----------------
I'd like to suggest to have a name that's more generic: `canWidenLoopWithScalableVectors`, so that it can be reused for other purposes. D102394 and subsequently D101916 do that already. If you make a similar change as in D102394 where you move `canVectorizeReductions` into this function, then @david-arm can rebase his patch when he's back.


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

https://reviews.llvm.org/D102253



More information about the llvm-commits mailing list