[llvm] 8b02f31 - [VPlan] Consistently use VF.Width to getting plan for main loop VF (NFC)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 26 03:16:53 PDT 2024


Author: Florian Hahn
Date: 2024-07-26T11:16:45+01:00
New Revision: 8b02f31aea6b95db70273df2ebd9f8c533a62cc1

URL: https://github.com/llvm/llvm-project/commit/8b02f31aea6b95db70273df2ebd9f8c533a62cc1
DIFF: https://github.com/llvm/llvm-project/commit/8b02f31aea6b95db70273df2ebd9f8c533a62cc1.diff

LOG: [VPlan] Consistently use VF.Width to getting plan for main loop VF (NFC)

Cleanup to make things consistent in preparation for
https://github.com/llvm/llvm-project/pull/98821.

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 09ca859f52680..ea19af10a1474 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -10027,8 +10027,9 @@ bool LoopVectorizePass::processLoop(Loop *L) {
         EpilogueVectorizerMainLoop MainILV(L, PSE, LI, DT, TLI, TTI, AC, ORE,
                                            EPI, &LVL, &CM, BFI, PSI, Checks);
 
+        assert(EPI.MainLoopVF == VF.Width && "VFs must match");
         std::unique_ptr<VPlan> BestMainPlan(
-            LVP.getBestPlanFor(EPI.MainLoopVF).duplicate());
+            LVP.getBestPlanFor(VF.Width).duplicate());
         const auto &[ExpandedSCEVs, ReductionResumeValues] = LVP.executePlan(
             EPI.MainLoopVF, EPI.MainLoopUF, *BestMainPlan, MainILV, DT, true);
         ++LoopsVectorized;


        


More information about the llvm-commits mailing list