[all-commits] [llvm/llvm-project] 900220: [CostModel] Handle vector struct results and cost ...

Benjamin Maxwell via All-commits all-commits at lists.llvm.org
Wed Feb 26 03:37:55 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 900220d444257633cc7d1be1475d4da1be58e0ed
      https://github.com/llvm/llvm-project/commit/900220d444257633cc7d1be1475d4da1be58e0ed
  Author: Benjamin Maxwell <benjamin.maxwell at arm.com>
  Date:   2025-02-26 (Wed, 26 Feb 2025)

  Changed paths:
    M llvm/include/llvm/Analysis/TargetTransformInfo.h
    M llvm/include/llvm/CodeGen/BasicTTIImpl.h
    M llvm/lib/Analysis/CostModel.cpp
    M llvm/lib/Analysis/TargetTransformInfo.cpp
    A llvm/test/Analysis/CostModel/AArch64/sincos.ll
    M llvm/test/Analysis/CostModel/AMDGPU/frexp.ll

  Log Message:
  -----------
  [CostModel] Handle vector struct results and cost `llvm.sincos` (#123210)

This patch updates the cost model to cost intrinsics that return
multiple values (in structs) correctly. Previously, the cost model only
thought intrinsics that return `VectorType` need scalarizing, which
meant it cost intrinsics that return multiple vectors (that need
scalarizing) way too cheap (giving it the cost of a single function
call).

This patch also adds a custom cost for llvm.sincos when a vector
function library is available, as certain VFs can be expanded (later in
code gen) to a vector function, reducing the cost to a single call (+
the possible loads from the vector function returns values via output
pointers).



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