[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
Mon Jul 8 10:40:35 PDT 2024
================
@@ -2144,16 +2151,67 @@ class VPReductionRecipe : public VPSingleDefRecipe {
VPSlotTracker &SlotTracker) const override;
#endif
+ /// Return the recurrence decriptor for the in-loop reduction.
+ const RecurrenceDescriptor &getRecurrenceDescriptor() const {
+ return RdxDesc;
+ }
+ /// Return true if the in-loop reduction is ordered.
+ bool isOrdered() const { return IsOrdered; };
/// The VPValue of the scalar Chain being accumulated.
VPValue *getChainOp() const { return getOperand(0); }
/// The VPValue of the vector value to be reduced.
VPValue *getVecOp() const { return getOperand(1); }
/// The VPValue of the condition for the block.
- VPValue *getCondOp() const {
+ virtual VPValue *getCondOp() const {
----------------
Mel-Chen wrote:
bdafefa949d5c466007a264c6ff39f8d9098a4c8
62c8979fe81569444ed8a1c4ee51af80295265fe
That's a good reminder.
Although I've refactored some code, to align with the load/store EVL recipes, I'm still keeping the condition as the last operand so far.
https://github.com/llvm/llvm-project/pull/90184
More information about the llvm-commits
mailing list