[PATCH] D101076: [SVE][LoopVectorize] Add support for scalable vectorization of first-order recurrences
Paul Walker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 23 04:14:31 PDT 2021
paulwalker-arm added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:4139-4143
+ auto *RuntimeVF = getRuntimeVF(Builder, IdxTy, VF);
+ auto *LastIdx = Builder.CreateBinOp(Instruction::Sub, RuntimeVF, One);
+ VectorInit = Builder.CreateInsertElement(
+ PoisonValue::get(VectorType::get(VectorInit->getType(), VF)),
+ VectorInit, LastIdx, "vector.recur.init");
----------------
Hi @kmclaughlin, sorry for the flyby comment but I just wanted to highlight this block looks equally applicable to fixed length vectors and thus ideally I'd prefer to not introduce split control flow unless absolutely necessary.
There's a couple of other changes below that also look like the "scalable" path can be used for all vector types.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101076/new/
https://reviews.llvm.org/D101076
More information about the llvm-commits
mailing list