[llvm] [RISCV] Add cost for @llvm.experimental.vp.splat (PR #117313)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 22 07:53:51 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);
----------------
lukel97 wrote:
If there's no V instructions then `getTypeLegalizationCost` will return an invalid type legalization cost for scalable vectors, or a scalar legalized type for fixed vectors, both of which will end up in invalid cost. We could be more explicit about this though?
https://github.com/llvm/llvm-project/pull/117313
More information about the llvm-commits
mailing list