Skip to content

Commit 2b1a780

Browse files
committed
Updated per review.
1 parent 73f2b64 commit 2b1a780

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

llvm/docs/LangRef.rst

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10515,10 +10515,10 @@ Atomic loads produce :ref:`defined <memmodel>` results when they may see
1051510515
multiple atomic stores. The type of the pointee must be an integer, pointer, or
1051610516
floating-point type whose bit width is a power of two greater than or equal to
1051710517
eight and less than or equal to a target-specific size limit. ``align`` must be
10518-
explicitly specified on atomic loads and must typically be a power of two greater
10519-
or equal to the size of the `<value>` type, or the AtomicExpand pass will convert
10520-
it to a libcall. ``!nontemporal`` does not have any defined semantics for atomic
10521-
loads.
10518+
explicitly specified on atomic loads. Note: if the alignment is not greater or
10519+
equal to the size of the `<value>` type, the atomic operation is likely to
10520+
require a lock and have poor performance. ``!nontemporal`` does not have any
10521+
defined semantics for atomic loads.
1052210522

1052310523
The optional constant ``align`` argument specifies the alignment of the
1052410524
operation (that is, the alignment of the memory address). It is the
@@ -10656,13 +10656,10 @@ Atomic loads produce :ref:`defined <memmodel>` results when they may see
1065610656
multiple atomic stores. The type of the pointee must be an integer, pointer, or
1065710657
floating-point type whose bit width is a power of two greater than or equal to
1065810658
eight and less than or equal to a target-specific size limit. ``align`` must be
10659-
explicitly specified on atomic stores and must typically be a power of two
10660-
greater or equal to the size of the `<value>` type, or the AtomicExpand pass will
10661-
convert it to a libcall.
10662-
10663-
and the store has undefined behavior if
10664-
the alignment is not set to a value which is at least the size in bytes of the
10665-
pointee. ``!nontemporal`` does not have any defined semantics for atomic stores.
10659+
explicitly specified on atomic stores. Note: if the alignment is not greater or
10660+
equal to the size of the `<value>` type, the atomic operation is likely to
10661+
require a lock and have poor performance. ``!nontemporal`` does not have any
10662+
defined semantics for atomic stores.
1066610663

1066710664
The optional constant ``align`` argument specifies the alignment of the
1066810665
operation (that is, the alignment of the memory address). It is the
@@ -10812,8 +10809,9 @@ must be at least ``monotonic``, the failure ordering cannot be either
1081210809
A ``cmpxchg`` instruction can also take an optional
1081310810
":ref:`syncscope <syncscope>`" argument.
1081410811

10815-
Typically, the alignment must be a power of two greater or equal to the size
10816-
of the `<value>` type, or the AtomicExpand pass will convert it to a libcall.
10812+
Note: if the alignment is not greater or equal to the size of the `<value>`
10813+
type, the atomic operation is likely to require a lock and have poor
10814+
performance.
1081710815

1081810816
The alignment is only optional when parsing textual IR; for in-memory IR, it is
1081910817
always present. If unspecified, the alignment is assumed to be equal to the
@@ -10915,8 +10913,9 @@ the ``atomicrmw`` is marked as ``volatile``, then the optimizer is not
1091510913
allowed to modify the number or order of execution of this
1091610914
``atomicrmw`` with other :ref:`volatile operations <volatile>`.
1091710915

10918-
Typically, the alignment must be a power of two greater or equal to the size
10919-
of the `<value>` type, or the AtomicExpand pass will convert it to a libcall.
10916+
Note: if the alignment is not greater or equal to the size of the `<value>`
10917+
type, the atomic operation is likely to require a lock and have poor
10918+
performance.
1092010919

1092110920
The alignment is only optional when parsing textual IR; for in-memory IR, it is
1092210921
always present. If unspecified, the alignment is assumed to be equal to the

0 commit comments

Comments
 (0)