[llvm] [LangRef] Allow monotonic & seq_cst accesses to inter-operate with other accesses (PR #189014)
Sameer Sahasrabuddhe via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 15 03:19:20 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
----------------
ssahasra wrote:
No, that's not what the original sentence was about. Modification order already covers the write W' that comes before the write W in M. But M itself consists of a read R and a dependent write W. The original sentence specifies that R reads from W' (_reads the value in the modification order immediately before the value it writes_). That `rf` is missing in the new sentence.
https://github.com/llvm/llvm-project/pull/189014
More information about the llvm-commits
mailing list