[llvm] [LV] Use VPReductionRecipe for partial reductions (PR #147513)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 26 03:40:18 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:
Ah right, if left in the header it should probably be `inline` instead of `static`
https://github.com/llvm/llvm-project/pull/147513
More information about the llvm-commits
mailing list