[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 07:39:01 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 see CachingVPExpander::expandPredicationInReduction as an example of how to perform these mappings more cleanly.  

https://github.com/llvm/llvm-project/pull/114184


More information about the llvm-commits mailing list