[llvm] [IR] Add elementwise modifier to atomic loads (PR #204556)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 29 04:42:29 PDT 2026


================
@@ -12037,13 +12037,22 @@ If the ``load`` is marked as ``atomic``, it takes an extra :ref:`ordering
 Atomic loads produce :ref:`defined <memmodel>` results when they may see
 multiple atomic stores. The type of the pointee must be an integer, pointer,
 floating-point, or vector type whose bit width is a power of two greater than
-or equal to eight. ``align`` must be
-explicitly specified on atomic loads. Note: if the alignment is not greater or
-equal to the size of the `<value>` type, the atomic operation is likely to
-require a lock and have poor performance. ``!nontemporal`` does not have any
-defined semantics for atomic loads.
-
-The optional constant ``align`` argument specifies the alignment of the
+or equal to eight.
+
+If the ``elementwise`` modifier is present, the loaded type must be a fixed
+vector type, and each element type must be a valid scalar atomic load type. The
+load has per-element vector atomic semantics: it behaves as if it were expanded
----------------
gonzalobg wrote:

```suggestion
load has per-vector-element atomic load semantics: it behaves as if it were expanded
```

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


More information about the llvm-commits mailing list