[clang] [z/OS][Clang] Add compare and swap builtin functions (PR #202362)

Ulrich Weigand via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 26 08:02:50 PDT 2026


uweigand wrote:

> @uweigand Would you mind taking a look and sharing your feedback? Thanks

The implementation looks fine - the only feedback I have is more higher-level: these new builtins seem to perform exactly the same operations that can already by achieved by the existing `__builtin_compare_exchange` and `__builtin_compare_exchange_n`  (among other options).    I understand that on z/OS, code may expect these new builtin names, but maybe this could have been achieved by defining them as macros or always-inline functions in some compiler or system header?

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


More information about the cfe-commits mailing list