================ @@ -0,0 +1,36 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include <clc/clcfunc.h> +#include <clc/clctypes.h> + +// cl_khr_global_int32_base_atomics +_CLC_OVERLOAD _CLC_DECL int atom_cmpxchg(volatile global int *p, int cmp, + int val); +_CLC_OVERLOAD _CLC_DECL unsigned int +atom_cmpxchg(volatile global unsigned int *p, unsigned int cmp, + unsigned int val); + +// cl_khr_local_int32_base_atomics +_CLC_OVERLOAD _CLC_DECL int atom_cmpxchg(volatile local int *p, int cmp, + int val); +_CLC_OVERLOAD _CLC_DECL unsigned int +atom_cmpxchg(volatile local unsigned int *p, unsigned int cmp, + unsigned int val); + +// cl_khr_int64_base_atomics +_CLC_OVERLOAD _CLC_DECL long atom_cmpxchg(volatile global long *p, long cmp, ---------------- frasercrmck wrote:
Should this not be guarded by `#if cl_khr_int64_extended_atomics`? I don't think we can have unguarded `long` types. https://github.com/llvm/llvm-project/pull/134489 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits