[llvm] [VPlan] Replace RdxDesc with RecurKind in VPReductionPHIRecipe (NFC). (PR #142322)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 1 14:49:15 PDT 2025
================
@@ -9177,7 +9175,8 @@ void LoopVectorizationPlanner::adjustRecipesForReductions(
if (!PhiR)
continue;
- const RecurrenceDescriptor &RdxDesc = PhiR->getRecurrenceDescriptor();
+ const RecurrenceDescriptor &RdxDesc = Legal->getReductionVars().lookup(
+ cast<PHINode>(PhiR->getUnderlyingInstr()));
----------------
fhahn wrote:
Currently all information needed is already available in the recipes together with the recurrence kind. Having just the recurrence kind makes it easier to create new VPReductionPHIRecipes directly in VPlan, as we do not need to create new RecurrenceDescriptor objects.
One use case enabled by this is https://github.com/llvm/llvm-project/pull/141431, and I'll share another one soon.
https://github.com/llvm/llvm-project/pull/142322
More information about the llvm-commits
mailing list