This generalizes the offset check used when figuring out if two pointers derived from two different allocas (or one alloca and one global) can be equal.
Specifically, it handles the following cases:
- Both offsets are positive, but one or more crosses into the second object, but by less than the offset on the other pointer. (i.e. offset b is strictly greater than the offset a can obtain into object b.)
- Both negative offsets
- Mix of negative and positive offsets
I vaguely think there should be a more concise way to write these checks. Anyone see one?