[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 04:23:26 PST 2026


================
@@ -1114,6 +1121,25 @@ AArch64TTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
       return getCallInstrCost(nullptr, RetTy, ICA.getArgTypes(), CostKind);
     break;
   }
+  case Intrinsic::sqrt:
----------------
david-arm wrote:

Also, NEON goes down the same path as SVE for calculating the cost, e.g. getTypeBasedIntrinsicInstrCost (see code snippet above). It's just the NEON sqrt is legal and so the cost is 1.

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


More information about the llvm-commits mailing list