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

Sameer Sahasrabuddhe via All-commits all-commits at lists.llvm.org
Wed Jun 25 08:23:07 PDT 2025


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

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

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


  Commit: 5abc83862f0658ab7b5710fe689b7ac25dbf84c8
      https://github.com/llvm/llvm-project/commit/5abc83862f0658ab7b5710fe689b7ac25dbf84c8
  Author: Sameer Sahasrabuddhe <sameer.sahasrabuddhe at amd.com>
  Date:   2025-06-25 (Wed, 25 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/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/f1828c9dc2c2%5E...5abc83862f06

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