[llvm] [LV] Use VPReductionRecipe for partial reductions (PR #147513)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 21 02:15:52 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 {};
----------------
fhahn wrote:
IIRC VPReductionRecipe was introduced because there were no suitable intrinsics at that time. The variants that map directly to an intrinsic should not need a dedicated recipe at all down the line, as we can just generate the appropriate intrinsic directly
https://github.com/llvm/llvm-project/pull/147513
More information about the llvm-commits
mailing list