[llvm] [RISCV][TTI] Implement cost for vp min/max intrinsics (PR #107567)
Shih-Po Hung via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 9 00:53:28 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);
----------------
arcbbb wrote:
Given that VMINU_VV, VMAXU_VV, VMIN_VV, and VMAX_VV are currently identical, it seems practical to use one representation for all unless a specific case requires distinguishing them.
https://github.com/llvm/llvm-project/pull/107567
More information about the llvm-commits
mailing list