[llvm-branch-commits] [llvm] [LV] Only create partial reductions when profitable. (PR #181706)

Florian Hahn via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Mar 16 04:28:51 PDT 2026


================
@@ -6025,7 +6007,8 @@ static bool isValidPartialReduction(const VPPartialReductionChain &Chain,
         static_cast<Instruction::CastOps>(Ext->getOpcode()));
     return {ExtOpType, ExtKind};
   };
-  ExtendedReductionOperand ExtendedOp = Chain.ExtendedOp;
+
+  ExtendedReductionOperand ExtendedOp = Link.ExtendedOp;
----------------
fhahn wrote:

nit: while here, could probably do 


```suggestion
  const ExtendedReductionOperand &ExtendedOp = Link.ExtendedOp;
```

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


More information about the llvm-branch-commits mailing list