[llvm] [VPlan] Add narrowToSingleScalarRecipe transform. (PR #139150)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Sat May 17 14:57:09 PDT 2025
================
@@ -1084,6 +1084,40 @@ void VPlanTransforms::simplifyRecipes(VPlan &Plan, Type &CanonicalIVTy) {
}
}
+static void convertToUniformRecipes(VPlan &Plan) {
+ auto TryToNarrow = [](VPBasicBlock *VPBB) {
+ for (VPRecipeBase &R : make_early_inc_range(reverse(*VPBB))) {
+ // Try to narrow wide and replicating recipes to uniform recipes, based on
+ // VPlan analysis.
+ auto *Def = dyn_cast<VPSingleDefRecipe>(&R);
+ if (!Def || !isa<VPReplicateRecipe, VPWidenRecipe>(Def) ||
+ !Def->getUnderlyingValue())
----------------
fhahn wrote:
Yep we should be able to do that soon. I'll give it a try, need to see if we rely on the encoded facts that certain recipes are widened in various places.
https://github.com/llvm/llvm-project/pull/139150
More information about the llvm-commits
mailing list