[Mlir-commits] [clang] [llvm] [mlir] [AMDGPU] Fix missing cache bypass scope on seq_cst buffer fat pointer atomics (PR #213585)
Krzysztof Drewniak
llvmlistbot at llvm.org
Thu Aug 6 08:55:19 PDT 2026
================
@@ -1527,6 +1557,13 @@ void SITargetLowering::getTgtMemIntrinsic(SmallVectorImpl<IntrinsicInfo> &Infos,
// XXX - Should this be volatile without known ordering?
Info.flags |= MachineMemOperand::MOVolatile;
Info.memVT = MVT::getVT(CI.getArgOperand(0)->getType());
+ if (std::optional<SyncScope::ID> SSID =
+ parseBufferAtomicScopeArg(CI)) {
+ // Pretend to be atomic so expandAtomicCmpxchgOrRmw sets cache
+ // bypass bits.
+ Info.order = AtomicOrdering::Monotonic;
+ Info.ssid = *SSID;
+ }
----------------
krzysz00 wrote:
Ok, so yeah, what we could do is "not atomic" is the empty metadata node, and an atomic is a `{oldering, scope}` node.
Assuming that we're not just going to handle this in LowerBufferFatPointers
https://github.com/llvm/llvm-project/pull/213585
More information about the Mlir-commits
mailing list