[llvm-branch-commits] [llvm] [VPlan] Scalarize to first-lane-only directly on VPlan (PR #184267)
Andrei Elovikov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Mar 3 16:51:34 PST 2026
================
@@ -6395,3 +6395,68 @@ void VPlanTransforms::makeMemOpWideningDecisions(
return ReplaceWith(VPI, Recipe);
});
}
+
+void VPlanTransforms::makeScalarizationDecisions(
+ VPlan &Plan, VFRange &Range, VPRecipeBuilder &RecipeBuilder) {
+ if (LoopVectorizationPlanner::getDecisionAndClampRange(
+ [&](ElementCount VF) { return VF.isScalar(); }, Range))
----------------
eas wrote:
```c++
if (LoopVectorizationPlanner::getDecisionAndClampRange(
Predicate: std::mem_fn(pm: &ElementCount::isScalar), &: Range))
return;
```
would work, but I don't think it's more readable than a lambda.
https://github.com/llvm/llvm-project/pull/184267
More information about the llvm-branch-commits
mailing list