[llvm] [LV] Use VPReductionRecipe for partial reductions (PR #147513)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 26 02:38:55 PST 2025
================
@@ -2392,6 +2392,29 @@ struct VPFirstOrderRecurrencePHIRecipe : public VPHeaderPHIRecipe {
#endif
};
+// Possible variants of a reduction.
+
+// This reduction is ordered and in-loop.
+struct RdxOrdered {};
+// This reduction is in-loop.
+struct RdxInLoop {};
+// This reduction is unordered with the partial result scaled down by some
+// factor.
+struct RdxUnordered {
+ unsigned VFScaleFactor;
+};
+using ReductionStyle = std::variant<RdxOrdered, RdxInLoop, RdxUnordered>;
----------------
fhahn wrote:
Would be good to use `///` here so this gets included in the docs properly.
https://github.com/llvm/llvm-project/pull/147513
More information about the llvm-commits
mailing list