[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:54 PST 2026
================
@@ -12,6 +21,27 @@ define amdgpu_ps void @test_monitor_sleep_1() {
ret void
}
+; GCN-LABEL: {{^}}test_monitor_sleep_127:
+; GCN: s_monitor_sleep 0x7f
+define amdgpu_ps void @test_monitor_sleep_127() {
+ call void @llvm.amdgcn.s.monitor.sleep(i16 127)
+ ret void
+}
+
+; GCN-LABEL: {{^}}test_monitor_sleep_128:
+; GCN: s_monitor_sleep 0x7f
+define amdgpu_ps void @test_monitor_sleep_128() {
+ call void @llvm.amdgcn.s.monitor.sleep(i16 128)
----------------
yxsamliu wrote:
The range depends on the target. GFX13 accepts 0x1234, so an intrinsic range would reject valid IR. The target verifier now checks it.
https://github.com/llvm/llvm-project/pull/241042
More information about the cfe-commits
mailing list