[PATCH] D98715: [LoopVectorize] Add support for scalable vectorization of induction variables
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 19 06:53:40 PDT 2021
david-arm marked an inline comment as done.
david-arm added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:2536
: VF.getKnownMinValue();
- assert((!VF.isScalable() || Lanes == 1) &&
- "Should never scalarize a scalable vector");
----------------
david-arm wrote:
> ctetreau wrote:
> > what happens in this case now? I see a bunch of branches that handle the case where Lanes is greater than 1, but nothing for when it equals 1.
> When this equals 1 due to being uniform the loop below works fine I think - we just don't bother creating a whole vector for each Part. We only create the first lane instead, which works for both fixed-width and scalable vectors.
>
> Are you specifically referring to the possibility of something like <vscale x 1 x Ty>? If so, perhaps you're right and we should still generate a whole vector for each part.
Hi @ctetreau, I've changed the code to now check for:
!IsUniform && VF.isScalable()
so that this is guaranteed to do something sensible for <vscale x 1 x ElTy> vectors as well.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98715/new/
https://reviews.llvm.org/D98715
More information about the llvm-commits
mailing list