[llvm] [AMDGPU] Skip the iterative atomic scan on native LDS atomics (PR #227222)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 29 01:53:46 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-amdgpu
Author: Dmitry Sidorov (MrSidims)
<details>
<summary>Changes</summary>
The iterative scan runs a serial loop with one iteration per active lane. For an LDS atomic that the target executes natively, this costs more than the hardware serialization it replaces. Leave such atomics alone when the value is divergent.
---
Full diff: https://github.com/llvm/llvm-project/pull/227222.diff
3 Files Affected:
- (modified) llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp (+7)
- (modified) llvm/test/CodeGen/AMDGPU/atomic_optimizations_local_pointer.ll (+725-5445)
- (modified) llvm/test/CodeGen/AMDGPU/local-atomicrmw-fadd.ll (+68-479)
``````````diff
The server is unavailable at this time. Please wait a few minutes before you try again.
``````````
</details>
https://github.com/llvm/llvm-project/pull/227222
More information about the llvm-commits
mailing list