[llvm-branch-commits] [llvm] [AMDGPU] Use ds_append and ds_consume for unused LDS counter atomics (PR #234035)

Sameer Sahasrabuddhe via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Oct 25 22:04:56 PDT 2026


https://github.com/ssahasra requested changes to this pull request.

This seems too aggressive or too early in the code generation. `monotonic` is relevant to synchronize-with. Nearby fences depend on its presence. If that atomic was replaced by a non-atomic, it could got reordered relative to the fence.

The optimization makes sense in lowering, any time after memory legalizer and insert-waitcnts. At that point, it is safe to say that no-return atomic increment can be *implemented* using a special instruction.

Attan @Pierre-vh and @ritter-x2a  for a closer look.

https://github.com/llvm/llvm-project/pull/234035


More information about the llvm-branch-commits mailing list