[llvm] [NVPTX] Cleanup support for atomic loads/stores (PR #201468)

Akshay Deodhar via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 9 14:55:20 PDT 2026


================
@@ -8043,12 +8043,36 @@ NVPTXTargetLowering::shouldExpandAtomicRMWInIR(const AtomicRMWInst *AI) const {
   return AtomicExpansionKind::CmpXChg;
 }
 
+// clang-format off
+// Atomic load lowering grid (rows: native memory-ordering support; columns:
+// LLVM ordering):
+//
+//   ld.acquire    seq_cst                              acquire
+//   supported     fence.sc; ld.acquire                 ld.acquire
+//   unsupported   fence.sc; ld.relaxed; fence.acquire  ld.relaxed; fence.acquireExpand commentComment on line R7609
----------------
akshayrdeodhar wrote:

Explain that this is an LLVM IR expansion, and that fence seq_cst and fence acquire in LLVM IR will be lowered to membar (which is stronger than the fence)

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


More information about the llvm-commits mailing list