[llvm] r191200 - InstSimplify: Fold equality comparisons between non-inbounds GEPs.
benny.kra at gmail.com
Sat Sep 28 14:31:27 PDT 2013
On 26.09.2013, at 18:35, Rafael Espíndola <rafael.espindola at gmail.com> wrote:
>>> 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. Your example is correctly folded to "true". Did you have another example where we get it wrong now?
> Sounds like a nice testcase to have checked in :-)
More information about the llvm-commits