[libclc] [NFC][libclc] Merge atomic extension built-ins with identical name into a single file (PR #134489)

Fraser Cormack via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 10 01:55:06 PDT 2025


================
@@ -0,0 +1,24 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifdef cl_khr_global_int32_extended_atomics
+#define __CLC_FUNCTION atom_and
+#define __CLC_ADDRESS_SPACE global
+#include <clc/atomic/atom_decl_int32.inc>
+#endif // cl_khr_global_int32_extended_atomics
+
+#ifdef cl_khr_local_int32_extended_atomics
+#define __CLC_FUNCTION atom_and
+#define __CLC_ADDRESS_SPACE local
+#include <clc/atomic/atom_decl_int32.inc>
+#endif // cl_khr_local_int32_extended_atomics
+
+#ifdef cl_khr_int64_base_atomics
----------------
frasercrmck wrote:

I think this should be `cl_khr_int64_extended_atomics`.

https://github.com/llvm/llvm-project/pull/134489


More information about the cfe-commits mailing list