Skip to content

Commit 6cfebf3

Browse files
committed
[Docs] Fix a statement wrt instruction alignment of 0
1 parent c17ccce commit 6cfebf3

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

llvm/docs/LangRef.rst

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10164,18 +10164,16 @@ alignment is not set to a value which is at least the size in bytes of the
1016410164
pointee. ``!nontemporal`` does not have any defined semantics for atomic loads.
1016510165

1016610166
The optional constant ``align`` argument specifies the alignment of the
10167-
operation (that is, the alignment of the memory address). A value of 0
10168-
or an omitted ``align`` argument means that the operation has the ABI
10169-
alignment for the target. It is the responsibility of the code emitter
10170-
to ensure that the alignment information is correct. Overestimating the
10171-
alignment results in undefined behavior. Underestimating the alignment
10172-
may produce less efficient code. An alignment of 1 is always safe. The
10173-
maximum possible alignment is ``1 << 32``. An alignment value higher
10174-
than the size of the loaded type implies memory up to the alignment
10175-
value bytes can be safely loaded without trapping in the default
10176-
address space. Access of the high bytes can interfere with debugging
10177-
tools, so should not be accessed if the function has the
10178-
``sanitize_thread`` or ``sanitize_address`` attributes.
10167+
operation (that is, the alignment of the memory address). An omitted ``align``
10168+
argument means that the operation has the ABI alignment for the target. It is
10169+
the responsibility of the code emitter to ensure that the alignment information
10170+
is correct. Overestimating the alignment results in undefined behavior.
10171+
Underestimating the alignment may produce less efficient code. An alignment of 1 is
10172+
always safe. The maximum possible alignment is ``1 << 32``. An alignment value higher
10173+
than the size of the loaded type implies memory up to the alignment value bytes can
10174+
be safely loaded without trapping in the default address space. Access of the high
10175+
bytes can interfere with debugging tools, so should not be accessed if the function
10176+
has the ``sanitize_thread`` or ``sanitize_address`` attributes.
1017910177

1018010178
The optional ``!nontemporal`` metadata must reference a single
1018110179
metadata name ``<nontemp_node>`` corresponding to a metadata node with one

0 commit comments

Comments
 (0)