[llvm] [SLP] Exit early if MaxVF < MinVF (NFCI). (PR #83283)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 1 08:35:32 PST 2024
================
@@ -13912,10 +13918,11 @@ bool SLPVectorizerPass::vectorizeStores(ArrayRef<StoreInst *> Stores,
unsigned MinVF = TTI->getStoreMinimumVF(
R.getMinVF(DL->getTypeSizeInBits(ValueTy)), StoreTy, ValueTy);
- if (MaxVF <= MinVF) {
+ if (MaxVF < MinVF) {
----------------
fhahn wrote:
I think I might be missing something here. The original code only guarded the debug output by this check AFAICT, but always also reached the for loop below, which would not be entered if `MaxVF < MinVF`.
Now the code continues early instead of reaching the for loop, so it should only restrict the cases where we execute the loop below (and could vectorize)?
https://github.com/llvm/llvm-project/pull/83283
More information about the llvm-commits
mailing list