[clang] [llvm] [AMDGPU][GFX12.5] Reimplement monitor load as an atomic operation (PR #177343)
Pierre van Houtryve via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 30 02:15:47 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()))
----------------
Pierre-vh 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)
`test_amdgcn_load_monitor_ao_constant` already checks it, I've added templated tests too
https://github.com/llvm/llvm-project/pull/177343
More information about the cfe-commits
mailing list