[llvm-branch-commits] [llvm] [SLP][modularisation][NFC] Move getReductionInstr/getAggregateSize to SLPReductionUtils (PR #222613)

Alexey Bataev via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Sep 11 04:07:33 PDT 2026


================
@@ -30,6 +35,17 @@ Instruction *getNonPhiOperand(Instruction *I, PHINode *Phi);
 /// vectorization.
 bool isReductionCandidate(Instruction *I);
 
+/// \returns the number of elements of the homogeneous aggregate built by
+/// \p InsertInst (insertelement or insertvalue), or std::nullopt if it is not
+/// a homogeneous aggregate.
+std::optional<unsigned> getAggregateSize(Instruction *InsertInst);
----------------
alexey-bataev wrote:

Why it happen to become a member of reduction helpers?

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


More information about the llvm-branch-commits mailing list