[clang] [llvm] [AMDGPU][GFX12.5] Reimplement monitor load as an atomic operation (PR #177343)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 5 04:50:49 PST 2026


================
@@ -272,6 +274,26 @@ static inline StringRef mapScopeToSPIRV(StringRef AMDGCNScope) {
   return AMDGCNScope;
 }
 
+static llvm::AtomicOrdering mapCABIAtomicOrdering(unsigned AO) {
+  // Map C11/C++11 memory ordering to LLVM memory ordering
+  assert(llvm::isValidAtomicOrderingCABI(AO));
+  switch (static_cast<llvm::AtomicOrderingCABI>(AO)) {
+  case llvm::AtomicOrderingCABI::acquire:
+  case llvm::AtomicOrderingCABI::consume:
+    return llvm::AtomicOrdering::Acquire;
+    break;
----------------
arsenm wrote:

```suggestion
```

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


More information about the cfe-commits mailing list