Skip to content

LangRef: getelementptr: inbounds is about the object the pointer is 'based on' #95650

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions llvm/docs/LangRef.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11390,10 +11390,10 @@ For ``nuw`` (no unsigned wrap):
For ``inbounds`` all rules of the ``nusw`` attribute apply. Additionally,
if the ``getelementptr`` has any non-zero indices, the following rules apply:

* The base pointer has an *in bounds* address of an allocated object, which
means that it points into an allocated object, or to its end. Note that the
object does not have to be live anymore; being in-bounds of a deallocated
object is sufficient.
* The base pointer has an *in bounds* address of the allocated object that it
is :ref:`based <pointeraliasing>` on. This means that it points into that
allocated object, or to its end. Note that the object does not have to be
live anymore; being in-bounds of a deallocated object is sufficient.
* During the successive addition of offsets to the address, the resulting
pointer must remain *in bounds* of the allocated object at each step.

Expand Down
Loading