[PATCH] D146199: [LoopVectorize] Don't tail-fold for scalable VFs when there is no scalar tail
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 29 01:18:01 PDT 2023
david-arm added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5173
+
+ if (MaxPowerOf2RuntimeVF) {
+ assert((UserVF.isNonZero() || isPowerOf2_32(*MaxPowerOf2RuntimeVF)) &&
----------------
@ABataev @sdesmalen I am happy to add an extra check here such as
if (MaxPowerOf2RuntimeVF && *MaxPowerOf2RuntimeVF > 0) {
but I there may be no way to add a test to defend the non-zero behaviour. You'd need to have one of these scenarios:
1. computeFeasibleMaxVF returns 0 and 0 for both fixed-width and scalable VFs. Not sure how this could ever happen?
2. computeFeasibleMaxVF returns 0 for fixed-width and non-zero for scalable VFs, but there is no vscale max or vscale is not a power of 2. This may be possible in theory, but difficult to find an actual test that exhibits this behaviour.
Regardless, even if I can't write a test for this I am happy to add a check!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146199/new/
https://reviews.llvm.org/D146199
More information about the llvm-commits
mailing list