[llvm] 9922c78 - [Docs] Fix a statement wrt instruction alignment of 0

Shivam Gupta via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 27 03:58:42 PST 2023


Author: Shivam Gupta
Date: 2023-01-27T17:29:15+05:30
New Revision: 9922c78a67eb1eaffc0337dbda7777caa841929c

URL: https://github.com/llvm/llvm-project/commit/9922c78a67eb1eaffc0337dbda7777caa841929c
DIFF: https://github.com/llvm/llvm-project/commit/9922c78a67eb1eaffc0337dbda7777caa841929c.diff

LOG: [Docs] Fix a statement wrt instruction alignment of 0

This fix https://github.com/llvm/llvm-project/issues/53371
Zero is not a legal alignment.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D142633

Added: 
    

Modified: 
    llvm/docs/LangRef.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index d2e53b6bcd967..badae011ddcd6 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -10302,17 +10302,16 @@ the alignment is not set to a value which is at least the size in bytes of the
 pointee. ``!nontemporal`` does not have any defined semantics for atomic stores.
 
 The optional constant ``align`` argument specifies the alignment of the
-operation (that is, the alignment of the memory address). A value of 0
-or an omitted ``align`` argument means that the operation has the ABI
-alignment for the target. It is the responsibility of the code emitter
-to ensure that the alignment information is correct. Overestimating the
-alignment results in undefined behavior. Underestimating the
-alignment may produce less efficient code. An alignment of 1 is always
-safe. The maximum possible alignment is ``1 << 32``. An alignment
-value higher than the size of the stored type implies memory up to the
-alignment value bytes can be stored to without trapping in the default
-address space. Storing to the higher bytes however may result in data
-races if another thread can access the same address. Introducing a
+operation (that is, the alignment of the memory address). An omitted ``align``
+argument means that the operation has the ABI alignment for the target.
+It is the responsibility of the code emitter to ensure that the alignment
+information is correct. Overestimating the alignment results in undefined
+behavior. Underestimating the alignment may produce less efficient code.
+An alignment of 1 is always safe. The maximum possible alignment is ``1 << 32``.
+An alignment value higher than the size of the stored type implies memory
+up to the alignment value bytes can be stored to without trapping in
+the default address space. Storing to the higher bytes however may result in
+data races if another thread can access the same address. Introducing a
 data race is not allowed. Storing to the extra bytes is not allowed
 even in situations where a data race is known to not exist if the
 function has the ``sanitize_address`` attribute.


        


More information about the llvm-commits mailing list