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 -O0 -march=amdgcn -mcpu=tahiti -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX6 %s
4 # RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX9 %s
5 # RUN: llc -march=amdgcn -mcpu=gfx1010 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX9 %s
9 name: load_private_s32_from_4
12 tracksRegLiveness: true
14 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
15 stackPtrOffsetReg: $sgpr32
21 ; GFX6-LABEL: name: load_private_s32_from_4
22 ; GFX6: liveins: $vgpr0
24 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
25 ; GFX6-NEXT: [[BUFFER_LOAD_DWORD_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_DWORD_OFFEN [[COPY]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s32), addrspace 5)
26 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_DWORD_OFFEN]]
27 ; GFX9-LABEL: name: load_private_s32_from_4
28 ; GFX9: liveins: $vgpr0
30 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
31 ; GFX9-NEXT: [[BUFFER_LOAD_DWORD_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_DWORD_OFFEN [[COPY]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s32), addrspace 5)
32 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_DWORD_OFFEN]]
33 %0:vgpr(p5) = COPY $vgpr0
34 %1:vgpr(s32) = G_LOAD %0 :: (load (s32), align 4, addrspace 5)
41 name: load_private_s32_from_2
44 tracksRegLiveness: true
46 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
47 stackPtrOffsetReg: $sgpr32
53 ; GFX6-LABEL: name: load_private_s32_from_2
54 ; GFX6: liveins: $vgpr0
56 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
57 ; GFX6-NEXT: [[BUFFER_LOAD_USHORT_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_USHORT_OFFEN [[COPY]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s16), addrspace 5)
58 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_USHORT_OFFEN]]
59 ; GFX9-LABEL: name: load_private_s32_from_2
60 ; GFX9: liveins: $vgpr0
62 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
63 ; GFX9-NEXT: [[BUFFER_LOAD_USHORT_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_USHORT_OFFEN [[COPY]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s16), addrspace 5)
64 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_USHORT_OFFEN]]
65 %0:vgpr(p5) = COPY $vgpr0
66 %1:vgpr(s32) = G_LOAD %0 :: (load (s16), align 2, addrspace 5)
73 name: load_private_s32_from_1
76 tracksRegLiveness: true
78 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
79 stackPtrOffsetReg: $sgpr32
85 ; GFX6-LABEL: name: load_private_s32_from_1
86 ; GFX6: liveins: $vgpr0
88 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
89 ; GFX6-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN [[COPY]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
90 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
91 ; GFX9-LABEL: name: load_private_s32_from_1
92 ; GFX9: liveins: $vgpr0
94 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
95 ; GFX9-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN [[COPY]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
96 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
97 %0:vgpr(p5) = COPY $vgpr0
98 %1:vgpr(s32) = G_LOAD %0 :: (load (s8), align 1, addrspace 5)
105 name: load_private_p3_from_4
107 regBankSelected: true
108 tracksRegLiveness: true
110 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
111 stackPtrOffsetReg: $sgpr32
117 ; GFX6-LABEL: name: load_private_p3_from_4
118 ; GFX6: liveins: $vgpr0
120 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
121 ; GFX6-NEXT: [[BUFFER_LOAD_DWORD_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_DWORD_OFFEN [[COPY]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (p3), addrspace 5)
122 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_DWORD_OFFEN]]
123 ; GFX9-LABEL: name: load_private_p3_from_4
124 ; GFX9: liveins: $vgpr0
126 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
127 ; GFX9-NEXT: [[BUFFER_LOAD_DWORD_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_DWORD_OFFEN [[COPY]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (p3), addrspace 5)
128 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_DWORD_OFFEN]]
129 %0:vgpr(p5) = COPY $vgpr0
130 %1:vgpr(p3) = G_LOAD %0 :: (load (p3), align 4, addrspace 5)
137 name: load_private_p5_from_4
139 regBankSelected: true
140 tracksRegLiveness: true
142 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
143 stackPtrOffsetReg: $sgpr32
149 ; GFX6-LABEL: name: load_private_p5_from_4
150 ; GFX6: liveins: $vgpr0
152 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
153 ; GFX6-NEXT: [[BUFFER_LOAD_DWORD_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_DWORD_OFFEN [[COPY]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (p5), addrspace 5)
154 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_DWORD_OFFEN]]
155 ; GFX9-LABEL: name: load_private_p5_from_4
156 ; GFX9: liveins: $vgpr0
158 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
159 ; GFX9-NEXT: [[BUFFER_LOAD_DWORD_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_DWORD_OFFEN [[COPY]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (p5), addrspace 5)
160 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_DWORD_OFFEN]]
161 %0:vgpr(p5) = COPY $vgpr0
162 %1:vgpr(p5) = G_LOAD %0 :: (load (p5), align 4, addrspace 5)
169 name: load_private_v2s16
171 regBankSelected: true
172 tracksRegLiveness: true
174 isEntryFunction: false
175 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
176 stackPtrOffsetReg: $sgpr32
182 ; GFX6-LABEL: name: load_private_v2s16
183 ; GFX6: liveins: $vgpr0
185 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
186 ; GFX6-NEXT: [[BUFFER_LOAD_DWORD_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_DWORD_OFFEN [[COPY]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (<2 x s16>), addrspace 5)
187 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_DWORD_OFFEN]]
188 ; GFX9-LABEL: name: load_private_v2s16
189 ; GFX9: liveins: $vgpr0
191 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
192 ; GFX9-NEXT: [[BUFFER_LOAD_DWORD_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_DWORD_OFFEN [[COPY]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (<2 x s16>), addrspace 5)
193 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_DWORD_OFFEN]]
194 %0:vgpr(p5) = COPY $vgpr0
195 %1:vgpr(<2 x s16>) = G_LOAD %0 :: (load (<2 x s16>), align 4, addrspace 5)
200 ################################################################################
201 ### Stress addressing modes
202 ################################################################################
206 name: load_private_s32_from_1_gep_2047
208 regBankSelected: true
209 tracksRegLiveness: true
211 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
212 stackPtrOffsetReg: $sgpr32
218 ; GFX6-LABEL: name: load_private_s32_from_1_gep_2047
219 ; GFX6: liveins: $vgpr0
221 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
222 ; GFX6-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 2047, implicit $exec
223 ; GFX6-NEXT: %2:vgpr_32, dead %4:sreg_64_xexec = V_ADD_CO_U32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
224 ; GFX6-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN %2, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
225 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
226 ; GFX9-LABEL: name: load_private_s32_from_1_gep_2047
227 ; GFX9: liveins: $vgpr0
229 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
230 ; GFX9-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN [[COPY]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 2047, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
231 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
232 %0:vgpr(p5) = COPY $vgpr0
233 %1:vgpr(s32) = G_CONSTANT i32 2047
234 %2:vgpr(p5) = G_PTR_ADD %0, %1
235 %3:vgpr(s32) = G_LOAD %2 :: (load (s8), align 1, addrspace 5)
242 name: load_private_s32_from_1_gep_2047_known_bits
244 regBankSelected: true
245 tracksRegLiveness: true
247 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
248 stackPtrOffsetReg: $sgpr32
254 ; GFX6-LABEL: name: load_private_s32_from_1_gep_2047_known_bits
255 ; GFX6: liveins: $vgpr0
257 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
258 ; GFX6-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 2147483647, implicit $exec
259 ; GFX6-NEXT: [[V_AND_B32_e64_:%[0-9]+]]:vgpr_32 = V_AND_B32_e64 [[COPY]], [[V_MOV_B32_e32_]], implicit $exec
260 ; GFX6-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN [[V_AND_B32_e64_]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 2047, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
261 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
262 ; GFX9-LABEL: name: load_private_s32_from_1_gep_2047_known_bits
263 ; GFX9: liveins: $vgpr0
265 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
266 ; GFX9-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 2147483647, implicit $exec
267 ; GFX9-NEXT: [[V_AND_B32_e64_:%[0-9]+]]:vgpr_32 = V_AND_B32_e64 [[COPY]], [[V_MOV_B32_e32_]], implicit $exec
268 ; GFX9-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN [[V_AND_B32_e64_]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 2047, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
269 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
270 %0:vgpr(s32) = COPY $vgpr0
271 %1:vgpr(s32) = G_CONSTANT i32 2147483647
272 %2:vgpr(s32) = G_AND %0, %1
273 %3:vgpr(p5) = G_INTTOPTR %2
274 %4:vgpr(s32) = G_CONSTANT i32 2047
275 %5:vgpr(p5) = G_PTR_ADD %3, %4
276 %6:vgpr(s32) = G_LOAD %5 :: (load (s8), align 1, addrspace 5)
283 name: load_private_s32_from_1_gep_2048
285 regBankSelected: true
286 tracksRegLiveness: true
288 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
289 stackPtrOffsetReg: $sgpr32
295 ; GFX6-LABEL: name: load_private_s32_from_1_gep_2048
296 ; GFX6: liveins: $vgpr0
298 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
299 ; GFX6-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 2048, implicit $exec
300 ; GFX6-NEXT: %2:vgpr_32, dead %4:sreg_64_xexec = V_ADD_CO_U32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
301 ; GFX6-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN %2, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
302 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
303 ; GFX9-LABEL: name: load_private_s32_from_1_gep_2048
304 ; GFX9: liveins: $vgpr0
306 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
307 ; GFX9-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN [[COPY]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 2048, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
308 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
309 %0:vgpr(p5) = COPY $vgpr0
310 %1:vgpr(s32) = G_CONSTANT i32 2048
311 %2:vgpr(p5) = G_PTR_ADD %0, %1
312 %3:vgpr(s32) = G_LOAD %2 :: (load (s8), align 1, addrspace 5)
319 name: load_private_s32_from_1_gep_m2047
321 regBankSelected: true
322 tracksRegLiveness: true
324 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
325 stackPtrOffsetReg: $sgpr32
331 ; GFX6-LABEL: name: load_private_s32_from_1_gep_m2047
332 ; GFX6: liveins: $vgpr0
334 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
335 ; GFX6-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 -2047, implicit $exec
336 ; GFX6-NEXT: %2:vgpr_32, dead %4:sreg_64_xexec = V_ADD_CO_U32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
337 ; GFX6-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN %2, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
338 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
339 ; GFX9-LABEL: name: load_private_s32_from_1_gep_m2047
340 ; GFX9: liveins: $vgpr0
342 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
343 ; GFX9-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 -2047, implicit $exec
344 ; GFX9-NEXT: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
345 ; GFX9-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN [[V_ADD_U32_e64_]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
346 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
347 %0:vgpr(p5) = COPY $vgpr0
348 %1:vgpr(s32) = G_CONSTANT i32 -2047
349 %2:vgpr(p5) = G_PTR_ADD %0, %1
350 %3:vgpr(s32) = G_LOAD %2 :: (load (s8), align 1, addrspace 5)
357 name: load_private_s32_from_1_gep_m2048
359 regBankSelected: true
360 tracksRegLiveness: true
362 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
363 stackPtrOffsetReg: $sgpr32
369 ; GFX6-LABEL: name: load_private_s32_from_1_gep_m2048
370 ; GFX6: liveins: $vgpr0
372 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
373 ; GFX6-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 -2048, implicit $exec
374 ; GFX6-NEXT: %2:vgpr_32, dead %4:sreg_64_xexec = V_ADD_CO_U32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
375 ; GFX6-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN %2, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
376 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
377 ; GFX9-LABEL: name: load_private_s32_from_1_gep_m2048
378 ; GFX9: liveins: $vgpr0
380 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
381 ; GFX9-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 -2048, implicit $exec
382 ; GFX9-NEXT: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
383 ; GFX9-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN [[V_ADD_U32_e64_]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
384 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
385 %0:vgpr(p5) = COPY $vgpr0
386 %1:vgpr(s32) = G_CONSTANT i32 -2048
387 %2:vgpr(p5) = G_PTR_ADD %0, %1
388 %3:vgpr(s32) = G_LOAD %2 :: (load (s8), align 1, addrspace 5)
395 name: load_private_s32_from_1_gep_4095
397 regBankSelected: true
398 tracksRegLiveness: true
400 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
401 stackPtrOffsetReg: $sgpr32
407 ; GFX6-LABEL: name: load_private_s32_from_1_gep_4095
408 ; GFX6: liveins: $vgpr0
410 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
411 ; GFX6-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4095, implicit $exec
412 ; GFX6-NEXT: %2:vgpr_32, dead %4:sreg_64_xexec = V_ADD_CO_U32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
413 ; GFX6-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN %2, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
414 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
415 ; GFX9-LABEL: name: load_private_s32_from_1_gep_4095
416 ; GFX9: liveins: $vgpr0
418 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
419 ; GFX9-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN [[COPY]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 4095, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
420 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
421 %0:vgpr(p5) = COPY $vgpr0
422 %1:vgpr(s32) = G_CONSTANT i32 4095
423 %2:vgpr(p5) = G_PTR_ADD %0, %1
424 %3:vgpr(s32) = G_LOAD %2 :: (load (s8), align 1, addrspace 5)
431 name: load_private_s32_from_1_gep_4096
433 regBankSelected: true
434 tracksRegLiveness: true
436 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
437 stackPtrOffsetReg: $sgpr32
443 ; GFX6-LABEL: name: load_private_s32_from_1_gep_4096
444 ; GFX6: liveins: $vgpr0
446 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
447 ; GFX6-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4096, implicit $exec
448 ; GFX6-NEXT: %2:vgpr_32, dead %4:sreg_64_xexec = V_ADD_CO_U32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
449 ; GFX6-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN %2, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
450 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
451 ; GFX9-LABEL: name: load_private_s32_from_1_gep_4096
452 ; GFX9: liveins: $vgpr0
454 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
455 ; GFX9-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4096, implicit $exec
456 ; GFX9-NEXT: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
457 ; GFX9-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN [[V_ADD_U32_e64_]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
458 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
459 %0:vgpr(p5) = COPY $vgpr0
460 %1:vgpr(s32) = G_CONSTANT i32 4096
461 %2:vgpr(p5) = G_PTR_ADD %0, %1
462 %3:vgpr(s32) = G_LOAD %2 :: (load (s8), align 1, addrspace 5)
469 name: load_private_s32_from_1_gep_m4095
471 regBankSelected: true
472 tracksRegLiveness: true
474 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
475 stackPtrOffsetReg: $sgpr32
481 ; GFX6-LABEL: name: load_private_s32_from_1_gep_m4095
482 ; GFX6: liveins: $vgpr0
484 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
485 ; GFX6-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 -4095, implicit $exec
486 ; GFX6-NEXT: %2:vgpr_32, dead %4:sreg_64_xexec = V_ADD_CO_U32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
487 ; GFX6-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN %2, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
488 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
489 ; GFX9-LABEL: name: load_private_s32_from_1_gep_m4095
490 ; GFX9: liveins: $vgpr0
492 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
493 ; GFX9-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 -4095, implicit $exec
494 ; GFX9-NEXT: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
495 ; GFX9-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN [[V_ADD_U32_e64_]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
496 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
497 %0:vgpr(p5) = COPY $vgpr0
498 %1:vgpr(s32) = G_CONSTANT i32 -4095
499 %2:vgpr(p5) = G_PTR_ADD %0, %1
500 %3:vgpr(s32) = G_LOAD %2 :: (load (s8), align 1, addrspace 5)
507 name: load_private_s32_from_1_gep_m4096
509 regBankSelected: true
510 tracksRegLiveness: true
512 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
513 stackPtrOffsetReg: $sgpr32
519 ; GFX6-LABEL: name: load_private_s32_from_1_gep_m4096
520 ; GFX6: liveins: $vgpr0
522 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
523 ; GFX6-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 -4096, implicit $exec
524 ; GFX6-NEXT: %2:vgpr_32, dead %4:sreg_64_xexec = V_ADD_CO_U32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
525 ; GFX6-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN %2, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
526 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
527 ; GFX9-LABEL: name: load_private_s32_from_1_gep_m4096
528 ; GFX9: liveins: $vgpr0
530 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
531 ; GFX9-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 -4096, implicit $exec
532 ; GFX9-NEXT: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
533 ; GFX9-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN [[V_ADD_U32_e64_]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
534 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
535 %0:vgpr(p5) = COPY $vgpr0
536 %1:vgpr(s32) = G_CONSTANT i32 -4096
537 %2:vgpr(p5) = G_PTR_ADD %0, %1
538 %3:vgpr(s32) = G_LOAD %2 :: (load (s8), align 1, addrspace 5)
545 name: load_private_s32_from_1_gep_8191
547 regBankSelected: true
548 tracksRegLiveness: true
550 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
551 stackPtrOffsetReg: $sgpr32
557 ; GFX6-LABEL: name: load_private_s32_from_1_gep_8191
558 ; GFX6: liveins: $vgpr0
560 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
561 ; GFX6-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 8191, implicit $exec
562 ; GFX6-NEXT: %2:vgpr_32, dead %4:sreg_64_xexec = V_ADD_CO_U32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
563 ; GFX6-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN %2, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
564 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
565 ; GFX9-LABEL: name: load_private_s32_from_1_gep_8191
566 ; GFX9: liveins: $vgpr0
568 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
569 ; GFX9-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 8191, implicit $exec
570 ; GFX9-NEXT: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
571 ; GFX9-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN [[V_ADD_U32_e64_]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
572 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
573 %0:vgpr(p5) = COPY $vgpr0
574 %1:vgpr(s32) = G_CONSTANT i32 8191
575 %2:vgpr(p5) = G_PTR_ADD %0, %1
576 %3:vgpr(s32) = G_LOAD %2 :: (load (s8), align 1, addrspace 5)
583 name: load_private_s32_from_1_gep_8192
585 regBankSelected: true
586 tracksRegLiveness: true
588 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
589 stackPtrOffsetReg: $sgpr32
595 ; GFX6-LABEL: name: load_private_s32_from_1_gep_8192
596 ; GFX6: liveins: $vgpr0
598 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
599 ; GFX6-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 8192, implicit $exec
600 ; GFX6-NEXT: %2:vgpr_32, dead %4:sreg_64_xexec = V_ADD_CO_U32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
601 ; GFX6-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN %2, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
602 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
603 ; GFX9-LABEL: name: load_private_s32_from_1_gep_8192
604 ; GFX9: liveins: $vgpr0
606 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
607 ; GFX9-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 8192, implicit $exec
608 ; GFX9-NEXT: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
609 ; GFX9-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN [[V_ADD_U32_e64_]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
610 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
611 %0:vgpr(p5) = COPY $vgpr0
612 %1:vgpr(s32) = G_CONSTANT i32 8192
613 %2:vgpr(p5) = G_PTR_ADD %0, %1
614 %3:vgpr(s32) = G_LOAD %2 :: (load (s8), align 1, addrspace 5)
621 name: load_private_s32_from_1_gep_m8191
623 regBankSelected: true
624 tracksRegLiveness: true
626 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
627 stackPtrOffsetReg: $sgpr32
633 ; GFX6-LABEL: name: load_private_s32_from_1_gep_m8191
634 ; GFX6: liveins: $vgpr0
636 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
637 ; GFX6-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 -8191, implicit $exec
638 ; GFX6-NEXT: %2:vgpr_32, dead %4:sreg_64_xexec = V_ADD_CO_U32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
639 ; GFX6-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN %2, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
640 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
641 ; GFX9-LABEL: name: load_private_s32_from_1_gep_m8191
642 ; GFX9: liveins: $vgpr0
644 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
645 ; GFX9-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 -8191, implicit $exec
646 ; GFX9-NEXT: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
647 ; GFX9-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN [[V_ADD_U32_e64_]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
648 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
649 %0:vgpr(p5) = COPY $vgpr0
650 %1:vgpr(s32) = G_CONSTANT i32 -8191
651 %2:vgpr(p5) = G_PTR_ADD %0, %1
652 %3:vgpr(s32) = G_LOAD %2 :: (load (s8), align 1, addrspace 5)
659 name: load_private_s32_from_1_gep_m8192
661 regBankSelected: true
662 tracksRegLiveness: true
664 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
665 stackPtrOffsetReg: $sgpr32
671 ; GFX6-LABEL: name: load_private_s32_from_1_gep_m8192
672 ; GFX6: liveins: $vgpr0
674 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
675 ; GFX6-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 -8192, implicit $exec
676 ; GFX6-NEXT: %2:vgpr_32, dead %4:sreg_64_xexec = V_ADD_CO_U32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
677 ; GFX6-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN %2, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
678 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
679 ; GFX9-LABEL: name: load_private_s32_from_1_gep_m8192
680 ; GFX9: liveins: $vgpr0
682 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
683 ; GFX9-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 -8192, implicit $exec
684 ; GFX9-NEXT: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
685 ; GFX9-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN [[V_ADD_U32_e64_]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
686 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
687 %0:vgpr(p5) = COPY $vgpr0
688 %1:vgpr(s32) = G_CONSTANT i32 -8192
689 %2:vgpr(p5) = G_PTR_ADD %0, %1
690 %3:vgpr(s32) = G_LOAD %2 :: (load (s8), align 1, addrspace 5)
697 name: load_private_s32_from_4_constant_0
699 regBankSelected: true
700 tracksRegLiveness: true
702 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
703 stackPtrOffsetReg: $sgpr32
708 ; GFX6-LABEL: name: load_private_s32_from_4_constant_0
709 ; GFX6: [[BUFFER_LOAD_DWORD_OFFSET:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_DWORD_OFFSET $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s32), addrspace 5)
710 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_DWORD_OFFSET]]
711 ; GFX9-LABEL: name: load_private_s32_from_4_constant_0
712 ; GFX9: [[BUFFER_LOAD_DWORD_OFFSET:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_DWORD_OFFSET $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s32), addrspace 5)
713 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_DWORD_OFFSET]]
714 %0:vgpr(p5) = G_CONSTANT i32 0
715 %1:vgpr(s32) = G_LOAD %0 :: (load (s32), align 4, addrspace 5)
722 name: load_private_s32_from_4_constant_sgpr_16
724 regBankSelected: true
725 tracksRegLiveness: true
727 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
728 stackPtrOffsetReg: $sgpr32
733 ; GFX6-LABEL: name: load_private_s32_from_4_constant_sgpr_16
734 ; GFX6: [[BUFFER_LOAD_DWORD_OFFSET:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_DWORD_OFFSET $sgpr0_sgpr1_sgpr2_sgpr3, 0, 16, 0, 0, 0, implicit $exec :: (load (s32), addrspace 5)
735 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_DWORD_OFFSET]]
736 ; GFX9-LABEL: name: load_private_s32_from_4_constant_sgpr_16
737 ; GFX9: [[BUFFER_LOAD_DWORD_OFFSET:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_DWORD_OFFSET $sgpr0_sgpr1_sgpr2_sgpr3, 0, 16, 0, 0, 0, implicit $exec :: (load (s32), addrspace 5)
738 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_DWORD_OFFSET]]
739 %0:sgpr(p5) = G_CONSTANT i32 16
740 %1:vgpr(s32) = G_LOAD %0 :: (load (s32), align 4, addrspace 5)
747 name: load_private_s32_from_1_constant_4095
749 regBankSelected: true
750 tracksRegLiveness: true
752 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
753 stackPtrOffsetReg: $sgpr32
758 ; GFX6-LABEL: name: load_private_s32_from_1_constant_4095
759 ; GFX6: [[BUFFER_LOAD_UBYTE_OFFSET:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFSET $sgpr0_sgpr1_sgpr2_sgpr3, 0, 4095, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
760 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFSET]]
761 ; GFX9-LABEL: name: load_private_s32_from_1_constant_4095
762 ; GFX9: [[BUFFER_LOAD_UBYTE_OFFSET:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFSET $sgpr0_sgpr1_sgpr2_sgpr3, 0, 4095, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
763 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFSET]]
764 %0:vgpr(p5) = G_CONSTANT i32 4095
765 %1:vgpr(s32) = G_LOAD %0 :: (load (s8), align 1, addrspace 5)
772 name: load_private_s32_from_1_constant_4096
774 regBankSelected: true
775 tracksRegLiveness: true
777 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
778 stackPtrOffsetReg: $sgpr32
783 ; GFX6-LABEL: name: load_private_s32_from_1_constant_4096
784 ; GFX6: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4096, implicit $exec
785 ; GFX6-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN [[V_MOV_B32_e32_]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
786 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
787 ; GFX9-LABEL: name: load_private_s32_from_1_constant_4096
788 ; GFX9: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4096, implicit $exec
789 ; GFX9-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN [[V_MOV_B32_e32_]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
790 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
791 %0:vgpr(p5) = G_CONSTANT i32 4096
792 %1:vgpr(s32) = G_LOAD %0 :: (load (s8), align 1, addrspace 5)
799 name: load_private_s32_from_fi
801 regBankSelected: true
802 tracksRegLiveness: true
804 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
805 stackPtrOffsetReg: $sgpr32
807 - { id: 0, size: 4, alignment: 4 }
812 ; GFX6-LABEL: name: load_private_s32_from_fi
813 ; GFX6: [[BUFFER_LOAD_DWORD_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_DWORD_OFFEN %stack.0, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s32), addrspace 5)
814 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_DWORD_OFFEN]]
815 ; GFX9-LABEL: name: load_private_s32_from_fi
816 ; GFX9: [[BUFFER_LOAD_DWORD_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_DWORD_OFFEN %stack.0, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s32), addrspace 5)
817 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_DWORD_OFFEN]]
818 %0:vgpr(p5) = G_FRAME_INDEX %stack.0
819 %1:vgpr(s32) = G_LOAD %0 :: (load (s32), align 4, addrspace 5)
825 name: load_private_s32_from_1_fi_offset_4095
827 regBankSelected: true
828 tracksRegLiveness: true
830 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
831 stackPtrOffsetReg: $sgpr32
833 - { id: 0, size: 4096, alignment: 4 }
838 ; GFX6-LABEL: name: load_private_s32_from_1_fi_offset_4095
839 ; GFX6: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN %stack.0, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 4095, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
840 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
841 ; GFX9-LABEL: name: load_private_s32_from_1_fi_offset_4095
842 ; GFX9: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN %stack.0, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 4095, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
843 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
844 %0:vgpr(p5) = G_FRAME_INDEX %stack.0
845 %1:vgpr(s32) = G_CONSTANT i32 4095
846 %2:vgpr(p5) = G_PTR_ADD %0, %1
847 %3:vgpr(s32) = G_LOAD %2 :: (load (s8), align 1, addrspace 5)
852 # Have to hack around the copy of the constant to VGPR
854 name: load_private_s32_from_1_fi_offset_sgpr_4095
856 regBankSelected: true
857 tracksRegLiveness: true
859 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
860 stackPtrOffsetReg: $sgpr32
862 - { id: 0, size: 4096, alignment: 4 }
867 ; GFX6-LABEL: name: load_private_s32_from_1_fi_offset_sgpr_4095
868 ; GFX6: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN %stack.0, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 4095, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
869 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
870 ; GFX9-LABEL: name: load_private_s32_from_1_fi_offset_sgpr_4095
871 ; GFX9: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN %stack.0, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 4095, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
872 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
873 %0:vgpr(p5) = G_FRAME_INDEX %stack.0
874 %1:sgpr(s32) = G_CONSTANT i32 4095
875 %2:vgpr(s32) = COPY %1
876 %3:vgpr(p5) = G_PTR_ADD %0, %2
877 %4:vgpr(s32) = G_LOAD %3 :: (load (s8), align 1, addrspace 5)
884 name: load_private_s32_from_1_fi_offset_4096
886 regBankSelected: true
887 tracksRegLiveness: true
889 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
890 stackPtrOffsetReg: $sgpr32
892 - { id: 0, size: 8192, alignment: 4 }
897 ; GFX6-LABEL: name: load_private_s32_from_1_fi_offset_4096
898 ; GFX6: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 %stack.0, implicit $exec
899 ; GFX6-NEXT: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4096, implicit $exec
900 ; GFX6-NEXT: %2:vgpr_32, dead %4:sreg_64_xexec = V_ADD_CO_U32_e64 [[V_MOV_B32_e32_]], [[V_MOV_B32_e32_1]], 0, implicit $exec
901 ; GFX6-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN %2, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
902 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
903 ; GFX9-LABEL: name: load_private_s32_from_1_fi_offset_4096
904 ; GFX9: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 %stack.0, implicit $exec
905 ; GFX9-NEXT: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4096, implicit $exec
906 ; GFX9-NEXT: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 [[V_MOV_B32_e32_]], [[V_MOV_B32_e32_1]], 0, implicit $exec
907 ; GFX9-NEXT: [[BUFFER_LOAD_UBYTE_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_UBYTE_OFFEN [[V_ADD_U32_e64_]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, implicit $exec :: (load (s8), addrspace 5)
908 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_UBYTE_OFFEN]]
909 %0:vgpr(p5) = G_FRAME_INDEX %stack.0
910 %1:vgpr(s32) = G_CONSTANT i32 4096
911 %2:vgpr(p5) = G_PTR_ADD %0, %1
912 %3:vgpr(s32) = G_LOAD %2 :: (load (s8), align 1, addrspace 5)
917 # Should not fold offset if this is a null dereference.
920 name: load_private_s32_from_neg1
922 regBankSelected: true
923 tracksRegLiveness: true
925 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
926 stackPtrOffsetReg: $sgpr32
931 ; GFX6-LABEL: name: load_private_s32_from_neg1
932 ; GFX6: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 -1, implicit $exec
933 ; GFX6-NEXT: [[BUFFER_LOAD_DWORD_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_DWORD_OFFEN [[V_MOV_B32_e32_]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, -1, 0, 0, 0, implicit $exec :: (load (s32), addrspace 5)
934 ; GFX6-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_DWORD_OFFEN]]
935 ; GFX9-LABEL: name: load_private_s32_from_neg1
936 ; GFX9: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 -1, implicit $exec
937 ; GFX9-NEXT: [[BUFFER_LOAD_DWORD_OFFEN:%[0-9]+]]:vgpr_32 = BUFFER_LOAD_DWORD_OFFEN [[V_MOV_B32_e32_]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, -1, 0, 0, 0, implicit $exec :: (load (s32), addrspace 5)
938 ; GFX9-NEXT: $vgpr0 = COPY [[BUFFER_LOAD_DWORD_OFFEN]]
939 %0:vgpr(p5) = G_CONSTANT i32 -1
940 %1:vgpr(s32) = G_LOAD %0 :: (load (s32), align 4, addrspace 5)