annotate llvm/test/CodeGen/AMDGPU/amdgpu.work-item-intrinsics.deprecated.ll @ 223:5f17cb93ff66 llvm-original

LLVM13 (2021/7/18)
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:43:00 +0900
parents 79ff65ed7e25
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
1 ; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck --check-prefixes=SI-NOHSA,GCN-NOHSA,FUNC %s
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
2 ; RUN: llc -march=amdgcn -mcpu=tonga -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck --check-prefixes=VI-NOHSA,GCN-NOHSA,FUNC %s
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
3 ; RUN: llc -march=r600 -mcpu=redwood < %s | FileCheck --check-prefixes=EG,FUNC %s
150
anatofuz
parents:
diff changeset
4
anatofuz
parents:
diff changeset
5 ; Legacy intrinsics that just read implicit parameters
anatofuz
parents:
diff changeset
6
anatofuz
parents:
diff changeset
7 ; FUNC-LABEL: {{^}}ngroups_x:
anatofuz
parents:
diff changeset
8 ; SI-NOHSA: s_load_dword [[VAL:s[0-9]+]], s[0:1], 0x0
anatofuz
parents:
diff changeset
9 ; VI-NOHSA: s_load_dword [[VAL:s[0-9]+]], s[0:1], 0x0
anatofuz
parents:
diff changeset
10 ; GCN-NOHSA: v_mov_b32_e32 [[VVAL:v[0-9]+]], [[VAL]]
anatofuz
parents:
diff changeset
11 ; GCN-NOHSA: buffer_store_dword [[VVAL]]
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13 ; EG: MEM_RAT_CACHELESS STORE_RAW [[VAL:T[0-9]+\.X]]
anatofuz
parents:
diff changeset
14 ; EG: MOV {{\*? *}}[[VAL]], KC0[0].X
anatofuz
parents:
diff changeset
15 define amdgpu_kernel void @ngroups_x (i32 addrspace(1)* %out) {
anatofuz
parents:
diff changeset
16 entry:
anatofuz
parents:
diff changeset
17 %0 = call i32 @llvm.r600.read.ngroups.x() #0
anatofuz
parents:
diff changeset
18 store i32 %0, i32 addrspace(1)* %out
anatofuz
parents:
diff changeset
19 ret void
anatofuz
parents:
diff changeset
20 }
anatofuz
parents:
diff changeset
21
anatofuz
parents:
diff changeset
22 ; FUNC-LABEL: {{^}}ngroups_y:
anatofuz
parents:
diff changeset
23 ; SI-NOHSA: s_load_dword [[VAL:s[0-9]+]], s[0:1], 0x1
anatofuz
parents:
diff changeset
24 ; VI-NOHSA: s_load_dword [[VAL:s[0-9]+]], s[0:1], 0x4
anatofuz
parents:
diff changeset
25 ; GCN-NOHSA: v_mov_b32_e32 [[VVAL:v[0-9]+]], [[VAL]]
anatofuz
parents:
diff changeset
26 ; GCN-NOHSA: buffer_store_dword [[VVAL]]
anatofuz
parents:
diff changeset
27
anatofuz
parents:
diff changeset
28 ; EG: MEM_RAT_CACHELESS STORE_RAW [[VAL:T[0-9]+\.X]]
anatofuz
parents:
diff changeset
29 ; EG: MOV {{\*? *}}[[VAL]], KC0[0].Y
anatofuz
parents:
diff changeset
30 define amdgpu_kernel void @ngroups_y (i32 addrspace(1)* %out) {
anatofuz
parents:
diff changeset
31 entry:
anatofuz
parents:
diff changeset
32 %0 = call i32 @llvm.r600.read.ngroups.y() #0
anatofuz
parents:
diff changeset
33 store i32 %0, i32 addrspace(1)* %out
anatofuz
parents:
diff changeset
34 ret void
anatofuz
parents:
diff changeset
35 }
anatofuz
parents:
diff changeset
36
anatofuz
parents:
diff changeset
37 ; FUNC-LABEL: {{^}}ngroups_z:
anatofuz
parents:
diff changeset
38 ; SI-NOHSA: s_load_dword [[VAL:s[0-9]+]], s[0:1], 0x2
anatofuz
parents:
diff changeset
39 ; VI-NOHSA: s_load_dword [[VAL:s[0-9]+]], s[0:1], 0x8
anatofuz
parents:
diff changeset
40 ; GCN-NOHSA: v_mov_b32_e32 [[VVAL:v[0-9]+]], [[VAL]]
anatofuz
parents:
diff changeset
41 ; GCN-NOHSA: buffer_store_dword [[VVAL]]
anatofuz
parents:
diff changeset
42
anatofuz
parents:
diff changeset
43 ; EG: MEM_RAT_CACHELESS STORE_RAW [[VAL:T[0-9]+\.X]]
anatofuz
parents:
diff changeset
44 ; EG: MOV {{\*? *}}[[VAL]], KC0[0].Z
anatofuz
parents:
diff changeset
45 define amdgpu_kernel void @ngroups_z (i32 addrspace(1)* %out) {
anatofuz
parents:
diff changeset
46 entry:
anatofuz
parents:
diff changeset
47 %0 = call i32 @llvm.r600.read.ngroups.z() #0
anatofuz
parents:
diff changeset
48 store i32 %0, i32 addrspace(1)* %out
anatofuz
parents:
diff changeset
49 ret void
anatofuz
parents:
diff changeset
50 }
anatofuz
parents:
diff changeset
51
anatofuz
parents:
diff changeset
52 ; FUNC-LABEL: {{^}}global_size_x:
anatofuz
parents:
diff changeset
53 ; SI-NOHSA: s_load_dword [[VAL:s[0-9]+]], s[0:1], 0x3
anatofuz
parents:
diff changeset
54 ; VI-NOHSA: s_load_dword [[VAL:s[0-9]+]], s[0:1], 0xc
anatofuz
parents:
diff changeset
55 ; GCN-NOHSA: v_mov_b32_e32 [[VVAL:v[0-9]+]], [[VAL]]
anatofuz
parents:
diff changeset
56 ; GCN-NOHSA: buffer_store_dword [[VVAL]]
anatofuz
parents:
diff changeset
57
anatofuz
parents:
diff changeset
58 ; EG: MEM_RAT_CACHELESS STORE_RAW [[VAL:T[0-9]+\.X]]
anatofuz
parents:
diff changeset
59 ; EG: MOV {{\*? *}}[[VAL]], KC0[0].W
anatofuz
parents:
diff changeset
60 define amdgpu_kernel void @global_size_x (i32 addrspace(1)* %out) {
anatofuz
parents:
diff changeset
61 entry:
anatofuz
parents:
diff changeset
62 %0 = call i32 @llvm.r600.read.global.size.x() #0
anatofuz
parents:
diff changeset
63 store i32 %0, i32 addrspace(1)* %out
anatofuz
parents:
diff changeset
64 ret void
anatofuz
parents:
diff changeset
65 }
anatofuz
parents:
diff changeset
66
anatofuz
parents:
diff changeset
67 ; FUNC-LABEL: {{^}}global_size_y:
anatofuz
parents:
diff changeset
68 ; SI-NOHSA: s_load_dword [[VAL:s[0-9]+]], s[0:1], 0x4
anatofuz
parents:
diff changeset
69 ; VI-NOHSA: s_load_dword [[VAL:s[0-9]+]], s[0:1], 0x10
anatofuz
parents:
diff changeset
70 ; GCN-NOHSA: v_mov_b32_e32 [[VVAL:v[0-9]+]], [[VAL]]
anatofuz
parents:
diff changeset
71 ; GCN-NOHSA: buffer_store_dword [[VVAL]]
anatofuz
parents:
diff changeset
72
anatofuz
parents:
diff changeset
73 ; EG: MEM_RAT_CACHELESS STORE_RAW [[VAL:T[0-9]+\.X]]
anatofuz
parents:
diff changeset
74 ; EG: MOV {{\*? *}}[[VAL]], KC0[1].X
anatofuz
parents:
diff changeset
75 define amdgpu_kernel void @global_size_y (i32 addrspace(1)* %out) {
anatofuz
parents:
diff changeset
76 entry:
anatofuz
parents:
diff changeset
77 %0 = call i32 @llvm.r600.read.global.size.y() #0
anatofuz
parents:
diff changeset
78 store i32 %0, i32 addrspace(1)* %out
anatofuz
parents:
diff changeset
79 ret void
anatofuz
parents:
diff changeset
80 }
anatofuz
parents:
diff changeset
81
anatofuz
parents:
diff changeset
82 ; FUNC-LABEL: {{^}}global_size_z:
anatofuz
parents:
diff changeset
83 ; SI-NOHSA: s_load_dword [[VAL:s[0-9]+]], s[0:1], 0x5
anatofuz
parents:
diff changeset
84 ; VI-NOHSA: s_load_dword [[VAL:s[0-9]+]], s[0:1], 0x14
anatofuz
parents:
diff changeset
85 ; GCN-NOHSA: v_mov_b32_e32 [[VVAL:v[0-9]+]], [[VAL]]
anatofuz
parents:
diff changeset
86 ; GCN-NOHSA: buffer_store_dword [[VVAL]]
anatofuz
parents:
diff changeset
87
anatofuz
parents:
diff changeset
88 ; EG: MEM_RAT_CACHELESS STORE_RAW [[VAL:T[0-9]+\.X]]
anatofuz
parents:
diff changeset
89 ; EG: MOV {{\*? *}}[[VAL]], KC0[1].Y
anatofuz
parents:
diff changeset
90 define amdgpu_kernel void @global_size_z (i32 addrspace(1)* %out) {
anatofuz
parents:
diff changeset
91 entry:
anatofuz
parents:
diff changeset
92 %0 = call i32 @llvm.r600.read.global.size.z() #0
anatofuz
parents:
diff changeset
93 store i32 %0, i32 addrspace(1)* %out
anatofuz
parents:
diff changeset
94 ret void
anatofuz
parents:
diff changeset
95 }
anatofuz
parents:
diff changeset
96
anatofuz
parents:
diff changeset
97 ; FUNC-LABEL: {{^}}local_size_x:
anatofuz
parents:
diff changeset
98 ; SI-NOHSA: s_load_dword [[VAL:s[0-9]+]], s[0:1], 0x6
anatofuz
parents:
diff changeset
99 ; VI-NOHSA: s_load_dword [[VAL:s[0-9]+]], s[0:1], 0x18
anatofuz
parents:
diff changeset
100 ; GCN-NOHSA: v_mov_b32_e32 [[VVAL:v[0-9]+]], [[VAL]]
anatofuz
parents:
diff changeset
101 ; GCN-NOHSA: buffer_store_dword [[VVAL]]
anatofuz
parents:
diff changeset
102
anatofuz
parents:
diff changeset
103 ; EG: MEM_RAT_CACHELESS STORE_RAW [[VAL:T[0-9]+\.X]]
anatofuz
parents:
diff changeset
104 ; EG: MOV {{\*? *}}[[VAL]], KC0[1].Z
anatofuz
parents:
diff changeset
105 define amdgpu_kernel void @local_size_x (i32 addrspace(1)* %out) {
anatofuz
parents:
diff changeset
106 entry:
anatofuz
parents:
diff changeset
107 %0 = call i32 @llvm.r600.read.local.size.x() #0
anatofuz
parents:
diff changeset
108 store i32 %0, i32 addrspace(1)* %out
anatofuz
parents:
diff changeset
109 ret void
anatofuz
parents:
diff changeset
110 }
anatofuz
parents:
diff changeset
111
anatofuz
parents:
diff changeset
112 ; FUNC-LABEL: {{^}}local_size_y:
anatofuz
parents:
diff changeset
113 ; SI-NOHSA: s_load_dword [[VAL:s[0-9]+]], s[0:1], 0x7
anatofuz
parents:
diff changeset
114 ; VI-NOHSA: s_load_dword [[VAL:s[0-9]+]], s[0:1], 0x1c
anatofuz
parents:
diff changeset
115 ; GCN-NOHSA: v_mov_b32_e32 [[VVAL:v[0-9]+]], [[VAL]]
anatofuz
parents:
diff changeset
116 ; GCN-NOHSA: buffer_store_dword [[VVAL]]
anatofuz
parents:
diff changeset
117
anatofuz
parents:
diff changeset
118 ; EG: MEM_RAT_CACHELESS STORE_RAW [[VAL:T[0-9]+\.X]]
anatofuz
parents:
diff changeset
119 ; EG: MOV {{\*? *}}[[VAL]], KC0[1].W
anatofuz
parents:
diff changeset
120 define amdgpu_kernel void @local_size_y (i32 addrspace(1)* %out) {
anatofuz
parents:
diff changeset
121 entry:
anatofuz
parents:
diff changeset
122 %0 = call i32 @llvm.r600.read.local.size.y() #0
anatofuz
parents:
diff changeset
123 store i32 %0, i32 addrspace(1)* %out
anatofuz
parents:
diff changeset
124 ret void
anatofuz
parents:
diff changeset
125 }
anatofuz
parents:
diff changeset
126
anatofuz
parents:
diff changeset
127 ; FUNC-LABEL: {{^}}local_size_z:
anatofuz
parents:
diff changeset
128 ; SI-NOHSA: s_load_dword [[VAL:s[0-9]+]], s[0:1], 0x8
anatofuz
parents:
diff changeset
129 ; VI-NOHSA: s_load_dword [[VAL:s[0-9]+]], s[0:1], 0x20
anatofuz
parents:
diff changeset
130 ; GCN-NOHSA: v_mov_b32_e32 [[VVAL:v[0-9]+]], [[VAL]]
anatofuz
parents:
diff changeset
131 ; GCN-NOHSA: buffer_store_dword [[VVAL]]
anatofuz
parents:
diff changeset
132
anatofuz
parents:
diff changeset
133 ; EG: MEM_RAT_CACHELESS STORE_RAW [[VAL:T[0-9]+\.X]]
anatofuz
parents:
diff changeset
134 ; EG: MOV {{\*? *}}[[VAL]], KC0[2].X
anatofuz
parents:
diff changeset
135 define amdgpu_kernel void @local_size_z (i32 addrspace(1)* %out) {
anatofuz
parents:
diff changeset
136 entry:
anatofuz
parents:
diff changeset
137 %0 = call i32 @llvm.r600.read.local.size.z() #0
anatofuz
parents:
diff changeset
138 store i32 %0, i32 addrspace(1)* %out
anatofuz
parents:
diff changeset
139 ret void
anatofuz
parents:
diff changeset
140 }
anatofuz
parents:
diff changeset
141
anatofuz
parents:
diff changeset
142 declare i32 @llvm.r600.read.ngroups.x() #0
anatofuz
parents:
diff changeset
143 declare i32 @llvm.r600.read.ngroups.y() #0
anatofuz
parents:
diff changeset
144 declare i32 @llvm.r600.read.ngroups.z() #0
anatofuz
parents:
diff changeset
145
anatofuz
parents:
diff changeset
146 declare i32 @llvm.r600.read.global.size.x() #0
anatofuz
parents:
diff changeset
147 declare i32 @llvm.r600.read.global.size.y() #0
anatofuz
parents:
diff changeset
148 declare i32 @llvm.r600.read.global.size.z() #0
anatofuz
parents:
diff changeset
149
anatofuz
parents:
diff changeset
150 declare i32 @llvm.r600.read.local.size.x() #0
anatofuz
parents:
diff changeset
151 declare i32 @llvm.r600.read.local.size.y() #0
anatofuz
parents:
diff changeset
152 declare i32 @llvm.r600.read.local.size.z() #0
anatofuz
parents:
diff changeset
153
anatofuz
parents:
diff changeset
154 attributes #0 = { readnone }