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

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 11 05:03:36 PST 2026


================
@@ -181,6 +181,18 @@ bool AMDGPUTargetInfo::initFeatureMap(
     return false;
   }
 
+  // The target parser does not expose these backend features to Sema.
+  if (getTriple().isAMDGCN()) {
+    llvm::AMDGPU::GPUKind Kind =
+        CPU.empty() ? getGPUKindFromSubArch(getTriple().getSubArch())
+                    : parseArchAMDGCN(CPU);
+    if (Kind == GK_GFX1250 || Kind == GK_GFX1250_STRICT)
+      Features.insert({"no-sleep-forever", true});
----------------
yxsamliu wrote:

Exposed both features through the shared table and removed arch parsing.

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


More information about the cfe-commits mailing list