[llvm] [NVPTX] Add syncscope support for cmpxchg (PR #140812)
via llvm-commits
llvm-commits at lists.llvm.org
Fri May 30 09:33:37 PDT 2025
================
@@ -303,6 +304,7 @@ bool AtomicExpandImpl::processAtomicInstr(Instruction *I) {
if (TLI->shouldInsertFencesForAtomic(I)) {
auto FenceOrdering = AtomicOrdering::Monotonic;
+ SyncScope::ID SSID = SyncScope::System;
if (LI && isAcquireOrStronger(LI->getOrdering())) {
FenceOrdering = LI->getOrdering();
LI->setOrdering(AtomicOrdering::Monotonic);
----------------
gonzalobg wrote:
I was expecting load, store, and rmw to require changes here as well.
If the intent is to incrementally improve it for CAS only, it may make sense to leave a TODO comment on these to call that out.
https://github.com/llvm/llvm-project/pull/140812
More information about the llvm-commits
mailing list