[PATCH] D125235: [LoopVectorize] Add overflow checks when tail-folding with scalable vectors
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 12 06:59:37 PDT 2022
sdesmalen added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:2989
+ Value *LHS = ConstantInt::get(
+ Count->getType(), cast<IntegerType>(Count->getType())->getBitMask());
+ LHS = Builder.CreateSub(LHS, Count);
----------------
The interface of `getBitMask` returns a `uint64_t`, which means this functionality is limited to loops with i64 induction variables. I don't know whether this is a limitation that's already assumed elsewhere, but perhaps you can use `getMask()` instead (which returns an `APInt`).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125235/new/
https://reviews.llvm.org/D125235
More information about the llvm-commits
mailing list