[llvm] getelementptr inbounds clarifications (PR #65478)

Nuno Lopes via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 7 08:59:43 PDT 2023


================
@@ -10955,15 +10955,17 @@ If the ``inbounds`` keyword is present, the result value of a
 :ref:`poison value <poisonvalues>` if one of the following rules is violated:
 
 *  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.
+   means that it points into an allocated object, or to its end. Note that the
+   object does not have to be live any more; being in-bounds of a deallocated
+   object is sufficient.
 *  If the type of an index is larger than the pointer index type, the
    truncation to the pointer index type preserves the signed value.
 *  The multiplication of an index by the type size does not wrap the pointer
    index type in a signed sense (``nsw``).
-*  The successive addition of offsets (without adding the base address) does
+*  The successive addition each offset (without adding the base address) does
----------------
nunoplopes wrote:

*of* each

https://github.com/llvm/llvm-project/pull/65478


More information about the llvm-commits mailing list