[llvm] [VPlan] Impl VPlan-based pattern match for ExtendedRed and MulAccRed (NFCI) (PR #113903)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 24 10:58:01 PST 2024
================
@@ -2702,6 +2785,212 @@ class VPReductionEVLRecipe : public VPReductionRecipe {
}
};
+/// A recipe to represent inloop extended reduction operations, performing a
+/// reduction on a extended vector operand into a scalar value, and adding the
+/// result to a chain. This recipe is abstract and needs to be lowered to
+/// concrete recipes before codegen. The Operands are {ChainOp, VecOp,
+/// [Condition]}.
+class VPExtendedReductionRecipe : public VPReductionRecipe {
+ /// Opcode of the extend recipe will be lowered to.
+ Instruction::CastOps ExtOp;
+ /// Debug location of reduction recipe will be lowered to.
+ DebugLoc RedDL;
+
+public:
+ VPExtendedReductionRecipe(const RecurrenceDescriptor &R, Instruction *RedI,
+ VPValue *ChainOp, VPWidenCastRecipe *Ext,
+ VPValue *CondOp, bool IsOrdered)
+ : VPReductionRecipe(VPDef::VPExtendedReductionSC, R,
+ ArrayRef<VPValue *>({ChainOp, Ext->getOperand(0)}),
----------------
alexey-bataev wrote:
```suggestion
{ChainOp, Ext->getOperand(0)},
```
??
https://github.com/llvm/llvm-project/pull/113903
More information about the llvm-commits
mailing list