[llvm] [RISCV][TTI] Implement cost for vp min/max intrinsics (PR #107567)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 8 19:07:36 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:

Oh I didn't realize they were the actual opcode names. I just though it was our own enum for cost modeling.

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


More information about the llvm-commits mailing list