46 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mtriple=amdgcn -mcpu=gfx1200 -global-isel=0 < %s | FileCheck -check-prefixes=GCN %s3; RUN: llc -mtriple=amdgcn -mcpu=gfx1200 -global-isel=1 < %s | FileCheck -check-prefixes=GCN %s4 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 0x011; GCN-NEXT: s_wait_expcnt 0x012; GCN-NEXT: s_wait_samplecnt 0x013; GCN-NEXT: s_wait_bvhcnt 0x014; GCN-NEXT: s_wait_kmcnt 0x015; GCN-NEXT: v_readfirstlane_b32 s0, v016; GCN-NEXT: s_sleep_var s017; GCN-NEXT: s_setpc_b64 s[30:31]18 call void @llvm.amdgcn.s.sleep.var(i32 %arg)19 ret void20}21 22define void @test_s_sleep_var2() {23; GCN-LABEL: test_s_sleep_var2:24; GCN: ; %bb.0:25; GCN-NEXT: s_wait_loadcnt_dscnt 0x026; GCN-NEXT: s_wait_expcnt 0x027; GCN-NEXT: s_wait_samplecnt 0x028; GCN-NEXT: s_wait_bvhcnt 0x029; GCN-NEXT: s_wait_kmcnt 0x030; GCN-NEXT: s_sleep_var 1031; GCN-NEXT: s_setpc_b64 s[30:31]32 call void @llvm.amdgcn.s.sleep.var(i32 10)33 ret void34}35 36define amdgpu_kernel void @test_s_sleep_var3(i32 %arg) {37; GCN-LABEL: test_s_sleep_var3:38; GCN: ; %bb.0:39; GCN-NEXT: s_load_b32 s0, s[4:5], 0x2440; GCN-NEXT: s_wait_kmcnt 0x041; GCN-NEXT: s_sleep_var s042; GCN-NEXT: s_endpgm43 call void @llvm.amdgcn.s.sleep.var(i32 %arg)44 ret void45}46