[clang] [llvm] [AMDGPU][GFX12.5] Reimplement monitor load as an atomic operation (PR #177343)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 29 14:47:01 PST 2026


================
@@ -341,6 +348,29 @@ bool SemaAMDGPU::CheckAMDGCNBuiltinFunctionCall(unsigned BuiltinID,
   return false;
 }
 
+bool SemaAMDGPU::checkAtomicOrderingCABIArg(CallExpr *TheCall, unsigned ArgIdx,
+                                            bool MayLoad, bool MayStore) {
+  Expr *AtomicOrdArg = TheCall->getArg(ArgIdx);
+  Expr::EvalResult AtomicOrdArgRes;
+  if (!AtomicOrdArg->EvaluateAsInt(AtomicOrdArgRes, getASTContext()))
----------------
arsenm wrote:

There should be a sema test for this (also make sure to test the case where this is coming from a template arg, we've had a few bugs on these with those)

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


More information about the cfe-commits mailing list