[llvm] [VPlan] Replace RdxDesc with RecurKind in VPReductionPHIRecipe (NFC). (PR #142322)

via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 6 09:34:32 PDT 2025


================
@@ -9177,6 +9173,8 @@ void LoopVectorizationPlanner::adjustRecipesForReductions(
       if (CM.blockNeedsPredicationForAnyReason(CurrentLinkI->getParent()))
         CondOp = RecipeBuilder.getBlockInMask(CurrentLink->getParent());
 
+      RecurrenceDescriptor RdxDesc = Legal->getRecurrenceDescriptor(
+          cast<PHINode>(PhiR->getUnderlyingInstr()));
----------------
ayalz wrote:

TODO to also capture RdxDesc's FMF in PhiR, similar to capturing its Kind, to avoid retrieving RdxDesc here?
Can `CM.useOrderedReductions(RdxDesc)` below be replaced with `PhiR->isOrdered()`?

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


More information about the llvm-commits mailing list