[llvm] [SLP] Exit early if MaxVF < MinVF (NFCI). (PR #83283)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 29 06:17: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) {
----------------
alexey-bataev wrote:

I mean this change increases cases, where the vectorization may be triggered, since you're loosening the restriction. So need to add the test for such a case.

https://github.com/llvm/llvm-project/pull/83283


More information about the llvm-commits mailing list