[llvm] [LangRef] Clarify what "not ordered" means in the elementwise description and reject seq_cst elementwise atomics (PR #209931)
Ralf Jung via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 16 12:47:17 PDT 2026
================
@@ -12130,7 +12130,14 @@ An `atomicrmw` instruction can also take an optional
"{ref}`syncscope <syncscope>`" argument.
If the `elementwise` modifier is present, the instruction has per-element vector
-atomic semantics. It behaves as if it were expanded into one scalar `atomicrmw` per element, that are not ordered with respect to each other.
+atomic semantics. It behaves as if it were expanded into one scalar `atomicrmw`
+per element, that are not ordered with respect to each other. In other words, a
+consistent ordering does not exist between the individual scalar operations of
+the same `elementwise` instruction. Synchronizing with one of the scalar
+operations does not, by itself, establish a happens-before relationship with another scalar operation from the same `elementwise` instruction.
----------------
RalfJung wrote:
IMO that would be good to mention (or even to use as the definition).
https://github.com/llvm/llvm-project/pull/209931
More information about the llvm-commits
mailing list