llvm.org GIT mirror llvm / b255b88
Clarify a few things in the inbounds description. Describing inbounds in terms of infinitely precise arithmetic prohibits the assumption address-space-sized integer arithmetic will wrap, with a wrapped-around value landing within the same object. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79538 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 10 years ago
1 changed file(s) with 4 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
40034003

If the inbounds keyword is present, the result value of the

40044004 getelementptr is undefined if the base pointer is not an
40054005 in bounds address of an allocated object, or if any of the addresses
4006 formed by successive addition of the offsets implied by the indices to
4007 the base address are not an in bounds address of that allocated
4008 object.
4006 that would be formed by successive addition of the offsets implied by the
4007 indices to the base address with infinitely precise arithmetic are not an
4008 in bounds address of that allocated object.
40094009 The in bounds addresses for an allocated object are all the addresses
4010 that point into the object, plus the address one past the end.

4010 that point into the object, plus the address one byte past the end.

40114011
40124012

If the inbounds keyword is not present, the offsets are added to

40134013 the base address with silently-wrapping two's complement arithmetic, and