[llvm] [AArch64] Fix SVE cost model for various math intrinsics (PR #184358)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 4 06:53:08 PST 2026
================
@@ -696,9 +696,10 @@ AArch64TTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
break;
}
case Intrinsic::abs: {
- static const auto ValidAbsTys = {MVT::v8i8, MVT::v16i8, MVT::v4i16,
- MVT::v8i16, MVT::v2i32, MVT::v4i32,
- MVT::v2i64};
+ static const auto ValidAbsTys = {MVT::v8i8, MVT::v16i8, MVT::v4i16,
+ MVT::v8i16, MVT::v2i32, MVT::v4i32,
+ MVT::v2i64, MVT::nxv16i8, MVT::nxv8i16,
+ MVT::nxv4i32, MVT::nxv2i64};
----------------
david-arm wrote:
For consistency with the NEON behaviour it's easier if I just add the scalable vector types to this table. In the absence of SVE either the type won't match or we'll just return Invalid cost, which I confirmed with a downstream test.
https://github.com/llvm/llvm-project/pull/184358
More information about the llvm-commits
mailing list