This is an archive of the discontinued LLVM Phabricator instance.

[OpenCL] Fix size of image type
ClosedPublic

Authored by yaxunl on Jul 28 2016, 11:58 AM.

Details

Summary

The size of image type is reported incorrectly as size of a pointer to address space 0, which causes error when casting image type to pointers by __builtin_astype.

The fix is to get image address space from TargetInfo then report the size accordingly.

Diff Detail

Event Timeline

yaxunl updated this revision to Diff 65964.Jul 28 2016, 11:58 AM
yaxunl retitled this revision from to [OpenCL] Fix size of image type.
yaxunl updated this object.
yaxunl added a reviewer: Anastasia.
yaxunl added subscribers: cfe-commits, tstellarAMD.
Anastasia accepted this revision.Aug 1 2016, 11:30 AM
Anastasia edited edge metadata.

LGTM!

This revision is now accepted and ready to land.Aug 1 2016, 11:30 AM
This revision was automatically updated to reflect the committed changes.