This shows up with with OpenMP offloading as libgomp since a couple of months uses __atomic_compare_exchange (see PR for details), causing link errors when the gcn libgomp.a is linked. It also shows up with sollve_vv. The implementation does a bit copy'n'paste from the current implementation + calls the existing word/uint32_t-wide version of the atomic intrinsic. The semantic is described at https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html In terms of the args, the _4 has: DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_COMPARE_EXCHANGE_4, "__atomic_compare_exchange_4", BT_FN_BOOL_VPTR_PTR_I4_BOOL_INT_INT, ATTR_NOTHROWCALL_LEAF_LIST) and the arg names try to match the GCC manual. OK for mainline? Tested with libgomp + sollve_vv and -march=gfx908. Tobias ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955