[llvm] [VPlan] Remove legacy costing inside VPBlendRecipe::computeCost (PR #171846)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 14 02:53:05 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))
----------------
artagnon wrote:

I've found LV cost-model patches to be a bit tricky, due to the legacy cost-model, which uses pre-VPlan reasoning like isUniformAfterVectorization. Not sure what the right fix would be, and I think Florian is the expert here, but at least we have a new regression test.

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


More information about the llvm-commits mailing list