This is an archive of the discontinued LLVM Phabricator instance.

[OpenCL] Fix builtins that require multiple extensions
ClosedPublic

Authored by svenvh on Mar 4 2021, 3:59 AM.

Details

Summary

Builtins that require multiple extensions, such as certain
write_imagef forms, were not exposed because of the Sema check not
splitting the extension string.

This was found using the prototype of D97869.

Diff Detail

Event Timeline

svenvh created this revision.Mar 4 2021, 3:59 AM
svenvh requested review of this revision.Mar 4 2021, 3:59 AM
Anastasia added inline comments.Mar 5 2021, 5:09 AM
clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl
21

You don't seem to be using write_imagef for OpenCL versions <= 1.2. But should we be checking that the diagnostic is given?

184

Btw OpenCL 3.0 will be like OpenCL 1.2, although we could probably change this check later.

svenvh updated this revision to Diff 328549.Mar 5 2021, 9:13 AM

You don't seem to be using write_imagef for OpenCL versions <= 1.2. But should we be checking that the diagnostic is given?

Good point, I have updated the test to check for the diagnostic.

Anastasia accepted this revision.Mar 8 2021, 4:07 AM

LGTM! Thanks.

clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl
188

if the format ok here?

This revision is now accepted and ready to land.Mar 8 2021, 4:07 AM
This comment was removed by Anastasia.
This revision was automatically updated to reflect the committed changes.