[all-commits] [llvm/llvm-project] 5cf920: [AMDGPU] Optimize block count calculations to the ...

Joseph Huber via All-commits all-commits at lists.llvm.org
Thu Jan 8 14:03:22 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5cf92086b78c6797647aaf351f4dd26fbf2244c4
      https://github.com/llvm/llvm-project/commit/5cf92086b78c6797647aaf351f4dd26fbf2244c4
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2026-01-08 (Thu, 08 Jan 2026)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPULowerKernelAttributes.cpp
    A llvm/test/CodeGen/AMDGPU/implicit-arg-block-count.ll

  Log Message:
  -----------
  [AMDGPU] Optimize block count calculations to the new ABI (#174112)

Summary:
We already have a way to get the block count using the old grid size
lookup and dividing it by the number of threads. We did not want to make
a new intrinsic to do the same thing, so this optimization pattern
matches on this usage to automatically optimize it to the new form. This
should improve performance of old kernels by converting branches into a
simple index lookup and removing the division.



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