[llvm] r188507 - Don't do FoldCmpLoadFromIndexedGlobal for non inbounds GEPs

Dan Gohman dan433584 at gmail.com
Fri Aug 16 18:24:40 PDT 2013


In that case, why do you need to check inbounds at all?

Dan


On Fri, Aug 16, 2013 at 5:40 PM, Matt Arsenault
<Matthew.Arsenault at amd.com>wrote:

>  On 08/16/2013 11:40 AM, Dan Gohman wrote:
>
> On Thu, Aug 15, 2013 at 4:11 PM, Matt Arsenault <Matthew.Arsenault at amd.com
> > wrote:
>
>> Author: arsenm
>> Date: Thu Aug 15 18:11:07 2013
>> New Revision: 188507
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=188507&view=rev
>> Log:
>> Don't do FoldCmpLoadFromIndexedGlobal for non inbounds GEPs
>>
>
>  I don't see how inbounds is meaningful here. inbounds includes "one past
> the end" pointers, so there is no guarantee that a load from an inbounds
> getelementptr pointer value will load from within the bounds of the object.
>
>  Dan
>
>    If you actually load past the end of the object it's undefined, so it
> doesn't matter
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130816/e91c5e0a/attachment.html>


More information about the llvm-commits mailing list