File: amdgcn-cs-chain-intrinsic-dyn-vgpr-w32.ll

package info (click to toggle)
llvm-toolchain-21 1%3A21.1.4-5
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,236,516 kB
  • sloc: cpp: 7,619,569; ansic: 1,433,956; asm: 1,058,748; python: 252,181; f90: 94,671; objc: 70,753; lisp: 42,813; pascal: 18,401; sh: 8,601; ml: 5,111; perl: 4,720; makefile: 3,585; awk: 3,523; javascript: 2,272; xml: 892; fortran: 770
file content (97 lines) | stat: -rw-r--r-- 5,056 bytes parent folder | download | duplicates (5)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
; RUN: llc -global-isel=1 -mtriple=amdgcn-amd-amdpal -mcpu=gfx1200 < %s | FileCheck -check-prefix=GISEL-GFX12 %s
; RUN: llc -global-isel=0 -mtriple=amdgcn-amd-amdpal -mcpu=gfx1200 < %s | FileCheck -check-prefix=DAGISEL-GFX12 %s

declare amdgpu_cs_chain void @callee(<3 x i32> inreg, { i32, ptr addrspace(5), i32, i32 })
declare amdgpu_cs_chain_preserve void @callee_preserve(<3 x i32> inreg, { i32, ptr addrspace(5), i32, i32 })
declare void @llvm.amdgcn.cs.chain(ptr, i32, <3 x i32>, { i32, ptr addrspace(5), i32, i32 }, i32, ...) noreturn

define amdgpu_cs_chain void @dynamic_vgprs(i32 inreg %exec, <3 x i32> inreg %sgpr, { i32, ptr addrspace(5), i32, i32 } %vgpr, i32 inreg %num_vgpr) {
; GISEL-GFX12-LABEL: dynamic_vgprs:
; GISEL-GFX12:       ; %bb.0:
; GISEL-GFX12-NEXT:    s_wait_loadcnt_dscnt 0x0
; GISEL-GFX12-NEXT:    s_wait_expcnt 0x0
; GISEL-GFX12-NEXT:    s_wait_samplecnt 0x0
; GISEL-GFX12-NEXT:    s_wait_bvhcnt 0x0
; GISEL-GFX12-NEXT:    s_wait_kmcnt 0x0
; GISEL-GFX12-NEXT:    s_mov_b32 s5, s0
; GISEL-GFX12-NEXT:    s_mov_b32 s0, s1
; GISEL-GFX12-NEXT:    s_mov_b32 s1, s2
; GISEL-GFX12-NEXT:    s_mov_b32 s2, s3
; GISEL-GFX12-NEXT:    s_mov_b32 s6, callee@abs32@lo
; GISEL-GFX12-NEXT:    s_mov_b32 s7, callee@abs32@hi
; GISEL-GFX12-NEXT:    s_mov_b32 s8, retry_vgpr_alloc@abs32@lo
; GISEL-GFX12-NEXT:    s_mov_b32 s9, retry_vgpr_alloc@abs32@hi
; GISEL-GFX12-NEXT:    s_alloc_vgpr s4
; GISEL-GFX12-NEXT:    s_wait_alu 0xfffe
; GISEL-GFX12-NEXT:    s_cselect_b64 s[6:7], s[6:7], s[8:9]
; GISEL-GFX12-NEXT:    s_cselect_b32 exec_lo, s5, -1
; GISEL-GFX12-NEXT:    s_wait_alu 0xfffe
; GISEL-GFX12-NEXT:    s_setpc_b64 s[6:7]
;
; DAGISEL-GFX12-LABEL: dynamic_vgprs:
; DAGISEL-GFX12:       ; %bb.0:
; DAGISEL-GFX12-NEXT:    s_wait_loadcnt_dscnt 0x0
; DAGISEL-GFX12-NEXT:    s_wait_expcnt 0x0
; DAGISEL-GFX12-NEXT:    s_wait_samplecnt 0x0
; DAGISEL-GFX12-NEXT:    s_wait_bvhcnt 0x0
; DAGISEL-GFX12-NEXT:    s_wait_kmcnt 0x0
; DAGISEL-GFX12-NEXT:    s_mov_b32 s5, s0
; DAGISEL-GFX12-NEXT:    s_mov_b32 s7, retry_vgpr_alloc@abs32@hi
; DAGISEL-GFX12-NEXT:    s_mov_b32 s6, retry_vgpr_alloc@abs32@lo
; DAGISEL-GFX12-NEXT:    s_mov_b32 s9, callee@abs32@hi
; DAGISEL-GFX12-NEXT:    s_mov_b32 s8, callee@abs32@lo
; DAGISEL-GFX12-NEXT:    s_mov_b32 s0, s1
; DAGISEL-GFX12-NEXT:    s_mov_b32 s1, s2
; DAGISEL-GFX12-NEXT:    s_mov_b32 s2, s3
; DAGISEL-GFX12-NEXT:    s_alloc_vgpr s4
; DAGISEL-GFX12-NEXT:    s_wait_alu 0xfffe
; DAGISEL-GFX12-NEXT:    s_cselect_b64 s[8:9], s[8:9], s[6:7]
; DAGISEL-GFX12-NEXT:    s_cselect_b32 exec_lo, s5, -1
; DAGISEL-GFX12-NEXT:    s_wait_alu 0xfffe
; DAGISEL-GFX12-NEXT:    s_setpc_b64 s[8:9]
  call void(ptr, i32, <3 x i32>, { i32, ptr addrspace(5), i32, i32 }, i32, ...) @llvm.amdgcn.cs.chain(ptr @callee, i32 %exec, <3 x i32> inreg %sgpr, { i32, ptr addrspace(5), i32, i32 } %vgpr, i32 1, i32 inreg %num_vgpr, i32 inreg -1, ptr @retry_vgpr_alloc)
  unreachable
}

