[clang] 074451b - [OpenCL] opencl-c.h: fix atomic_fetch_max with addrspace
Sven van Haastregt via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 15 04:12:30 PST 2022
Author: Sven van Haastregt
Date: 2022-02-15T12:12:03Z
New Revision: 074451bd3352e022d015545e9091002d052daaa3
URL: https://github.com/llvm/llvm-project/commit/074451bd3352e022d015545e9091002d052daaa3
DIFF: https://github.com/llvm/llvm-project/commit/074451bd3352e022d015545e9091002d052daaa3.diff
LOG: [OpenCL] opencl-c.h: fix atomic_fetch_max with addrspace
Commit 3c7d2f1b67d1 ("[OpenCL] opencl-c.h: add CL 3.0 non-generic
address space atomics", 2021-07-30) added some atomic_fetch_add/sub
overloads with uintptr_t arguments twice. Instead, they should have
been atomic_fetch_max overloads with non-generic address spaces.
Added:
Modified:
clang/lib/Headers/opencl-c.h
Removed:
################################################################################
diff --git a/clang/lib/Headers/opencl-c.h b/clang/lib/Headers/opencl-c.h
index 98c92fd7ef0a3..7a2ddc47c9a1b 100644
--- a/clang/lib/Headers/opencl-c.h
+++ b/clang/lib/Headers/opencl-c.h
@@ -13424,8 +13424,8 @@ long __ovld atomic_fetch_max(volatile __global atomic_long *object, long operand
long __ovld atomic_fetch_max(volatile __local atomic_long *object, long operand);
ulong __ovld atomic_fetch_max(volatile __global atomic_ulong *object, ulong operand);
ulong __ovld atomic_fetch_max(volatile __local atomic_ulong *object, ulong operand);
-uintptr_t __ovld atomic_fetch_add(volatile __global atomic_uintptr_t *object, ptr
diff _t operand);
-uintptr_t __ovld atomic_fetch_sub(volatile __local atomic_uintptr_t *object, ptr
diff _t operand);
+uintptr_t __ovld atomic_fetch_max(volatile __global atomic_uintptr_t *object, uintptr_t operand);
+uintptr_t __ovld atomic_fetch_max(volatile __local atomic_uintptr_t *object, uintptr_t operand);
#endif //defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
#endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
#endif
@@ -13543,8 +13543,8 @@ long __ovld atomic_fetch_max_explicit(volatile __global atomic_long *object, lon
long __ovld atomic_fetch_max_explicit(volatile __local atomic_long *object, long operand, memory_order order);
ulong __ovld atomic_fetch_max_explicit(volatile __global atomic_ulong *object, ulong operand, memory_order order);
ulong __ovld atomic_fetch_max_explicit(volatile __local atomic_ulong *object, ulong operand, memory_order order);
-uintptr_t __ovld atomic_fetch_add_explicit(volatile __global atomic_uintptr_t *object, ptr
diff _t operand, memory_order order);
-uintptr_t __ovld atomic_fetch_sub_explicit(volatile __local atomic_uintptr_t *object, ptr
diff _t operand, memory_order order);
+uintptr_t __ovld atomic_fetch_max_explicit(volatile __global atomic_uintptr_t *object, uintptr_t operand, memory_order order);
+uintptr_t __ovld atomic_fetch_max_explicit(volatile __local atomic_uintptr_t *object, uintptr_t operand, memory_order order);
#endif //defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
#endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
#endif
@@ -13661,8 +13661,8 @@ long __ovld atomic_fetch_max_explicit(volatile __global atomic_long *object, lon
long __ovld atomic_fetch_max_explicit(volatile __local atomic_long *object, long operand, memory_order order, memory_scope scope);
ulong __ovld atomic_fetch_max_explicit(volatile __global atomic_ulong *object, ulong operand, memory_order order, memory_scope scope);
ulong __ovld atomic_fetch_max_explicit(volatile __local atomic_ulong *object, ulong operand, memory_order order, memory_scope scope);
-uintptr_t __ovld atomic_fetch_add_explicit(volatile __global atomic_uintptr_t *object, ptr
diff _t operand, memory_order order, memory_scope scope);
-uintptr_t __ovld atomic_fetch_sub_explicit(volatile __local atomic_uintptr_t *object, ptr
diff _t operand, memory_order order, memory_scope scope);
+uintptr_t __ovld atomic_fetch_max_explicit(volatile __global atomic_uintptr_t *object, uintptr_t operand, memory_order order, memory_scope scope);
+uintptr_t __ovld atomic_fetch_max_explicit(volatile __local atomic_uintptr_t *object, uintptr_t operand, memory_order order, memory_scope scope);
#endif //defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
#endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
More information about the cfe-commits
mailing list