llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-backend-x86 Author: Wenju He (wenju-he) <details> <summary>Changes</summary> Fix kernel build when cl_khr_fp64 is not enabled: opencl-c.h:13785:50: error: unknown type name 'atomic_double' 13785 | double __ovld atomic_fetch_min(volatile __global atomic_double *, double); opencl-c.h:13785:67: error: use of type 'double' requires cl_khr_fp64 and __opencl_c_fp64 support 13785 | double __ovld atomic_fetch_min(volatile __global atomic_double *, double); This is a regression introduced by 423bdb2b. Before that commit, __opencl_c_ext_fp64_global_atomic_add was guarded by cl_khr_fp64 in opencl-c-base.h. --- Full diff: https://github.com/llvm/llvm-project/pull/169252.diff 1 Files Affected: - (modified) clang/lib/Headers/opencl-c.h (+4) ``````````diff diff --git a/clang/lib/Headers/opencl-c.h b/clang/lib/Headers/opencl-c.h index f65b4b314cffd..39f91c139496e 100644 --- a/clang/lib/Headers/opencl-c.h +++ b/clang/lib/Headers/opencl-c.h @@ -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) double __ovld atomic_fetch_min(volatile __global atomic_double *, double); double __ovld atomic_fetch_max(volatile __global atomic_double *, double); @@ -13821,6 +13822,7 @@ double __ovld atomic_fetch_max_explicit(volatile atomic_double *, double, memory_order, memory_scope); #endif // defined(__opencl_c_ext_fp64_global_atomic_min_max) && \ defined(__opencl_c_ext_fp64_local_atomic_min_max) +#endif // cl_khr_fp64 #endif // defined(cl_khr_int64_base_atomics) && \ defined(cl_khr_int64_extended_atomics) @@ -13907,6 +13909,7 @@ float __ovld atomic_fetch_sub_explicit(volatile atomic_float *, defined(__opencl_c_ext_fp32_local_atomic_add) #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_add) double __ovld atomic_fetch_add(volatile __global atomic_double *, double); double __ovld atomic_fetch_sub(volatile __global atomic_double *, double); @@ -13947,6 +13950,7 @@ double __ovld atomic_fetch_sub_explicit(volatile atomic_double *, double, memory_order, memory_scope); #endif // defined(__opencl_c_ext_fp64_global_atomic_add) && \ defined(__opencl_c_ext_fp64_local_atomic_add) +#endif // cl_khr_fp64 #endif // defined(cl_khr_int64_base_atomics) && \ defined(cl_khr_int64_extended_atomics) `````````` </details> https://github.com/llvm/llvm-project/pull/169252 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