define amdgpu_cs_chain void @constants(<3 x i32> inreg %sgpr, { i32, ptr addrspace(5), i32, i32 } %vgpr) {
; GISEL-GFX12-LABEL: constants:
; GISEL-GFX12:       ; %bb.0:
; GISEL-GFX12-NEXT:    s_wait_loadcnt_dscnt 0x0
; GISEL-GFX12-NEXT:    s_wait_expcnt 0x0
; GISEL-GFX12-NEXT:    s_wait_samplecnt 0x0
; GISEL-GFX12-NEXT:    s_wait_bvhcnt 0x0
; GISEL-GFX12-NEXT:    s_wait_kmcnt 0x0
; GISEL-GFX12-NEXT:    s_mov_b32 s4, callee@abs32@lo
; GISEL-GFX12-NEXT:    s_mov_b32 s5, callee@abs32@hi
; GISEL-GFX12-NEXT:    s_mov_b32 s6, retry_vgpr_alloc@abs32@lo
; GISEL-GFX12-NEXT:    s_mov_b32 s7, retry_vgpr_alloc@abs32@hi
; GISEL-GFX12-NEXT:    s_alloc_vgpr 64
; GISEL-GFX12-NEXT:    s_wait_alu 0xfffe
; GISEL-GFX12-NEXT:    s_cselect_b64 s[4:5], s[4:5], s[6:7]
; GISEL-GFX12-NEXT:    s_cselect_b32 exec_lo, 7, -1
; GISEL-GFX12-NEXT:    s_wait_alu 0xfffe
; GISEL-GFX12-NEXT:    s_setpc_b64 s[4:5]
;
; DAGISEL-GFX12-LABEL: constants:
; DAGISEL-GFX12:       ; %bb.0:
; DAGISEL-GFX12-NEXT:    s_wait_loadcnt_dscnt 0x0
; DAGISEL-GFX12-NEXT:    s_wait_expcnt 0x0
; DAGISEL-GFX12-NEXT:    s_wait_samplecnt 0x0
; DAGISEL-GFX12-NEXT:    s_wait_bvhcnt 0x0
; DAGISEL-GFX12-NEXT:    s_wait_kmcnt 0x0
; DAGISEL-GFX12-NEXT:    s_mov_b32 s5, retry_vgpr_alloc@abs32@hi
; DAGISEL-GFX12-NEXT:    s_mov_b32 s4, retry_vgpr_alloc@abs32@lo
; DAGISEL-GFX12-NEXT:    s_mov_b32 s7, callee@abs32@hi
; DAGISEL-GFX12-NEXT:    s_mov_b32 s6, callee@abs32@lo
; DAGISEL-GFX12-NEXT:    s_alloc_vgpr 64
; DAGISEL-GFX12-NEXT:    s_wait_alu 0xfffe
; DAGISEL-GFX12-NEXT:    s_cselect_b64 s[6:7], s[6:7], s[4:5]
; DAGISEL-GFX12-NEXT:    s_cselect_b32 exec_lo, 7, -1
; DAGISEL-GFX12-NEXT:    s_wait_alu 0xfffe
; DAGISEL-GFX12-NEXT:    s_setpc_b64 s[6:7]
  call void(ptr, i32, <3 x i32>, { i32, ptr addrspace(5), i32, i32 }, i32, ...) @llvm.amdgcn.cs.chain(ptr @callee, i32 7, <3 x i32> inreg %sgpr, { i32, ptr addrspace(5), i32, i32 } %vgpr, i32 1, i32 inreg 64, i32 inreg -1, ptr @retry_vgpr_alloc)
  unreachable
}

declare amdgpu_cs_chain_preserve void @retry_vgpr_alloc(<3 x i32> inreg %sgpr)