[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:18: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:

I would expect that only for overloaded intrinsics that support both scalar and vector operations. Are you seeing a real failure because of a bogus type?

`vector_reverse` is another example of a vector only intrinsic where I can see the base implementation of `getIntrinsicInstrCost` is happy to assume the operand type is what it expects it to be. I'd kind of hope the cost model is allow to assume the IR is wellformed.

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


More information about the llvm-commits mailing list