[clang] [Clang][AMDGPU] Stop defaulting to `one-as` for all atomic scopes (PR #120095)

via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 17 07:25:25 PST 2024


================
@@ -537,7 +537,11 @@ AMDGPUTargetCodeGenInfo::getLLVMSyncScopeID(const LangOptions &LangOpts,
     break;
   }
 
-  if (Ordering != llvm::AtomicOrdering::SequentiallyConsistent) {
+  // OpenCL assumes by default that atomic scopes are per-address space for
+  // non-sequentially consistent operations.
+  if (Scope >= SyncScope::OpenCLWorkGroup &&
----------------
b-sumner wrote:

> > less friction to just leave it there.
> 
> This is how we just end up with an ever-growing pile of garbage nobody understands. Just rip it out.

We'd better make sure we're not breaking OpenCL conformance before we do any ripping.

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


More information about the cfe-commits mailing list