[llvm] [VPlan] Implement VPReductionRecipe::computeCost(). NFC (PR #107790)
Elvis Wang via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 8 20:05:31 PDT 2024
================
@@ -2022,6 +2022,34 @@ void VPReductionEVLRecipe::execute(VPTransformState &State) {
State.set(this, NewRed, /*IsScalar*/ true);
}
+InstructionCost VPReductionRecipe::computeCost(ElementCount VF,
+ VPCostContext &Ctx) const {
+ RecurKind RdxKind = RdxDesc.getRecurrenceKind();
+ // TODO: Support any-of reduction and in-loop reduction
+ assert(!RecurrenceDescriptor::isAnyOfRecurrenceKind(RdxKind) &&
+ "Not support any-of reduction in VPlan-based cost model currently.");
----------------
ElvisWang123 wrote:
Fixed, thanks.
https://github.com/llvm/llvm-project/pull/107790
More information about the llvm-commits
mailing list