[PATCH] Remove seemingly dead InstCombine compare code

Matt Arsenault Matthew.Arsenault at amd.com
Wed Aug 14 16:16:19 PDT 2013


On 08/12/2013 04:16 PM, Eli Friedman wrote:
> On Mon, Aug 5, 2013 at 3:11 PM, Matt Arsenault
> <Matthew.Arsenault at amd.com> wrote:
>>    Add missing check lines
>>
>>    test1_noinbounds shows the current behavior. Why wouldn't it be valid?
> Because you don't know how X was computed, it could be anything.  For
> example, it could be "@some_other_zero_int - @G16", an arbitrarily
> large number which is not 9, but the address would point at a 0.
>
> If that's the current behavior, it's a bug.
>
> -Eli
>
I still don't really understand. If you're subtracting the addresses of 
2 different objects, that's undefined. If you're accessing somewhere 
outside of the global, that is also undefined, so how is there another 
legal way to access the same item?




More information about the llvm-commits mailing list