From 5c21b292f9a6949a29f75a240295fd6890b2d4dd Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 15 Jun 2024 10:53:57 +0200 Subject: [PATCH] LangRef: getelementptr: inbounds is about the object the pointer is 'based on' --- llvm/docs/LangRef.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index 6935ccdfc9196..fcf6d310d03de 100644 --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -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 ` 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.