[llvm] [LV] Handle partial sub-reductions with sub in middle block. (PR #178919)
Graham Hunter via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 5 03:22:17 PST 2026
================
@@ -5828,7 +5833,46 @@ void VPlanTransforms::createPartialReductions(VPlan &Plan,
}
}
- for (const auto &[_, Chains] : ChainsByPhi)
+ for (auto &[Phi, Chains] : ChainsByPhi) {
+ RecurKind RK = cast<VPReductionPHIRecipe>(Phi)->getRecurrenceKind();
+ bool IsTransformed = false;
for (const VPPartialReductionChain &Chain : Chains)
- transformToPartialReduction(Chain, Range, CostCtx, Plan);
+ IsTransformed |=
----------------
huntergr-arm wrote:
Can we actually have a case where one chain is transformed and the other not for the same phi? Do you have a test for that?
https://github.com/llvm/llvm-project/pull/178919
More information about the llvm-commits
mailing list