[llvm] r191200 - InstSimplify: Fold equality comparisons between non-inbounds GEPs.
duncan.sands at gmail.com
Thu Sep 26 09:14:11 PDT 2013
>> Suppose this example was
>> %x = getelementptr i64* %a, i64 4294967296
>> i.e. offset of 2^32.
>> On a 32 bit machine, %x is equal to %a, so the comparison should not be folded
>> to "false" on such machines.
> Yup, and accumulateConstantOffset does its computation in the intptr width and gets this right.
sounds good, I didn't realize that. Thanks for explaining :)
Your example is correctly folded to "true". Did you have another example where
we get it wrong now?
Nope, I was just catching up with email and spotted this.
More information about the llvm-commits