[llvm] [LV] Handle partial reductions with predication (PR #194859)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 25 00:34:40 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;
+
----------------
sdesmalen-arm wrote:
Do we need to assert Blend is not normalized? `getNumIncomingValues()` and `getIncomingValue()` return the expected value, regardless of whether the blend is normalized or not.
https://github.com/llvm/llvm-project/pull/194859
More information about the llvm-commits
mailing list