<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 14, 2015 at 11:13 AM, JF Bastien <span dir="ltr"><<a href="mailto:jfb@google.com" target="_blank">jfb@google.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"><div class="gmail_extra"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">GetElementPointers must have the first argument's type compared<br>
for structural equivalence. Previously the code erroneously compared the<br>
pointer's type, but this code was dead because all pointer types (of the<br>
same address space) are the same. The pointee must be compared instead<br>
(using the type stored in the GEP, not from the pointer type which will<br>
be erased anyway).<br></blockquote></span><div><br>Thanks so much for being aware of this/using APIs that'll be forwards compatible with the eventual removal of typed pointers.<br><br>Just in case: do you care about the GEP pointer operands address space (I assume not) or vector types (eg: a gep over a vector of pointers)? I assume not, but just checking - both those aspects of the pointer operand are still in the pointer operand's type, not in the source element type.</div></div></div></div></blockquote><div><br></div></span><div>We do care about address spaces in general: we can't merge two functions if they refer to different address spaces. I'm not sure that's what you're asking for though: in the end we (roughly) only want to merge functions that would codegen to the same code. I think the same applies to your vector of pointers question?</div></div></div></div></blockquote><div><br></div><div>My point was - do you care if these two GEPs refer to different pointers from address spaces? What if the GEPs are differently vectored (if vector GEPs can exist in this codepath, etc)?<br><br>If you do care about the (in)equality of address space or vector-ness in these two GEPs, you'll need to compare those - those would've previously been caught by just comparing the two GEPs pointer operand types, but won't be any more with this change.</div><div> </div></div><br></div></div>