[llvm] [LV] codegen for tail-folded epilogue loop (PR #208764)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 19 14:32:25 PDT 2026


================
@@ -3494,9 +3497,10 @@ std::unique_ptr<VPlan> LoopVectorizationPlanner::selectBestEpiloguePlan(
     }
 
     LLVM_DEBUG(dbgs() << "LEV: Epilogue vectorization factor is forced.\n");
-    if (hasPlanWithVF(EpilogueVectorizationForceVF)) {
+    if (hasPlanWithVF(EpilogueVectorizationForceVF, CM.foldTailByMasking())) {
----------------
fhahn wrote:

I think main/epilogue VFs should be unique, so we should be able to not need to pass `CM.foldTailByMasking()` in? In any case, this would depend on the option provided by the user?

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


More information about the llvm-commits mailing list