[llvm] [RISCV][TTI] Implement cost for vp min/max intrinsics (PR #107567)
Shih-Po Hung via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 8 18:38:27 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:
Do you suggest extending the RISCV opcode list like this?
```diff
+enum RVVOpcode {
+ VMIN_MAX_VV = RISCV::INSTRUCTION_LIST_END+1,
+};
+
```
https://github.com/llvm/llvm-project/pull/107567
More information about the llvm-commits
mailing list