[all-commits] [llvm/llvm-project] 9ee615: [AMDGPU] Fix incorrect grid_dims constant folding ...

Arseniy Obolenskiy via All-commits all-commits at lists.llvm.org
Fri Jul 24 07:50:26 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9ee615b7ab84bd3e3091f7185ac09c8e01f7c495
      https://github.com/llvm/llvm-project/commit/9ee615b7ab84bd3e3091f7185ac09c8e01f7c495
  Author: Arseniy Obolenskiy <arseniy.obolenskiy at amd.com>
  Date:   2026-07-24 (Fri, 24 Jul 2026)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPULowerKernelAttributes.cpp
    M llvm/test/CodeGen/AMDGPU/implicit-arg-v5-opt.ll

  Log Message:
  -----------
  [AMDGPU] Fix incorrect grid_dims constant folding for reqd_work_group_size (#211285)

reqd_work_group_size(X, Y, 1) does not guarantee the dispatch runs with
work_dim == 2, since the spec still allows enqueuing with work_dim == 3
and a unit-size Z dimension. Only fold hidden_grid_dims to a constant
when Z != 1 (work_dim must be 3)

Otherwise tighten the range instead of assuming an exact value

Alterative approach to https://github.com/llvm/llvm-project/pull/205866
without killing constant folding



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