[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 08:18:52 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:
Happens-before is fully defined in terms of other relations, so if this paragraph here was intending to change the definition of happens-before that'd be a pretty fundamental change. I also think C++ terms should be introduced somewhere since that's the terms the C++ model is defined in, and it's not like we have another more credible model we could use instead.
But I think I see your point. I am also fine with just "For the purposes of the memory model".
https://github.com/llvm/llvm-project/pull/209931
More information about the llvm-commits
mailing list