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

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 3 03:32:57 PDT 2026


================
@@ -8060,6 +8212,15 @@ bool LoopVectorizePass::processLoop(Loop *L) {
 
   // Plan how to best vectorize.
   LVP.plan(UserVF, UserIC);
+  if (EpilogueTailFoldingCM.has_value())
+    if (!LVP.planForEpilogueTF(UserVF, UserIC, EpilogueVectorizationForceVF,
+                               EpilogueTailFoldingCM.value())) {
+      // we can't apply epilogue TF:
+      LLVM_DEBUG(
+          dbgs() << "LV: Applying epilogue tail-folding failed, disable it.\n");
----------------
david-arm wrote:

I think we probably want to call `reportVectorizationInfo` here to let the user know their request failed, otherwise they may be using a release build and have no way of finding out.

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


More information about the llvm-commits mailing list