[PATCH] D25123: [OpenCL] Fix bug in __builtin_astype causing invalid LLVM cast instructions

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 30 13:20:29 PDT 2016

yaxunl created this revision.
yaxunl added a reviewer: Anastasia.
yaxunl added subscribers: cfe-commits, b-sumner, bader.

__builtin_astype is used to cast OpenCL opaque types to other types, as such, it needs to be able to handle casting from and to pointer types correctly.

Current it cannot handle 1) casting between pointers of different addr spaces 2) casting between pointer type and non-pointer types.

This patch fixes that.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25123.73125.patch
Type: text/x-patch
Size: 5279 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160930/6f48a1b1/attachment.bin>

More information about the cfe-commits mailing list