[clang] [OpenCL] Add cl_khr_fp64 guard for atomic_double/double in cl_ext_float_atomics functions (PR #169252)
Wenju He via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 23 22:13:58 PST 2025
================
@@ -13781,6 +13781,7 @@ float __ovld atomic_fetch_max_explicit(volatile atomic_float *,
defined(__opencl_c_ext_fp32_local_atomic_min_max)
#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
+#ifdef cl_khr_fp64
#if defined(__opencl_c_ext_fp64_global_atomic_min_max)
----------------
wenju-he wrote:
> Interesting... maybe `__opencl_c_ext_fp64_global_atomic_min_max` should not be defined if `cl_khr_fp64` is not supported.
thanks for the suggestion. I've reverted the first commit and disabled `__opencl_c_ext_fp64_global_atomic_min_max` when `cl_khr_fp64` is not supported in commit https://github.com/llvm/llvm-project/pull/169252/commits/9f397aa93a29ede5fce75f75fb74b5e2dda88dcc
https://github.com/llvm/llvm-project/pull/169252
More information about the cfe-commits
mailing list