[llvm] [LV] Handle partial reductions with predication (PR #194859)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 25 00:53:13 PDT 2026
================
@@ -6786,6 +6807,15 @@ getScaledReductions(VPReductionPHIRecipe *RedPhiR, VPCostContext &CostCtx,
// Work backwards from the ExitValue examining each reduction operation.
VPValue *CurrentValue = ExitValue;
while (CurrentValue != RedPhiR) {
+ VPBlendRecipe *Blend = nullptr;
+ if (auto *B = dyn_cast<VPBlendRecipe>(CurrentValue)) {
+ if (B->getNumIncomingValues() != 2)
+ return std::nullopt;
+
----------------
MacDue wrote:
It's important for the getMask(0) that's used later when transforming to partial reductions. I guess the assert could be moved there.
https://github.com/llvm/llvm-project/pull/194859
More information about the llvm-commits
mailing list