[llvm] [AArch64] Add cost model for @experimental.vector.match (PR #118512)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 10 03:50:06 PST 2024
================
@@ -905,6 +905,24 @@ AArch64TTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
}
break;
}
+ case Intrinsic::experimental_vector_match: {
+ if (auto *NeedleTy = dyn_cast<FixedVectorType>(ICA.getArgTypes()[1])) {
----------------
paulwalker-arm wrote:
There are two routes when costing instructions. One that uses just the types and one that has the operands available to enhance the cost calculation. Both need implementing.
Given your common code `getIntrinsicInstrCost()` implementation only uses type information perhaps you can move the implementation into `getTypeBasedIntrinsicInstrCost()` and then call on to this from `getIntrinsicInstrCost()`?
https://github.com/llvm/llvm-project/pull/118512
More information about the llvm-commits
mailing list