[llvm] [LV] Add -predicated-epilogue option for tail-folded epilogue (PR #190697)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 10 03:46:13 PDT 2026


================
@@ -9447,6 +9517,10 @@ bool LoopVectorizePass::processLoop(Loop *L) {
   LoopVectorizationPlanner LVP(L, LI, DT, TLI, *TTI, &LVL, CM, IAI, PSE, Hints,
                                ORE);
 
+  if (isEpilogueTailFoldingAllowed(CM, LVL)) {
+    // TODO: Apply tail folding on the vectorized epilogue loop.
+    LLVM_DEBUG(dbgs() << "LV: Epilogue tail folding is enabled\n");
----------------
david-arm wrote:

I still don't think this is right. I think we should both:

1. Emit a debug message saying that epilogue tail-folding is not supported yet.
2. Emit a remark to the user (reportVectorizationInfo) to say the flag is unsupported for now and we are falling back on vectorising with a scalar tail.

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


More information about the llvm-commits mailing list