Skip to content

Commit c0cc0af

Browse files
committed
!fixup address latest comments, thanks!
1 parent 371b527 commit c0cc0af

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

llvm/docs/LangRef.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3295,7 +3295,8 @@ that is :ref:`based on <pointeraliasing>` the allocation value. If a pointer
32953295
that is not based on the object tries to read or write to the object, it is
32963296
undefined behavior.
32973297

3298-
The following properties hold for all allocated objects:
3298+
The following properties hold for all allocated objects, otherwise the
3299+
behavior is undefined:
32993300

33003301
- no allocated object may cross the unsigned address space boundary (including
33013302
the pointer after the end of the object),
@@ -11718,8 +11719,9 @@ For ``nuw`` (no unsigned wrap):
1171811719
For ``inbounds`` all rules of the ``nusw`` attribute apply. Additionally,
1171911720
if the ``getelementptr`` has any non-zero indices, the following rules apply:
1172011721

11721-
* The base pointer has an *in bounds* address of the allocated object that it
11722-
is :ref:`based <pointeraliasing>` on. This means that it points into that
11722+
* The base pointer has an *in bounds* address of the
11723+
:ref:`allocated object<allocatedobjects>` that it is
11724+
:ref:`based <pointeraliasing>` on. This means that it points into that
1172311725
allocated object, or to its end. Note that the object does not have to be
1172411726
live anymore; being in-bounds of a deallocated object is sufficient.
1172511727
* During the successive addition of offsets to the address, the resulting
@@ -11730,9 +11732,6 @@ Note that ``getelementptr`` with all-zero indices is always considered to be
1173011732
As a corollary, the only pointer in bounds of the null pointer in the default
1173111733
address space is the null pointer itself.
1173211734

11733-
These rules are based on the assumption for
11734-
:ref:`allocated object<allocatedobjects>`.
11735-
1173611735
If ``inbounds`` is present on a ``getelementptr`` instruction, the ``nusw``
1173711736
attribute will be automatically set as well. For this reason, the ``nusw``
1173811737
will also not be printed in textual IR if ``inbounds`` is already present.
@@ -26468,7 +26467,7 @@ can belong to any address space.
2646826467
Overview:
2646926468
"""""""""
2647026469

26471-
The '``llvm.invariant.end``' intrinsic specifies that the contents of a
26470+
The '``llvm.invariant.end``' intrinsic specifies that the contents of an
2647226471
:ref:`allocated object<allocatedobjects>` are mutable.
2647326472

2647426473
Arguments:

0 commit comments

Comments
 (0)