[all-commits] [llvm/llvm-project] 6778c1: [AArch64] Fix SVE cost model for various math intr...

David Sherwood via All-commits all-commits at lists.llvm.org
Thu Mar 5 00:59:23 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6778c11f5cf26718c0fd057d24d416018932204b
      https://github.com/llvm/llvm-project/commit/6778c11f5cf26718c0fd057d24d416018932204b
  Author: David Sherwood <david.sherwood at arm.com>
  Date:   2026-03-05 (Thu, 05 Mar 2026)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
    M llvm/test/Analysis/CostModel/AArch64/sve-intrinsics.ll
    M llvm/test/Analysis/CostModel/AArch64/sve-math.ll
    M llvm/test/Analysis/CostModel/AArch64/sve-min-max.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/veclib-intrinsic-calls.ll

  Log Message:
  -----------
  [AArch64] Fix SVE cost model for various math intrinsics (#184358)

The implementation of getIntrinsicInstrCost in BasicTTIImpl
assumes that for some intrinsics if we're using custom
lowering for the equivalent DAG node that the cost needs to
be 2, instead of 1 for legal ops. However, even though we
use custom lowering for these scalable vector operations
when SVE is available, we still end up generating the same
efficient codegen as fixed-width. This patch deals with a
few obvious intrinsics that we know get lowered to something
sensible and return the same cost as NEON, i.e. 1.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list