[PATCH] Address Space Casting
Eli Friedman
eli.friedman at gmail.com
Tue Sep 3 16:01:20 PDT 2013
On Tue, Sep 3, 2013 at 3:01 PM, Michele Scandale <michele.scandale at gmail.com
> wrote:
>
>
> ================
> Comment at: lib/IR/AutoUpgrade.cpp:404
> @@ +403,2 @@
> + return Opc;
> +}
> ----------------
> Eli Friedman wrote:
> > 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.
> From what have been discussed before (
> http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-August/064674.html) seems
> that before bitcast was used to convert two pointers between different
> address spaces... That's the reason for that code....
>
"bitcast" has always been defined in LangRef as a no-op. The whole reason
for adding addrspacecast is precisely because it isn't a no-op. They are
clearly not equivalent.
-Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130903/05a5a99b/attachment.html>
More information about the llvm-commits
mailing list