[llvm] [RISCV] Add cost for @llvm.experimental.vp.splat (PR #117313)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 22 07:13:08 PST 2024


================
@@ -1155,6 +1155,11 @@ RISCVTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
     return getCmpSelInstrCost(Instruction::Select, ICA.getReturnType(),
                               ICA.getArgTypes()[0], CmpInst::BAD_ICMP_PREDICATE,
                               CostKind);
+  case Intrinsic::experimental_vp_splat: {
+    auto LT = getTypeLegalizationCost(RetTy);
----------------
preames wrote:

You're missing the hasV check, and it looks like this is only handling integer (not FP).  

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


More information about the llvm-commits mailing list