[PATCH] D114553: [HIP] Add atomic load, atomic store and atomic cmpxchng_weak builtin support in HIP-clang
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 29 07:28:12 PST 2021
yaxunl added inline comments.
================
Comment at: clang/test/SemaCUDA/atomic-ops.cu:69-74
+ flag = __hip_atomic_compare_exchange_weak(ptr, 0, 0, 0, 0, __HIP_MEMORY_SCOPE_SYSTEM); // expected-warning {{null passed to a callee that requires a non-null argument}}
+ flag = __hip_atomic_compare_exchange_weak(ptr, &val, desired, 0, 0, __HIP_MEMORY_SCOPE_SYSTEM);
+ flag = __hip_atomic_compare_exchange_weak(ptr, &val, desired, 1, 0, __HIP_MEMORY_SCOPE_SINGLETHREAD);
+ flag = __hip_atomic_compare_exchange_weak(ptr, &val, desired, 1, 0, __HIP_MEMORY_SCOPE_WAVEFRONT);
+ flag = __hip_atomic_compare_exchange_weak(ptr, &val, desired, 1, 1, __HIP_MEMORY_SCOPE_WORKGROUP);
+ flag = __hip_atomic_compare_exchange_weak(ptr, &val, desired, 1, 1, __HIP_MEMORY_SCOPE_AGENT);
----------------
pls use pre-defined macros for memory order
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114553/new/
https://reviews.llvm.org/D114553
More information about the cfe-commits
mailing list