[clang] [CUDA] Use monotonic ordering for __nvvm_atom* builtins (PR #185822)

Artem Belevich via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 11 18:14:14 PDT 2026


================
@@ -98,8 +98,12 @@ llvm::Value *EmitOverflowIntrinsic(clang::CodeGen::CodeGenFunction &CGF,
                                    llvm::Value *Y,
                                    llvm::Value *&Carry);
 
-llvm::Value *MakeAtomicCmpXchgValue(clang::CodeGen::CodeGenFunction &CGF,
-                                    const clang::CallExpr *E,
-                                    bool ReturnBool);
+llvm::Value *
+MakeAtomicCmpXchgValue(clang::CodeGen::CodeGenFunction &CGF,
+                       const clang::CallExpr *E, bool ReturnBool,
+                       llvm::AtomicOrdering SuccessOrdering =
+                           llvm::AtomicOrdering::SequentiallyConsistent,
----------------
Artem-B wrote:

Good point. I'll see what I can do.

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


More information about the cfe-commits mailing list