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

Hassnaa Hamdi via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 17 03:16:39 PDT 2026


================
@@ -8298,6 +8315,47 @@ getEpilogueLowering(Function *F, Loop *L, LoopVectorizeHints &Hints,
   return CM_EpilogueAllowed;
 }
 
+/// Check if we can apply tail folding to the vectorized epilogue loop,
+/// enabling an unpredicated main vector loop with a tail-folded epilogue
+/// vector loop.
+static bool isEpilogueTailFoldingAllowed(const LoopVectorizationCostModel &CM,
----------------
hassnaaHamdi wrote:

Also the `computeMaxVF` function is mainly about finding max VF, and that is not affected by the tail-folding of the vector epilogue.

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


More information about the llvm-commits mailing list