[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:04:08 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:

Any reason this cannot be just `auto *NeedleTy = cast<FixedVectorType>(ICA.getArgTypes()[1])` without needing the extra control flow?

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


More information about the llvm-commits mailing list