1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc -mtriple=amdgcn -mcpu=gfx1200 -verify-machineinstrs -global-isel=0 < %s | FileCheck -check-prefixes=GCN %s 3; RUN: llc -mtriple=amdgcn -mcpu=gfx1200 -verify-machineinstrs -global-isel=1 < %s | FileCheck -check-prefixes=GCN %s 4 5declare void @llvm.amdgcn.s.sleep.var(i32) 6 7define void @test_s_sleep_var1(i32 %arg) { 8; GCN-LABEL: test_s_sleep_var1: 9; GCN: ; %bb.0: 10; GCN-NEXT: s_wait_loadcnt_dscnt 0x0 11; GCN-NEXT: s_wait_expcnt 0x0 12; GCN-NEXT: s_wait_samplecnt 0x0 13; GCN-NEXT: s_wait_bvhcnt 0x0 14; GCN-NEXT: s_wait_kmcnt 0x0 15; GCN-NEXT: v_readfirstlane_b32 s0, v0 16; GCN-NEXT: s_delay_alu instid0(VALU_DEP_1) 17; GCN-NEXT: s_sleep_var s0 18; GCN-NEXT: s_setpc_b64 s[30:31] 19 call void @llvm.amdgcn.s.sleep.var(i32 %arg) 20 ret void 21} 22 23define void @test_s_sleep_var2() { 24; GCN-LABEL: test_s_sleep_var2: 25; GCN: ; %bb.0: 26; GCN-NEXT: s_wait_loadcnt_dscnt 0x0 27; GCN-NEXT: s_wait_expcnt 0x0 28; GCN-NEXT: s_wait_samplecnt 0x0 29; GCN-NEXT: s_wait_bvhcnt 0x0 30; GCN-NEXT: s_wait_kmcnt 0x0 31; GCN-NEXT: s_sleep_var 10 32; GCN-NEXT: s_setpc_b64 s[30:31] 33 call void @llvm.amdgcn.s.sleep.var(i32 10) 34 ret void 35} 36 37define amdgpu_kernel void @test_s_sleep_var3(i32 %arg) { 38; GCN-LABEL: test_s_sleep_var3: 39; GCN: ; %bb.0: 40; GCN-NEXT: s_load_b32 s0, s[4:5], 0x24 41; GCN-NEXT: s_wait_kmcnt 0x0 42; GCN-NEXT: s_sleep_var s0 43; GCN-NEXT: s_endpgm 44 call void @llvm.amdgcn.s.sleep.var(i32 %arg) 45 ret void 46} 47