[PATCH] D97930: [OpenCL] Fix builtins that require multiple extensions

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 5 05:09:07 PST 2021


Anastasia added inline comments.


================
Comment at: clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl:21
+#if __OPENCL_C_VERSION__ <= CL_VERSION_1_2
+#pragma OPENCL EXTENSION cl_khr_3d_image_writes : enable
+#endif
----------------
You don't seem to be using `write_imagef` for OpenCL versions <= 1.2. But should we be checking that the diagnostic is given?


================
Comment at: clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl:184
+
+#if defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200
+  int4 i4;
----------------
Btw OpenCL 3.0 will be like OpenCL 1.2, although we could probably change this check later.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97930/new/

https://reviews.llvm.org/D97930



More information about the cfe-commits mailing list