[llvm] [IR] Require index width to be ule pointer width (PR #70015)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 24 02:00:16 PDT 2023


================
@@ -11061,13 +11062,16 @@ These rules are based on the assumption that no allocated object may cross
 the unsigned address space boundary, and no allocated object may be larger
 than half the pointer index type space.
 
-If the ``inbounds`` keyword is not present, the offsets are added to the
-base address with silently-wrapping two's complement arithmetic. If the
-offsets have a different width from the pointer's index type, they are
-sign-extended or truncated to the width of the pointer's index type. The result
-value of the ``getelementptr`` may be outside the object pointed to by the base
-pointer. The result value may not necessarily be used to access memory
-though, even if it happens to point into allocated storage. See the
+If the ``inbounds`` keyword is not present, the offsets are first
----------------
jayfoad wrote:

I don't understand why this paragraph needs to be qualified by "If the ``inbounds`` keyword is not present".

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


More information about the llvm-commits mailing list