File: llvm.amdgcn.s.sleep.var.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 1,998,492 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (46 lines) | stat: -rw-r--r-- 1,534 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=amdgcn -mcpu=gfx1200 -verify-machineinstrs -global-isel=0 < %s | FileCheck -check-prefixes=GCN %s
; RUN: llc -mtriple=amdgcn -mcpu=gfx1200 -verify-machineinstrs -global-isel=1 < %s | FileCheck -check-prefixes=GCN %s

declare void @llvm.amdgcn.s.sleep.var(i32)

define void @test_s_sleep_var1(i32 %arg) {
; GCN-LABEL: test_s_sleep_var1:
; GCN:       ; %bb.0:
; GCN-NEXT:    s_wait_loadcnt_dscnt 0x0
; GCN-NEXT:    s_wait_expcnt 0x0
; GCN-NEXT:    s_wait_samplecnt 0x0
; GCN-NEXT:    s_wait_bvhcnt 0x0
; GCN-NEXT:    s_wait_kmcnt 0x0
; GCN-NEXT:    v_readfirstlane_b32 s0, v0
; GCN-NEXT:    s_delay_alu instid0(VALU_DEP_1)
; GCN-NEXT:    s_sleep_var s0
; GCN-NEXT:    s_setpc_b64 s[30:31]
  call void @llvm.amdgcn.s.sleep.var(i32 %arg)
  ret void
}

define void @test_s_sleep_var2() {
; GCN-LABEL: test_s_sleep_var2:
; GCN:       ; %bb.0:
; GCN-NEXT:    s_wait_loadcnt_dscnt 0x0
; GCN-NEXT:    s_wait_expcnt 0x0
; GCN-NEXT:    s_wait_samplecnt 0x0
; GCN-NEXT:    s_wait_bvhcnt 0x0
; GCN-NEXT:    s_wait_kmcnt 0x0
; GCN-NEXT:    s_sleep_var 10
; GCN-NEXT:    s_setpc_b64 s[30:31]
  call void @llvm.amdgcn.s.sleep.var(i32 10)
  ret void
}

define amdgpu_kernel void @test_s_sleep_var3(i32 %arg) {
; GCN-LABEL: test_s_sleep_var3:
; GCN:       ; %bb.0:
; GCN-NEXT:    s_load_b32 s0, s[2:3], 0x24
; GCN-NEXT:    s_wait_kmcnt 0x0
; GCN-NEXT:    s_sleep_var s0
; GCN-NEXT:    s_endpgm
  call void @llvm.amdgcn.s.sleep.var(i32 %arg)
  ret void
}