[PATCH] D102253: [AArch64][LoopVectorize] Add AArch64TTIImpl::isLegalToVectorizeType function
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 11 14:06:09 PDT 2021
sdesmalen added inline comments.
================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1324
+ /// \returns True if it is legal to vectorize the given element type.
+ bool isLegalToVectorizeType(Type *Ty) const;
+
----------------
Should this instead be changed to `isLegalToVectorizeElementType`? (that would match the comment at least)
================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:1505-1506
+bool AArch64TTIImpl::isLegalToVectorizeType(Type *Ty) const {
+ if (Ty->isVoidTy() || Ty->isIntegerTy(1))
+ return true;
+
----------------
is this needed? specifically, this function is never called if `Ty->isVoidTy`
================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:1508
+
+ if (supportsScalableVectors()) {
+ return isLegalElementTypeForSVE(Ty);
----------------
nit: unnecessary braces
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102253/new/
https://reviews.llvm.org/D102253
More information about the llvm-commits
mailing list