[llvm] [AArch64] Add cost model for @experimental.vector.match (PR #118512)
Ricardo Jesus via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 9 04:38:46 PST 2024
================
@@ -905,6 +905,23 @@ AArch64TTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
}
break;
}
+ case Intrinsic::experimental_vector_match: {
+ EVT SearchVT = getTLI()->getValueType(DL, ICA.getArgTypes()[0]);
+ unsigned SearchSize =
+ cast<FixedVectorType>(ICA.getArgTypes()[1])->getNumElements();
+ // If we can't lower to MATCH, return an invalid cost.
+ if (getTLI()->shouldExpandVectorMatch(SearchVT, SearchSize))
+ return InstructionCost::getInvalid();
----------------
rj-jesus wrote:
Thanks, we now fall through to the generic case.
https://github.com/llvm/llvm-project/pull/118512
More information about the llvm-commits
mailing list