[llvm] [VPlan] Remove legacy costing inside VPBlendRecipe::computeCost (PR #171846)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 11 07:41:02 PST 2025
================
@@ -7081,6 +7081,11 @@ static bool planContainsAdditionalSimplifications(VPlan &Plan,
return true;
}
+ // The legacy cost model costs non-header phis with a scalar VF as a phi,
+ // but scalar unrolled VPlans will have VPBlendRecipes which emit selects.
+ if (VF.isScalar() && isa<VPBlendRecipe>(&R))
----------------
lukel97 wrote:
I think it's likelier to lead to mismatches if we use vputils::onlyFirstLaneUsed. The loop vectorizer cost model checks VF.isScalar() and AFAIK we don't convert a VPBlendRecipe to a phi if only the first lane is used
https://github.com/llvm/llvm-project/blob/8a4cc440f200154d6514df6db55789991aae5a4f/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp#L6177-L6181
https://github.com/llvm/llvm-project/pull/171846
More information about the llvm-commits
mailing list