1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -march=amdgcn -mcpu=tahiti -run-pass=instruction-select -verify-machineinstrs  -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX6 %s
3# RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX9 %s
4
5---
6
7name: function_store_private_s32_to_4
8legalized:       true
9regBankSelected: true
10tracksRegLiveness: true
11machineFunctionInfo:
12  isEntryFunction: false
13  scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
14  stackPtrOffsetReg: $sgpr32
15
16body: |
17  bb.0:
18    liveins: $vgpr0, $vgpr1
19
20    ; GFX6-LABEL: name: function_store_private_s32_to_4
21    ; GFX6: liveins: $vgpr0, $vgpr1
22    ; GFX6: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
23    ; GFX6: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
24    ; GFX6: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 4, addrspace 5)
25    ; GFX9-LABEL: name: function_store_private_s32_to_4
26    ; GFX9: liveins: $vgpr0, $vgpr1
27    ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
28    ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
29    ; GFX9: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 4, addrspace 5)
30    %0:vgpr(s32) = COPY $vgpr0
31    %1:vgpr(p5) = COPY $vgpr1
32    G_STORE %0, %1 :: (store 4, align 4, addrspace 5)
33
34...
35
36---
37
38name: function_store_private_s32_to_2
39legalized:       true
40regBankSelected: true
41tracksRegLiveness: true
42machineFunctionInfo:
43  isEntryFunction: false
44  scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
45  stackPtrOffsetReg: $sgpr32
46
47body: |
48  bb.0:
49    liveins: $vgpr0, $vgpr1
50
51    ; GFX6-LABEL: name: function_store_private_s32_to_2
52    ; GFX6: liveins: $vgpr0, $vgpr1
53    ; GFX6: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
54    ; GFX6: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
55    ; GFX6: BUFFER_STORE_SHORT_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 2, addrspace 5)
56    ; GFX9-LABEL: name: function_store_private_s32_to_2
57    ; GFX9: liveins: $vgpr0, $vgpr1
58    ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
59    ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
60    ; GFX9: BUFFER_STORE_SHORT_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 2, addrspace 5)
61    %0:vgpr(s32) = COPY $vgpr0
62    %1:vgpr(p5) = COPY $vgpr1
63    G_STORE %0, %1 :: (store 2, align 2, addrspace 5)
64
65...
66
67---
68
69name: function_store_private_s32_to_1
70legalized:       true
71regBankSelected: true
72tracksRegLiveness: true
73machineFunctionInfo:
74  isEntryFunction: false
75  scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
76  stackPtrOffsetReg: $sgpr32
77
78body: |
79  bb.0:
80    liveins: $vgpr0, $vgpr1
81
82    ; GFX6-LABEL: name: function_store_private_s32_to_1
83    ; GFX6: liveins: $vgpr0, $vgpr1
84    ; GFX6: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
85    ; GFX6: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
86    ; GFX6: BUFFER_STORE_BYTE_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 1, addrspace 5)
87    ; GFX9-LABEL: name: function_store_private_s32_to_1
88    ; GFX9: liveins: $vgpr0, $vgpr1
89    ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
90    ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
91    ; GFX9: BUFFER_STORE_BYTE_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 1, addrspace 5)
92    %0:vgpr(s32) = COPY $vgpr0
93    %1:vgpr(p5) = COPY $vgpr1
94    G_STORE %0, %1 :: (store 1, align 1, addrspace 5)
95
96...
97
98---
99
100name: function_store_private_v2s16
101legalized:       true
102regBankSelected: true
103tracksRegLiveness: true
104machineFunctionInfo:
105  isEntryFunction: false
106  scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
107  stackPtrOffsetReg: $sgpr32
108
109body: |
110  bb.0:
111    liveins: $vgpr0, $vgpr1
112
113    ; GFX6-LABEL: name: function_store_private_v2s16
114    ; GFX6: liveins: $vgpr0, $vgpr1
115    ; GFX6: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
116    ; GFX6: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
117    ; GFX6: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 4, addrspace 5)
118    ; GFX9-LABEL: name: function_store_private_v2s16
119    ; GFX9: liveins: $vgpr0, $vgpr1
120    ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
121    ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
122    ; GFX9: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 4, addrspace 5)
123    %0:vgpr(<2 x s16>) = COPY $vgpr0
124    %1:vgpr(p5) = COPY $vgpr1
125    G_STORE %0, %1 :: (store 4, align 4, addrspace 5)
126
127...
128
129---
130
131name: function_store_private_p3
132legalized:       true
133regBankSelected: true
134tracksRegLiveness: true
135machineFunctionInfo:
136  isEntryFunction: false
137  scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
138  stackPtrOffsetReg: $sgpr32
139
140body: |
141  bb.0:
142    liveins: $vgpr0, $vgpr1
143
144    ; GFX6-LABEL: name: function_store_private_p3
145    ; GFX6: liveins: $vgpr0, $vgpr1
146    ; GFX6: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
147    ; GFX6: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
148    ; GFX6: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 4, addrspace 5)
149    ; GFX9-LABEL: name: function_store_private_p3
150    ; GFX9: liveins: $vgpr0, $vgpr1
151    ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
152    ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
153    ; GFX9: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 4, addrspace 5)
154    %0:vgpr(p3) = COPY $vgpr0
155    %1:vgpr(p5) = COPY $vgpr1
156    G_STORE %0, %1 :: (store 4, align 4, addrspace 5)
157
158...
159
160---
161
162name: function_store_private_p5
163legalized:       true
164regBankSelected: true
165tracksRegLiveness: true
166machineFunctionInfo:
167  isEntryFunction: false
168  scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
169  stackPtrOffsetReg: $sgpr32
170
171body: |
172  bb.0:
173    liveins: $vgpr0, $vgpr1
174
175    ; GFX6-LABEL: name: function_store_private_p5
176    ; GFX6: liveins: $vgpr0, $vgpr1
177    ; GFX6: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
178    ; GFX6: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
179    ; GFX6: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 4, addrspace 5)
180    ; GFX9-LABEL: name: function_store_private_p5
181    ; GFX9: liveins: $vgpr0, $vgpr1
182    ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
183    ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
184    ; GFX9: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 4, addrspace 5)
185    %0:vgpr(p5) = COPY $vgpr0
186    %1:vgpr(p5) = COPY $vgpr1
187    G_STORE %0, %1 :: (store 4, align 4, addrspace 5)
188
189...
190
191---
192
193name: function_store_private_s32_to_1_fi_offset_4095
194legalized:       true
195regBankSelected: true
196tracksRegLiveness: true
197machineFunctionInfo:
198  isEntryFunction: false
199  scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
200  stackPtrOffsetReg: $sgpr32
201stack:
202  - { id: 0, size: 4096, alignment: 4 }
203
204body: |
205  bb.0:
206
207    ; GFX6-LABEL: name: function_store_private_s32_to_1_fi_offset_4095
208    ; GFX6: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
209    ; GFX6: BUFFER_STORE_BYTE_OFFEN [[V_MOV_B32_e32_]], %stack.0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 4095, 0, 0, 0, 0, 0, implicit $exec :: (store 1, addrspace 5)
210    ; GFX9-LABEL: name: function_store_private_s32_to_1_fi_offset_4095
211    ; GFX9: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
212    ; GFX9: BUFFER_STORE_BYTE_OFFEN [[V_MOV_B32_e32_]], %stack.0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 4095, 0, 0, 0, 0, 0, implicit $exec :: (store 1, addrspace 5)
213    %0:vgpr(p5) = G_FRAME_INDEX %stack.0
214    %1:vgpr(s32) = G_CONSTANT i32 4095
215    %2:vgpr(p5) = G_PTR_ADD %0, %1
216    %3:vgpr(s32) = G_CONSTANT i32 0
217    G_STORE %3, %2 :: (store 1, align 1, addrspace 5)
218
219...
220
221---
222
223name: function_store_private_s32_to_1_constant_4095
224legalized:       true
225regBankSelected: true
226tracksRegLiveness: true
227machineFunctionInfo:
228  isEntryFunction: false
229  scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
230  stackPtrOffsetReg: $sgpr32
231stack:
232  - { id: 0, size: 4096, alignment: 4 }
233
234body: |
235  bb.0:
236
237    ; GFX6-LABEL: name: function_store_private_s32_to_1_constant_4095
238    ; GFX6: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
239    ; GFX6: BUFFER_STORE_BYTE_OFFSET [[V_MOV_B32_e32_]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 4095, 0, 0, 0, 0, 0, implicit $exec :: (store 1, addrspace 5)
240    ; GFX9-LABEL: name: function_store_private_s32_to_1_constant_4095
241    ; GFX9: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
242    ; GFX9: BUFFER_STORE_BYTE_OFFSET [[V_MOV_B32_e32_]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 4095, 0, 0, 0, 0, 0, implicit $exec :: (store 1, addrspace 5)
243    %0:vgpr(p5) = G_CONSTANT i32 4095
244    %1:vgpr(s32) = G_CONSTANT i32 0
245    G_STORE %1, %0 :: (store 1, align 1, addrspace 5)
246
247...
248
249---
250
251name: function_store_private_s32_to_1_constant_4096
252legalized:       true
253regBankSelected: true
254tracksRegLiveness: true
255machineFunctionInfo:
256  isEntryFunction: false
257  scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
258  stackPtrOffsetReg: $sgpr32
259stack:
260  - { id: 0, size: 4096, alignment: 4 }
261
262body: |
263  bb.0:
264
265    ; GFX6-LABEL: name: function_store_private_s32_to_1_constant_4096
266    ; GFX6: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
267    ; GFX6: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4096, implicit $exec
268    ; GFX6: BUFFER_STORE_BYTE_OFFEN [[V_MOV_B32_e32_]], [[V_MOV_B32_e32_1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 1, addrspace 5)
269    ; GFX9-LABEL: name: function_store_private_s32_to_1_constant_4096
270    ; GFX9: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
271    ; GFX9: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4096, implicit $exec
272    ; GFX9: BUFFER_STORE_BYTE_OFFEN [[V_MOV_B32_e32_]], [[V_MOV_B32_e32_1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 1, addrspace 5)
273    %0:vgpr(p5) = G_CONSTANT i32 4096
274    %1:vgpr(s32) = G_CONSTANT i32 0
275    G_STORE %1, %0 :: (store 1, align 1, addrspace 5)
276
277...
278
279---
280
281name: kernel_store_private_s32_to_4
282legalized:       true
283regBankSelected: true
284tracksRegLiveness: true
285machineFunctionInfo:
286  isEntryFunction: true
287  scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
288
289body: |
290  bb.0:
291    liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3
292
293    ; GFX6-LABEL: name: kernel_store_private_s32_to_4
294    ; GFX6: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3
295    ; GFX6: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
296    ; GFX6: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
297    ; GFX6: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 4, addrspace 5)
298    ; GFX9-LABEL: name: kernel_store_private_s32_to_4
299    ; GFX9: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3
300    ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
301    ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
302    ; GFX9: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 4, addrspace 5)
303    %0:vgpr(s32) = COPY $vgpr0
304    %1:vgpr(p5) = COPY $vgpr1
305    G_STORE %0, %1 :: (store 4, align 4, addrspace 5)
306
307...
308
309---
310
311name: kernel_store_private_s32_to_2
312legalized:       true
313regBankSelected: true
314tracksRegLiveness: true
315machineFunctionInfo:
316  isEntryFunction: true
317  scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
318
319body: |
320  bb.0:
321    liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3
322
323    ; GFX6-LABEL: name: kernel_store_private_s32_to_2
324    ; GFX6: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3
325    ; GFX6: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
326    ; GFX6: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
327    ; GFX6: BUFFER_STORE_SHORT_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 2, addrspace 5)
328    ; GFX9-LABEL: name: kernel_store_private_s32_to_2
329    ; GFX9: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3
330    ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
331    ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
332    ; GFX9: BUFFER_STORE_SHORT_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 2, addrspace 5)
333    %0:vgpr(s32) = COPY $vgpr0
334    %1:vgpr(p5) = COPY $vgpr1
335    G_STORE %0, %1 :: (store 2, align 2, addrspace 5)
336
337...
338
339---
340
341name: kernel_store_private_s32_to_1
342legalized:       true
343regBankSelected: true
344tracksRegLiveness: true
345machineFunctionInfo:
346  isEntryFunction: true
347  scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
348
349body: |
350  bb.0:
351    liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3
352
353    ; GFX6-LABEL: name: kernel_store_private_s32_to_1
354    ; GFX6: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3
355    ; GFX6: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
356    ; GFX6: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
357    ; GFX6: BUFFER_STORE_BYTE_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 1, addrspace 5)
358    ; GFX9-LABEL: name: kernel_store_private_s32_to_1
359    ; GFX9: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3
360    ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
361    ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
362    ; GFX9: BUFFER_STORE_BYTE_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 1, addrspace 5)
363    %0:vgpr(s32) = COPY $vgpr0
364    %1:vgpr(p5) = COPY $vgpr1
365    G_STORE %0, %1 :: (store 1, align 1, addrspace 5)
366
367...
368
369---
370
371name: kernel_store_private_v2s16
372legalized:       true
373regBankSelected: true
374tracksRegLiveness: true
375machineFunctionInfo:
376  isEntryFunction: true
377  scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
378
379body: |
380  bb.0:
381    liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3
382
383    ; GFX6-LABEL: name: kernel_store_private_v2s16
384    ; GFX6: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3
385    ; GFX6: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
386    ; GFX6: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
387    ; GFX6: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 4, addrspace 5)
388    ; GFX9-LABEL: name: kernel_store_private_v2s16
389    ; GFX9: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3
390    ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
391    ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
392    ; GFX9: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 4, addrspace 5)
393    %0:vgpr(<2 x s16>) = COPY $vgpr0
394    %1:vgpr(p5) = COPY $vgpr1
395    G_STORE %0, %1 :: (store 4, align 4, addrspace 5)
396
397...
398
399---
400
401name: kernel_store_private_p3
402legalized:       true
403regBankSelected: true
404tracksRegLiveness: true
405machineFunctionInfo:
406  isEntryFunction: true
407  scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
408
409body: |
410  bb.0:
411    liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3
412
413    ; GFX6-LABEL: name: kernel_store_private_p3
414    ; GFX6: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3
415    ; GFX6: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
416    ; GFX6: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
417    ; GFX6: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 4, addrspace 5)
418    ; GFX9-LABEL: name: kernel_store_private_p3
419    ; GFX9: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3
420    ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
421    ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
422    ; GFX9: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 4, addrspace 5)
423    %0:vgpr(p3) = COPY $vgpr0
424    %1:vgpr(p5) = COPY $vgpr1
425    G_STORE %0, %1 :: (store 4, align 4, addrspace 5)
426
427...
428
429---
430
431name: kernel_store_private_p5
432legalized:       true
433regBankSelected: true
434tracksRegLiveness: true
435machineFunctionInfo:
436  isEntryFunction: true
437  scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
438
439body: |
440  bb.0:
441    liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3
442
443    ; GFX6-LABEL: name: kernel_store_private_p5
444    ; GFX6: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3
445    ; GFX6: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
446    ; GFX6: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
447    ; GFX6: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 4, addrspace 5)
448    ; GFX9-LABEL: name: kernel_store_private_p5
449    ; GFX9: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3
450    ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
451    ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
452    ; GFX9: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 4, addrspace 5)
453    %0:vgpr(p5) = COPY $vgpr0
454    %1:vgpr(p5) = COPY $vgpr1
455    G_STORE %0, %1 :: (store 4, align 4, addrspace 5)
456
457...
458
459---
460
461name: kernel_store_private_s32_to_1_fi_offset_4095
462legalized:       true
463regBankSelected: true
464tracksRegLiveness: true
465machineFunctionInfo:
466  isEntryFunction: true
467  scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
468stack:
469  - { id: 0, size: 4096, alignment: 4 }
470
471body: |
472  bb.0:
473    liveins: $sgpr0_sgpr1_sgpr2_sgpr3
474
475    ; GFX6-LABEL: name: kernel_store_private_s32_to_1_fi_offset_4095
476    ; GFX6: liveins: $sgpr0_sgpr1_sgpr2_sgpr3
477    ; GFX6: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
478    ; GFX6: BUFFER_STORE_BYTE_OFFEN [[V_MOV_B32_e32_]], %stack.0, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 4095, 0, 0, 0, 0, 0, implicit $exec :: (store 1, addrspace 5)
479    ; GFX9-LABEL: name: kernel_store_private_s32_to_1_fi_offset_4095
480    ; GFX9: liveins: $sgpr0_sgpr1_sgpr2_sgpr3
481    ; GFX9: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
482    ; GFX9: BUFFER_STORE_BYTE_OFFEN [[V_MOV_B32_e32_]], %stack.0, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 4095, 0, 0, 0, 0, 0, implicit $exec :: (store 1, addrspace 5)
483    %0:vgpr(p5) = G_FRAME_INDEX %stack.0
484    %1:vgpr(s32) = G_CONSTANT i32 4095
485    %2:vgpr(p5) = G_PTR_ADD %0, %1
486    %3:vgpr(s32) = G_CONSTANT i32 0
487    G_STORE %3, %2 :: (store 1, align 1, addrspace 5)
488
489...
490
491---
492
493name: kernel_store_private_s32_to_1_constant_4095
494legalized:       true
495regBankSelected: true
496tracksRegLiveness: true
497machineFunctionInfo:
498  isEntryFunction: true
499  scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
500stack:
501  - { id: 0, size: 4096, alignment: 4 }
502
503body: |
504  bb.0:
505    liveins: $sgpr0_sgpr1_sgpr2_sgpr3
506
507    ; GFX6-LABEL: name: kernel_store_private_s32_to_1_constant_4095
508    ; GFX6: liveins: $sgpr0_sgpr1_sgpr2_sgpr3
509    ; GFX6: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
510    ; GFX6: BUFFER_STORE_BYTE_OFFSET [[V_MOV_B32_e32_]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 4095, 0, 0, 0, 0, 0, implicit $exec :: (store 1, addrspace 5)
511    ; GFX9-LABEL: name: kernel_store_private_s32_to_1_constant_4095
512    ; GFX9: liveins: $sgpr0_sgpr1_sgpr2_sgpr3
513    ; GFX9: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
514    ; GFX9: BUFFER_STORE_BYTE_OFFSET [[V_MOV_B32_e32_]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 4095, 0, 0, 0, 0, 0, implicit $exec :: (store 1, addrspace 5)
515    %0:vgpr(p5) = G_CONSTANT i32 4095
516    %1:vgpr(s32) = G_CONSTANT i32 0
517    G_STORE %1, %0 :: (store 1, align 1, addrspace 5)
518
519...
520
521---
522
523name: kernel_store_private_s32_to_1_constant_4096
524legalized:       true
525regBankSelected: true
526tracksRegLiveness: true
527machineFunctionInfo:
528  isEntryFunction: true
529  scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
530stack:
531  - { id: 0, size: 4096, alignment: 4 }
532
533body: |
534  bb.0:
535    liveins: $sgpr0_sgpr1_sgpr2_sgpr3
536
537    ; GFX6-LABEL: name: kernel_store_private_s32_to_1_constant_4096
538    ; GFX6: liveins: $sgpr0_sgpr1_sgpr2_sgpr3
539    ; GFX6: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
540    ; GFX6: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4096, implicit $exec
541    ; GFX6: BUFFER_STORE_BYTE_OFFEN [[V_MOV_B32_e32_]], [[V_MOV_B32_e32_1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 1, addrspace 5)
542    ; GFX9-LABEL: name: kernel_store_private_s32_to_1_constant_4096
543    ; GFX9: liveins: $sgpr0_sgpr1_sgpr2_sgpr3
544    ; GFX9: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
545    ; GFX9: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4096, implicit $exec
546    ; GFX9: BUFFER_STORE_BYTE_OFFEN [[V_MOV_B32_e32_]], [[V_MOV_B32_e32_1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 1, addrspace 5)
547    %0:vgpr(p5) = G_CONSTANT i32 4096
548    %1:vgpr(s32) = G_CONSTANT i32 0
549    G_STORE %1, %0 :: (store 1, align 1, addrspace 5)
550
551...
552