[llvm] [RISCV][CostModel] Add cost for @llvm.experimental.vp.splice (PR #122223)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 10 10:18:57 PST 2025
================
@@ -1235,6 +1235,33 @@ RISCVTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
: RISCV::VMV_V_X,
LT.second, CostKind);
}
+ case Intrinsic::experimental_vp_splice: {
+ auto LT = getTypeLegalizationCost(RetTy);
+ SmallVector<unsigned, 3> Opcodes;
+ Value *ImmValue = *(ICA.getInst()->arg_begin() + 2);
+ auto *Imm = dyn_cast<ConstantInt>(ImmValue);
----------------
topperc wrote:
If you use `dyn_cast`, you must check the result for null before dereferencing. If can't be null, use `cast`.
https://github.com/llvm/llvm-project/pull/122223
More information about the llvm-commits
mailing list