[llvm] [LV] Update forced epilogue VF options to allow different VFs than main. (PR #190393)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 8 10:02:48 PDT 2026


================
@@ -6793,6 +6800,14 @@ void LoopVectorizationPlanner::plan(ElementCount UserVF, unsigned UserIC) {
       CM.collectInLoopReductions();
       if (CM.selectUserVectorizationFactor(UserVF)) {
         LLVM_DEBUG(dbgs() << "LV: Using user VF " << UserVF << ".\n");
+        ElementCount EpilogueUserVF =
+            ElementCount::getFixed(EpilogueVectorizationForceVF);
+        if (EpilogueUserVF.isVector() &&
+            ElementCount::isKnownLT(EpilogueUserVF, UserVF)) {
----------------
ayalz wrote:

It seems inconceivable to have UserVF < EpilogUserVF < UserVF x UserIC, so perhaps worth asserting EpilogUserVF <= UserVF, or else be ready to build two plans also when EpilogUserVF > UserVF.

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


More information about the llvm-commits mailing list