================
@@ -159,6 +159,13 @@ class LLVM_LIBRARY_VISIBILITY NVPTXTargetInfo : public
TargetInfo {
Opts["cl_khr_global_int32_extended_atomics"] = true;
Opts["cl_khr_local_int32_base_atomics"] = true;
Opts["cl_khr_local_int32_extended_atomics"] = true;
+ // PTX supports 64-bit atomics natively on 64-bit targets even though the
+ // NVIDIA OpenCL runtime does not report these extensions. libclc needs
+ // them enabled to define the 64-bit atomic builtins.
+ if (getMaxAtomicInlineWidth() >= 64) {
----------------
wenju-he wrote:
use MaxAtomicInlineWidth directly instead of a call?
https://github.com/llvm/llvm-project/pull/213691
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits