[llvm] [LangRef] Allow monotonic & seq_cst accesses to inter-operate with other accesses (PR #189014)
Fabian Ritter via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 15 00:15:46 PDT 2026
================
@@ -3983,12 +3983,13 @@ For a simpler introduction to the ordering constraints, see the
address. All modification orders must be compatible with the
happens-before order. There is no guarantee that the modification
orders can be combined to a global total order for the whole program
- (and this often will not be possible). The read in an atomic
- read-modify-write operation (:ref:`cmpxchg <i_cmpxchg>` and
- :ref:`atomicrmw <i_atomicrmw>`) reads the value in the modification
- order immediately before the value it writes. If one atomic read
- happens before another atomic read of the same address, the later
- read must see the same value or a later value in the address's
+ (and this often will not be possible). If the read in an atomic
+ read-modify-write operation M (:ref:`cmpxchg <i_cmpxchg>` and
+ :ref:`atomicrmw <i_atomicrmw>`) reads from a ``monotonic`` (or
+ stronger) write W, W must be immediately before M in the address's
----------------
ritter-x2a wrote:
I'm not sure I follow. The new version says that W must be immediately before M in the modification order. The modification order only connects writes, so this part of the sentence is talking about the write part of M. We could clarify it to "W must be immediately before **the write in** M in the address's modification order." Would that fix the problem you're seeing?
https://github.com/llvm/llvm-project/pull/189014
More information about the llvm-commits
mailing list