[llvm] [RISCV][TTI] Implement instruction cost for vp.reduce.* (PR #114184)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 30 10:07:22 PDT 2024
================
@@ -1179,6 +1179,79 @@ RISCVTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
return getCmpSelInstrCost(Instruction::Select, ICA.getReturnType(),
ICA.getArgTypes()[0], CmpInst::BAD_ICMP_PREDICATE,
CostKind);
+ case Intrinsic::vp_reduce_add:
----------------
preames wrote:
Please use:
```
Intrinsic::ID RedID = *VPI.getFunctionalIntrinsicID();
unsigned Opc = getArithmeticReductionInstruction(RedID);
OR
getMinMaxReductionIntrinsicOp(RedID);
```
https://github.com/llvm/llvm-project/pull/114184
More information about the llvm-commits
mailing list