[llvm] [LV] Add support for partial alias masking with tail folding (PR #182457)

Gaƫtan Bossu via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 24 01:20:12 PST 2026


================
@@ -7481,6 +7554,7 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
   VPlanTransforms::materializeVectorTripCount(
       BestVPlan, VectorPH, CM.foldTailByMasking(),
       CM.requiresScalarEpilogue(BestVF.isVector()));
+  VPlanTransforms::fixupVFUsersForClampedVF(BestVPlan, ClampedVF);
----------------
gbossu wrote:

Nit: AFAIU, a `ClampedVF` (as in, runtime-clamped) is a new concept? Would it be worth using a different name maybe? I feel it's too easy to confuse with the clamping that the `LoopVectorizationPlanner` does, which is completely different. I guess we will only clamp down at runtime, so maybe something like `CappedRuntimeVF`?

Feel free to ignore if you have a different opinion, I just thought I'd write this because I also got confused with the `ClampedVF` name in the previous PR.

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


More information about the llvm-commits mailing list