<div dir="ltr">On Tue, Sep 3, 2013 at 3:01 PM, Michele Scandale <span dir="ltr"><<a href="mailto:michele.scandale@gmail.com" target="_blank">michele.scandale@gmail.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"><div class="im"><br>
<br>
================<br>
Comment at: lib/IR/AutoUpgrade.cpp:404<br>
@@ +403,2 @@<br>
+  return Opc;<br>
+}<br>
----------------<br>
</div><div class="im">Eli Friedman wrote:<br>
> This isn't appropriate: this transformation changes the semantics of the code.  bitcast is explicitly not equivalent to addrspacecast; it's equivalent to a ptrtoint+inttoptr pair.<br>
</div>From what have been discussed before (<a href="http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-August/064674.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-August/064674.html</a>) seems that before bitcast was used to convert two pointers between different address spaces... That's the reason for that code....<br>

<div class="im"></div></blockquote></div><br></div><div class="gmail_extra">"bitcast" has always been defined in LangRef as a no-op.  The whole reason for adding <span style="font-family:arial,sans-serif;font-size:13px">addrspacecast is precisely because it isn't a no-op.  They are clearly not equivalent.</span></div>
<div class="gmail_extra"><br></div><div class="gmail_extra">-Eli</div></div>