[llvm-branch-commits] [llvm] [LangRef][AMDGPU] Specify that syncscope can cause atomic operations to race (PR #189015)

Matt Arsenault via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Apr 22 08:51:53 PDT 2026


================
@@ -3934,7 +3934,8 @@ Given that definition, R\ :sub:`byte` is defined as follows:
 -  Otherwise, if R is atomic, and all the writes R\ :sub:`byte` may
    see are atomic, it chooses one of the values written. See the :ref:`Atomic
    Memory Ordering Constraints <ordering>` section for additional
-   constraints on how the choice is made.
+   constraints on how the choice is made. Targets may impose additional
+   requirements on R and the writes it may see based on their ``syncscope``.
----------------
arsenm wrote:

I think we made a mistake by avoiding defining syncscopes as a first class IR concept. They are really more similar to calling conventions, in that the use cases may be target dependent, but the definitions don't have to be. Any target can always degrade an unhandled scope to system. 

We have a few other pieces of ABI knowledge frontends need to emit target IR, but unnecessarily end up dependent on codegen 

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


More information about the llvm-branch-commits mailing list