[clang] [llvm] [SPIRV][RFC] Rework / extend support for memory scopes (PR #106429)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 28 21:47:53 PDT 2024


================
@@ -335,6 +335,9 @@ class LLVM_LIBRARY_VISIBILITY SPIRV32TargetInfo : public BaseSPIRVTargetInfo {
     PointerWidth = PointerAlign = 32;
     SizeType = TargetInfo::UnsignedInt;
     PtrDiffType = IntPtrType = TargetInfo::SignedInt;
+    // SPIR-V has core support for atomic ops, and Int32 is always available;
+    // we take the maximum because it's possible the Host supports wider types.
+    MaxAtomicInlineWidth = std::max<unsigned char>(MaxAtomicInlineWidth, 32);
----------------
arsenm wrote:

Isn't there a 64-bit atomic extension? How are extensions supposed to work here? 

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


More information about the cfe-commits mailing list