[PATCH] D102394: [LoopVectorize] Don't attempt to widen certain calls for scalable vectors
Kerry McLaughlin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 19 04:11:15 PDT 2021
kmclaughlin added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5654
+ StringRef &Msg) const {
+ // Disable scalable vectorization if the loop contains unsupported reductions.
+ // Test that the loop-vectorizer can legalize all operations for this VF.
----------------
nit: could this be moved below the comments beneath it so that it's above `if !(canVectorizeReductions(VF))`?
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5672
+ Intrinsic::ID VecID = getVectorIntrinsicIDForCall(CI, TLI);
+ if (VecID && VFDatabase::getMappings(*CI).empty() &&
+ !TTI.isLegalVectorIntrinsic(VecID, VF)) {
----------------
Hi @david-arm, is it possible for there to be a VecID but getMappings(*CI) is not empty? Is it worth adding a comment about what should happen in this case?
================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/scalable-call.ll:124
+
+define void @vec_sqrt_no_mapping(float* noalias nocapture %dst, float* noalias nocapture readonly %src, i64 %n) #0 {
+; CHECK: @vec_sqrt_no_mapping
----------------
nit: should this test be also be called `no_mapping` if it is legal to vectorize?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102394/new/
https://reviews.llvm.org/D102394
More information about the llvm-commits
mailing list