[llvm] [LV][EVL] Support in-loop reduction using tail folding with EVL. (PR #90184)
Mel Chen via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 18 23:15:27 PDT 2024
================
@@ -2145,6 +2152,62 @@ class VPReductionRecipe : public VPSingleDefRecipe {
}
};
+/// A recipe to represent inloop reduction operations with vector-predication
+/// intrinsics, performing a reduction on a vector operand with the explicit
+/// vector length (EVL) into a scalar value, and adding the result to a chain.
+/// The Operands are {ChainOp, VecOp, EVL, [Condition]}.
+class VPReductionEVLRecipe : public VPSingleDefRecipe {
+ /// The recurrence decriptor for the reduction in question.
+ const RecurrenceDescriptor &RdxDesc;
+ bool IsOrdered;
----------------
Mel-Chen wrote:
4ffe78d64e7b4c8610448be95fb5724e095248e2
Sure, `VPReductionEVLRecipe` can inherit from `VPReductionRecipe`. I don't have a strong preference on this. However, if possible, would it be better to add a `VPReductionBase` in the future, allowing both `VPReductionRecipe` and `VPReductionEVLRecipe` to inherit from `VPReductionBase`?
https://github.com/llvm/llvm-project/pull/90184
More information about the llvm-commits
mailing list