This is an archive of the discontinued LLVM Phabricator instance.

[OpenCL] Fix bug in __builtin_astype causing invalid LLVM cast instructions
ClosedPublic

Authored by yaxunl on Sep 30 2016, 1:20 PM.

Details

Summary

__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.

Diff Detail

Repository
rL LLVM

Event Timeline

yaxunl updated this revision to Diff 73125.Sep 30 2016, 1:20 PM
yaxunl retitled this revision from to [OpenCL] Fix bug in __builtin_astype causing invalid LLVM cast instructions.
yaxunl updated this object.
yaxunl added a reviewer: Anastasia.
yaxunl added subscribers: cfe-commits, b-sumner, bader.
Anastasia accepted this revision.Oct 2 2016, 10:43 AM
Anastasia edited edge metadata.

LGTM! Thanks!

This revision is now accepted and ready to land.Oct 2 2016, 10:43 AM
This revision was automatically updated to reflect the committed changes.