1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
2 # RUN: llc -mtriple=amdgcn -mcpu=gfx1150 -run-pass=post-RA-hazard-rec %s -o - | FileCheck -check-prefixes=GFX1150 %s
3 # RUN: llc -mtriple=amdgcn -mcpu=gfx11-generic -run-pass=post-RA-hazard-rec %s -o - | FileCheck -check-prefixes=GFX1150 %s
6 define amdgpu_ps void @end_of_shader() {
9 define amdgpu_ps void @end_of_shader_return_to_epilogue() {
12 define amdgpu_ps void @end_of_block() {
15 define amdgpu_ps void @start_of_block() {
18 define amdgpu_ps void @block_of_exports() {
21 define amdgpu_ps void @sparse_exports() {
24 define amdgpu_ps void @existing_setprio_1() {
27 define amdgpu_ps void @existing_setprio_2() {
34 tracksRegLiveness: true
40 ; GFX1150-LABEL: name: end_of_shader
41 ; GFX1150: liveins: $vgpr0
42 ; GFX1150-NEXT: {{ $}}
43 ; GFX1150-NEXT: S_SETPRIO 2
44 ; GFX1150-NEXT: EXP_DONE 0, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
45 ; GFX1150-NEXT: S_SETPRIO 0
46 ; GFX1150-NEXT: S_NOP 0
47 ; GFX1150-NEXT: S_NOP 0
48 ; GFX1150-NEXT: S_ENDPGM 0
49 EXP_DONE 0, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
54 name: end_of_shader_return_to_epilogue
55 tracksRegLiveness: true
61 ; GFX1150-LABEL: name: end_of_shader_return_to_epilogue
62 ; GFX1150: liveins: $vgpr0
63 ; GFX1150-NEXT: {{ $}}
64 ; GFX1150-NEXT: S_SETPRIO 2
65 ; GFX1150-NEXT: EXP_DONE 0, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
66 ; GFX1150-NEXT: S_SETPRIO 0
67 ; GFX1150-NEXT: S_WAITCNT_EXPCNT $sgpr_null, 0
68 ; GFX1150-NEXT: S_NOP 0
69 ; GFX1150-NEXT: S_NOP 0
70 ; GFX1150-NEXT: S_SETPRIO 2
71 ; GFX1150-NEXT: SI_RETURN_TO_EPILOG $vgpr0
72 EXP_DONE 0, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
73 SI_RETURN_TO_EPILOG $vgpr0
78 tracksRegLiveness: true
82 ; GFX1150-LABEL: name: end_of_block
84 ; GFX1150-NEXT: successors: %bb.1(0x80000000)
85 ; GFX1150-NEXT: liveins: $vgpr0
86 ; GFX1150-NEXT: {{ $}}
87 ; GFX1150-NEXT: S_SETPRIO 2
88 ; GFX1150-NEXT: EXP_DONE 0, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
89 ; GFX1150-NEXT: S_SETPRIO 0
90 ; GFX1150-NEXT: S_WAITCNT_EXPCNT $sgpr_null, 0
91 ; GFX1150-NEXT: S_NOP 0
92 ; GFX1150-NEXT: S_NOP 0
93 ; GFX1150-NEXT: S_SETPRIO 2
94 ; GFX1150-NEXT: {{ $}}
96 ; GFX1150-NEXT: S_ENDPGM 0
99 EXP_DONE 0, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
107 tracksRegLiveness: true
111 ; GFX1150-LABEL: name: start_of_block
113 ; GFX1150-NEXT: successors: %bb.1(0x80000000)
114 ; GFX1150-NEXT: liveins: $vgpr0
115 ; GFX1150-NEXT: {{ $}}
116 ; GFX1150-NEXT: S_SETPRIO 2
117 ; GFX1150-NEXT: {{ $}}
118 ; GFX1150-NEXT: bb.1:
119 ; GFX1150-NEXT: successors: %bb.2(0x80000000)
120 ; GFX1150-NEXT: liveins: $vgpr0
121 ; GFX1150-NEXT: {{ $}}
122 ; GFX1150-NEXT: EXP_DONE 0, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
123 ; GFX1150-NEXT: S_SETPRIO 0
124 ; GFX1150-NEXT: S_WAITCNT_EXPCNT $sgpr_null, 0
125 ; GFX1150-NEXT: S_NOP 0
126 ; GFX1150-NEXT: S_NOP 0
127 ; GFX1150-NEXT: S_SETPRIO 2
128 ; GFX1150-NEXT: {{ $}}
129 ; GFX1150-NEXT: bb.2:
130 ; GFX1150-NEXT: S_ENDPGM 0
136 EXP_DONE 0, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
143 name: block_of_exports
144 tracksRegLiveness: true
150 ; GFX1150-LABEL: name: block_of_exports
151 ; GFX1150: liveins: $vgpr0
152 ; GFX1150-NEXT: {{ $}}
153 ; GFX1150-NEXT: S_SETPRIO 2
154 ; GFX1150-NEXT: EXP 2, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
155 ; GFX1150-NEXT: EXP 1, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
156 ; GFX1150-NEXT: EXP_DONE 0, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
157 ; GFX1150-NEXT: S_SETPRIO 0
158 ; GFX1150-NEXT: S_NOP 0
159 ; GFX1150-NEXT: S_NOP 0
160 ; GFX1150-NEXT: S_ENDPGM 0
161 EXP 2, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
162 EXP 1, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
163 EXP_DONE 0, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
169 tracksRegLiveness: true
175 ; GFX1150-LABEL: name: sparse_exports
176 ; GFX1150: liveins: $vgpr0
177 ; GFX1150-NEXT: {{ $}}
178 ; GFX1150-NEXT: S_SETPRIO 2
179 ; GFX1150-NEXT: EXP 2, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
180 ; GFX1150-NEXT: S_SETPRIO 0
181 ; GFX1150-NEXT: S_WAITCNT_EXPCNT $sgpr_null, 0
182 ; GFX1150-NEXT: S_NOP 0
183 ; GFX1150-NEXT: S_NOP 0
184 ; GFX1150-NEXT: S_SETPRIO 2
185 ; GFX1150-NEXT: $vgpr0 = V_AND_B32_e32 1, $vgpr0, implicit $exec
186 ; GFX1150-NEXT: EXP 1, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
187 ; GFX1150-NEXT: S_SETPRIO 0
188 ; GFX1150-NEXT: S_WAITCNT_EXPCNT $sgpr_null, 0
189 ; GFX1150-NEXT: S_NOP 0
190 ; GFX1150-NEXT: S_NOP 0
191 ; GFX1150-NEXT: S_SETPRIO 2
192 ; GFX1150-NEXT: $vgpr0 = V_OR_B32_e32 2, $vgpr0, implicit $exec
193 ; GFX1150-NEXT: EXP_DONE 0, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
194 ; GFX1150-NEXT: S_SETPRIO 0
195 ; GFX1150-NEXT: S_NOP 0
196 ; GFX1150-NEXT: S_NOP 0
197 ; GFX1150-NEXT: S_ENDPGM 0
198 EXP 2, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
199 $vgpr0 = V_AND_B32_e32 1, $vgpr0, implicit $exec
200 EXP 1, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
201 $vgpr0 = V_OR_B32_e32 2, $vgpr0, implicit $exec
202 EXP_DONE 0, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
207 name: existing_setprio_1
208 tracksRegLiveness: true
212 ; GFX1150-LABEL: name: existing_setprio_1
214 ; GFX1150-NEXT: successors: %bb.1(0x80000000)
215 ; GFX1150-NEXT: liveins: $vgpr0
216 ; GFX1150-NEXT: {{ $}}
217 ; GFX1150-NEXT: S_SETPRIO 2
218 ; GFX1150-NEXT: $vgpr0 = V_AND_B32_e32 1, $vgpr0, implicit $exec
219 ; GFX1150-NEXT: {{ $}}
220 ; GFX1150-NEXT: bb.1:
221 ; GFX1150-NEXT: successors: %bb.2(0x80000000)
222 ; GFX1150-NEXT: liveins: $vgpr0
223 ; GFX1150-NEXT: {{ $}}
224 ; GFX1150-NEXT: S_SETPRIO 3
225 ; GFX1150-NEXT: $vgpr0 = V_OR_B32_e32 2, $vgpr0, implicit $exec
226 ; GFX1150-NEXT: S_SETPRIO 2
227 ; GFX1150-NEXT: {{ $}}
228 ; GFX1150-NEXT: bb.2:
229 ; GFX1150-NEXT: successors: %bb.3(0x80000000)
230 ; GFX1150-NEXT: liveins: $vgpr0
231 ; GFX1150-NEXT: {{ $}}
232 ; GFX1150-NEXT: S_SETPRIO 3
233 ; GFX1150-NEXT: $vgpr0 = V_OR_B32_e32 3, $vgpr0, implicit $exec
234 ; GFX1150-NEXT: S_SETPRIO 2
235 ; GFX1150-NEXT: {{ $}}
236 ; GFX1150-NEXT: bb.3:
237 ; GFX1150-NEXT: liveins: $vgpr0
238 ; GFX1150-NEXT: {{ $}}
239 ; GFX1150-NEXT: EXP 1, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
240 ; GFX1150-NEXT: EXP_DONE 0, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
241 ; GFX1150-NEXT: S_SETPRIO 0
242 ; GFX1150-NEXT: S_NOP 0
243 ; GFX1150-NEXT: S_NOP 0
244 ; GFX1150-NEXT: S_ENDPGM 0
247 $vgpr0 = V_AND_B32_e32 1, $vgpr0, implicit $exec
252 $vgpr0 = V_OR_B32_e32 2, $vgpr0, implicit $exec
258 $vgpr0 = V_OR_B32_e32 3, $vgpr0, implicit $exec
263 EXP 1, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
264 EXP_DONE 0, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
269 name: existing_setprio_2
270 tracksRegLiveness: true
276 ; GFX1150-LABEL: name: existing_setprio_2
277 ; GFX1150: liveins: $vgpr0
278 ; GFX1150-NEXT: {{ $}}
279 ; GFX1150-NEXT: S_SETPRIO 3
280 ; GFX1150-NEXT: EXP 1, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
281 ; GFX1150-NEXT: EXP_DONE 0, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
282 ; GFX1150-NEXT: S_SETPRIO 0
283 ; GFX1150-NEXT: S_WAITCNT_EXPCNT $sgpr_null, 0
284 ; GFX1150-NEXT: S_NOP 0
285 ; GFX1150-NEXT: S_NOP 0
286 ; GFX1150-NEXT: S_SETPRIO 2
287 ; GFX1150-NEXT: S_SETPRIO 3
288 ; GFX1150-NEXT: S_ENDPGM 0
290 EXP 1, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec
291 EXP_DONE 0, $vgpr0, $vgpr0, $vgpr0, $vgpr0, -1, -1, 15, implicit $exec