[clang] [llvm] [AMDGPU] Fix monitor-sleep duration validation on GFX12.5 (PR #241042)

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 13 19:26:02 PST 2026


================
@@ -169,6 +169,22 @@ bool SemaAMDGPU::CheckAMDGCNBuiltinFunctionCall(const TargetInfo &TI,
   case AMDGPU::BI__builtin_amdgcn_s_setreg:
     return SemaRef.BuiltinConstantArgRange(TheCall, /*ArgNum=*/0, /*Low=*/0,
                                            /*High=*/UINT16_MAX);
+  case AMDGPU::BI__builtin_amdgcn_s_monitor_sleep: {
+    if (getLangOpts().CUDA && !getLangOpts().CUDAIsDevice)
+      return false;
----------------
yxsamliu wrote:

Removed the language check.

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


More information about the cfe-commits mailing list