[all-commits] [llvm/llvm-project] 27cc5c: [AMDGPU] Price scalar integer to fp casts by sourc...

Dmitry Sidorov via All-commits all-commits at lists.llvm.org
Fri Sep 25 05:42:48 PDT 2026


  Branch: refs/heads/users/mrsidims/fix-amdgpu-scalar-int-fp-cast-cost
  Home:   https://github.com/llvm/llvm-project
  Commit: 27cc5c4d3dcd96dca1660859591688dcb758051d
      https://github.com/llvm/llvm-project/commit/27cc5c4d3dcd96dca1660859591688dcb758051d
  Author: Dmitry Sidorov <Dmitry.Sidorov at amd.com>
  Date:   2026-09-25 (Fri, 25 Sep 2026)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
    M llvm/test/Analysis/CostModel/AMDGPU/narrow-int-to-bfloat.ll
    M llvm/test/Analysis/CostModel/AMDGPU/narrow-int-to-fp.ll

  Log Message:
  -----------
  [AMDGPU] Price scalar integer to fp casts by source width and sign

Scalar sources between a byte and 31 bits fell to the default cost of one
while the matching vector lanes were already priced, which skewed the
difference SLP weighs a bundle against. Such a source is extended before
the conversion, and what the extension takes depends on the width, on the
sign and on whether the subtarget has SDWA and 16 bit instructions.
Sources narrower than a byte are left alone, because their vector form is
not priced either.


  Commit: 980a325d5b3cc93a72efdcd9b5cfaf3c5e3baa60
      https://github.com/llvm/llvm-project/commit/980a325d5b3cc93a72efdcd9b5cfaf3c5e3baa60
  Author: Dmitry Sidorov <Dmitry.Sidorov at amd.com>
  Date:   2026-09-25 (Fri, 25 Sep 2026)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp

  Log Message:
  -----------
  format


Compare: https://github.com/llvm/llvm-project/compare/aeca072b40ab...980a325d5b3c

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