[llvm] [RISCV][TTI] Implement cost for vp min/max intrinsics (PR #107567)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 7 19:33:40 PDT 2024
================
@@ -989,6 +989,14 @@ RISCVTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
return Cost * LT.first;
break;
}
+ case Intrinsic::vp_smax:
+ case Intrinsic::vp_smin:
+ case Intrinsic::vp_umax:
+ case Intrinsic::vp_umin: {
+ auto LT = getTypeLegalizationCost(RetTy);
+ return LT.first *
+ getRISCVInstructionCost(RISCV::VMAXU_VV, LT.second, CostKind);
----------------
topperc wrote:
Should we merge them into a single VMIN_MAX_VV?
https://github.com/llvm/llvm-project/pull/107567
More information about the llvm-commits
mailing list