[PATCH] D125235: [LoopVectorize] Add overflow checks when tail-folding with scalable vectors
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 13 01:36:21 PDT 2022
david-arm marked 4 inline comments as done.
david-arm added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:2992
+
+ // Don't execute the vector loop if (UMax - n) < (VF * UF).
+ CheckMinIters = Builder.CreateICmp(ICmpInst::ICMP_ULT, LHS, Step);
----------------
paulwalker-arm wrote:
> Not sure if this is better so feel free to ignore but what about doing `n + (VF * UF) < n`? to remove the need for the mask.
Strangely enough, after the DCE and InstCombine passes the LLVM IR ends up being identical! So I just left it in the original form.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125235/new/
https://reviews.llvm.org/D125235
More information about the llvm-commits
mailing list