[llvm] r191200 - InstSimplify: Fold equality comparisons between non-inbounds GEPs.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Sep 26 09:35:39 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. 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 :-)

Cheers,
Rafael



More information about the llvm-commits mailing list