[all-commits] [llvm/llvm-project] 586d5a: pre-commit test for trailing waitcnt

Sameer Sahasrabuddhe via All-commits all-commits at lists.llvm.org
Thu Jun 26 03:09:34 PDT 2025


  Branch: refs/heads/users/ssahasra/waitcnt-cleanup
  Home:   https://github.com/llvm/llvm-project
  Commit: 586d5aec547458e53ac73392cdea574a88aefc8c
      https://github.com/llvm/llvm-project/commit/586d5aec547458e53ac73392cdea574a88aefc8c
  Author: Sameer Sahasrabuddhe <sameer.sahasrabuddhe at amd.com>
  Date:   2025-06-26 (Thu, 26 Jun 2025)

  Changed paths:
    A llvm/test/CodeGen/AMDGPU/waitcnt-trailing.mir

  Log Message:
  -----------
  pre-commit test for trailing waitcnt


  Commit: 7f69f650eb31a5a067da69201827658f50e66d6a
      https://github.com/llvm/llvm-project/commit/7f69f650eb31a5a067da69201827658f50e66d6a
  Author: Sameer Sahasrabuddhe <sameer.sahasrabuddhe at amd.com>
  Date:   2025-06-26 (Thu, 26 Jun 2025)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
    M llvm/test/CodeGen/AMDGPU/dynamic_stackalloc.ll
    M llvm/test/CodeGen/AMDGPU/extract-subvector-16bit.ll
    M llvm/test/CodeGen/AMDGPU/extract-subvector.ll
    M llvm/test/CodeGen/AMDGPU/indirect-addressing-si.ll
    M llvm/test/CodeGen/AMDGPU/memory-legalizer-global-agent.ll
    M llvm/test/CodeGen/AMDGPU/memory-legalizer-global-system.ll
    M llvm/test/CodeGen/AMDGPU/noclobber-barrier.ll
    M llvm/test/CodeGen/AMDGPU/packed-op-sel.ll
    M llvm/test/CodeGen/AMDGPU/waitcnt-trailing.mir

  Log Message:
  -----------
  [AMDGPU][SIInsertWaitcnts] drop OldWaitcntInstr only when it is processed

When iterating over instructions, the pass keeps track of pending soft waitcnt
instructions. These are usually processed when a non-waitcnt instruction is
visited, but some visit may return early. Dropping the recorded pointer at this
early exit produces spurious waitcnt. This does not affect correctness, but the
waitcnt is unnecessary.

To fix that, the recorded pointer should be dropped iff pending soft waitcnt
instructions have been processed.


Compare: https://github.com/llvm/llvm-project/compare/5abc83862f06...7f69f650eb31

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