[llvm] [LangRef] Rewrite the elementwise atomic description and reject seq_cst elementwise atomics (PR #209931)

Ralf Jung via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 18 04:04:01 PDT 2026


================
@@ -4181,6 +4181,29 @@ Otherwise, an atomic operation that is not marked
 monotonic modification order with other operations that are not marked
 `syncscope("singlethread")` or `syncscope("<target-scope>")`.
 
+(elementwise-atomics)=
+
+### Elementwise Atomic Operations
+
+Certain atomic instructions, such as {ref}`atomicrmw <i_atomicrmw>`,
+and {ref}`atomic load <i_load>`, may be marked `elementwise`. The access type
+must then be a fixed vector type whose total bit width is a power of two greater
+than or equal to eight, and whose element type is supported by the corresponding
+scalar atomic instruction.
+
+For the purposes of the happens-before relation, the instruction behaves as if
----------------
RalfJung wrote:

It's not just hb, right? It's the same for rf (reads-from) and po (program-order, also sometimes called sequenced-before).
```suggestion
For the purposes of the memory model orders (happens-before, sequenced-before, etc), the instruction behaves as if
```

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


More information about the llvm-commits mailing list