[llvm] [LV] Use VPReductionRecipe for partial reductions (PR #147513)

Gaƫtan Bossu via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 20 06:41:43 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 {};
----------------
gbossu wrote:

Isn't a normal reduction an unordered reduction with a scale factor of VF? Which is actually why it gets a separate variant, given that VF can be unknown at compile time.

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


More information about the llvm-commits mailing list