<div dir="ltr">In that case, why do you need to check inbounds at all?<div><br></div><div>Dan</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 16, 2013 at 5:40 PM, Matt Arsenault <span dir="ltr"><<a href="mailto:Matthew.Arsenault@amd.com" target="_blank">Matthew.Arsenault@amd.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><div><div class="h5">
<div>On 08/16/2013 11:40 AM, Dan Gohman
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">On Thu, Aug 15, 2013 at 4:11 PM, Matt Arsenault <span dir="ltr"><<a href="mailto:Matthew.Arsenault@amd.com" target="_blank">Matthew.Arsenault@amd.com</a>></span>
wrote:<br>
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author:
arsenm<br>
Date: Thu Aug 15 18:11:07 2013<br>
New Revision: 188507<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=188507&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=188507&view=rev</a><br>
Log:<br>
Don't do FoldCmpLoadFromIndexedGlobal for non inbounds
GEPs<br>
</blockquote>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>Dan</div>
<div><br>
</div>
</div>
</div>
</div>
</blockquote></div></div>
If you actually load past the end of the object it's undefined, so
it doesn't matter<br>
</div>
</blockquote></div><br></div>