[PATCH] D96524: [OpenCL] Add support of OpenCL C 3.0 __opencl_c_fp64

Anton Zabaznov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 19 03:18:11 PDT 2021


azabaznov marked an inline comment as done.
azabaznov added inline comments.


================
Comment at: clang/test/CodeGenOpenCL/printf.cl:9
 
-#ifdef cl_khr_fp64
+#if defined(cl_khr_fp64) || defined(__opencl_c_fp64)
 typedef __attribute__((ext_vector_type(2))) double double2;
----------------
Anastasia wrote:
> I think we don't technically need this change?
To be honest I am not sure. I think per OpenCL C spec extension feature macros should be used exactly as follows:

```
...
if defined(cl_khr_fp64) || defined(__opencl_c_fp64)
...
```

So I think this is OK to have such checks in tests as soon as we have functionality for simultaneous support (`opencl-c-3.0.incorrect_options.cl`). If we decide to change that behaviour - this test will fail.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96524



More information about the cfe-commits mailing list