[llvm] [LV] Add initial support for partial alias masking (PR #177599)
Andrei Elovikov via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 18 09:07:22 PST 2026
================
@@ -7462,6 +7540,7 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
VPlanTransforms::materializeVectorTripCount(
BestVPlan, VectorPH, CM.foldTailByMasking(),
CM.requiresScalarEpilogue(BestVF.isVector()));
+ VPlanTransforms::fixupVFUsersForClampedVF(BestVPlan, ClampedVF);
----------------
eas wrote:
> Before `VF` is materialized it's a symbolic value that represents the runtime `VF` for the plan. For plans with alias-masking the runtime VF will be the number of lanes in the mask.
That depends on the definition of `VF`, is it logical (how we vectorize **user**'s code) or closer to physical HW vector unit. If the former, then our definition of mask becomes somewhat flawed. Why would we need anything explicit in `<VF x i1>` masks if they don't represent things beyond `VF` lane?
In other words, if we define `VF` as "number of lanes in the mask", then "alias-mask" is really all-`true` and we don't need any special processing for it. The fact that it's not means we use different definition of `VF` in different places.
https://github.com/llvm/llvm-project/pull/177599
More information about the llvm-commits
mailing list