[llvm] [LV] Use VPReductionRecipe for partial reductions (PR #147513)
Sam Tebbs via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 20 08:08:50 PST 2025
================
@@ -2370,6 +2370,23 @@ struct VPFirstOrderRecurrencePHIRecipe : public VPHeaderPHIRecipe {
#endif
};
+// Possible variants of a reduction.
+
+// This reduction is ordered and in-loop.
+struct RdxOrderedInLoop {};
+// This reduction is in-loop.
+struct RdxInLoop {};
+// This reduction isn't partial, ordered or in-loop.
+struct RdxNormal {};
+// This reduction is partial and its output is a vector whose length is scaled
+// by the VF.
+struct RdxPartial {
+ // The factor by which the output is scaled down from the VF.
+ unsigned VFScaleFactor;
+};
+typedef std::variant<RdxOrderedInLoop, RdxInLoop, RdxNormal, RdxPartial>
+ RdxStyle;
----------------
SamTebbs33 wrote:
Done.
https://github.com/llvm/llvm-project/pull/147513
More information about the llvm-commits
mailing list