<div dir="ltr">Err, right, sorry, haven't worked with this stuff in a while.<br><br>-Eli<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 16, 2013 at 10:01 PM, Dan Gohman <span dir="ltr"><<a href="mailto:dan433584@gmail.com" target="_blank">dan433584@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">That's actually not valid with either kind of getelementptr.<div><br></div><div>See "Can I compute the distance between two objects, and add that value to one address to compute the other address?" in the GetElementPtr FAQ.<span class="HOEnZb"><font color="#888888"><br>

<div class="gmail_extra"><br>Dan</div></font></span><div><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 16, 2013 at 6:30 PM, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com" target="_blank">eli.friedman@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Because if we don't have inbounds, it could point at a different object in a defined way, e.g. "x[(uintptr_t)&y - (uintptr_t)&x]".<span><font color="#888888"><div>

<br></div></font></span><div><span><font color="#888888">-Eli<br></font></span><div class="gmail_extra"><br>
<br><div class="gmail_quote"><div><div>On Fri, Aug 16, 2013 at 6:24 PM, Dan Gohman <span dir="ltr"><<a href="mailto:dan433584@gmail.com" target="_blank">dan433584@gmail.com</a>></span> wrote:<br></div></div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div>
<div dir="ltr">In that case, why do you need to check inbounds at all?<span><font color="#888888"><div><br></div><div>Dan</div></font></span></div><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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><div><div>
    <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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style: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>
</div></div><br></div></div><div>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div></div></div>
</blockquote></div><br></div>