[clang] [Clang][AMDGPU] Stop defaulting to `one-as` for all atomic scopes (PR #120095)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 16 17:08:10 PST 2024
================
@@ -537,7 +537,8 @@ AMDGPUTargetCodeGenInfo::getLLVMSyncScopeID(const LangOptions &LangOpts,
break;
}
- if (Ordering != llvm::AtomicOrdering::SequentiallyConsistent) {
+ if (LangOpts.OpenCL &&
----------------
jhuber6 wrote:
This is not an AMDGPU builitin, the AMDGPU builtin takes a string that corresponds directly to the syncscope string. This is for the 'generic' versions which was reimplemented like three times for OpenCL, HIP, and the GNU / scoped versions. I think that a better solution here would be to only set it if it uses the OpenCL flavored scope arguments, then HIP and C/C++ get the non `one-as` implementation, as those targets don't explicitly use the same AS knowledge.
https://github.com/llvm/llvm-project/pull/120095
More information about the cfe-commits
mailing list