[PATCH] Fix assert with copy from global through addrspacecast
Matt Arsenault
Matthew.Arsenault at amd.com
Fri Dec 6 12:51:10 PST 2013
================
Comment at: lib/IR/Constants.cpp:1510
@@ +1509,3 @@
+ return getBitCast(S, Ty);
+}
+
----------------
Michele Scandale wrote:
> Matt Arsenault wrote:
> > Michele Scandale wrote:
> > > Maybe this function can be fused within getPointerCast in order to support there the case of pointers with different address spaces.
> > I tried that originally, but the results weren't satisfying. The asserts are different since getBitCastOrAddrSpaceCast only accepts pointer<->pointer casts, while getPointerCast accepts integer destinations.
> That's ok, IMHO a more general name would be better (like getPointerToPointerCast).
>
> However, the getPointerCast must be fixed in order to create the proper cast also when the destination type has a different address space with respect to the source Constant.
That is already handled, I just updated the comment
http://llvm-reviews.chandlerc.com/D2205
More information about the llvm-commits
mailing list