1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -mtriple=amdgcn -mcpu=tahiti -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX6 %s 3# RUN: llc -O0 -mtriple=amdgcn -mcpu=tahiti -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX6 %s 4# RUN: llc -mtriple=amdgcn -mcpu=gfx900 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX9 %s 5# RUN: llc -mtriple=amdgcn -mcpu=gfx1010 -mattr=+wavefrontsize64 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX9 %s 6# RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX11 %s 7# RUN: llc -mtriple=amdgcn -mcpu=gfx1200 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX12 %s 8 9--- 10 11name: function_store_private_s32_to_4 12legalized: true 13regBankSelected: true 14tracksRegLiveness: true 15machineFunctionInfo: 16 isEntryFunction: false 17 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 18 stackPtrOffsetReg: $sgpr32 19 20body: | 21 bb.0: 22 liveins: $vgpr0, $vgpr1 23 24 ; GFX6-LABEL: name: function_store_private_s32_to_4 25 ; GFX6: liveins: $vgpr0, $vgpr1 26 ; GFX6-NEXT: {{ $}} 27 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 28 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 29 ; GFX6-NEXT: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (s32), addrspace 5) 30 ; 31 ; GFX9-LABEL: name: function_store_private_s32_to_4 32 ; GFX9: liveins: $vgpr0, $vgpr1 33 ; GFX9-NEXT: {{ $}} 34 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 35 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 36 ; GFX9-NEXT: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (s32), addrspace 5) 37 ; 38 ; GFX11-LABEL: name: function_store_private_s32_to_4 39 ; GFX11: liveins: $vgpr0, $vgpr1 40 ; GFX11-NEXT: {{ $}} 41 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 42 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 43 ; GFX11-NEXT: SCRATCH_STORE_DWORD [[COPY]], [[COPY1]], 0, 0, implicit $exec, implicit $flat_scr :: (store (s32), addrspace 5) 44 ; 45 ; GFX12-LABEL: name: function_store_private_s32_to_4 46 ; GFX12: liveins: $vgpr0, $vgpr1 47 ; GFX12-NEXT: {{ $}} 48 ; GFX12-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 49 ; GFX12-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 50 ; GFX12-NEXT: SCRATCH_STORE_DWORD [[COPY]], [[COPY1]], 0, 0, implicit $exec, implicit $flat_scr :: (store (s32), addrspace 5) 51 %0:vgpr(s32) = COPY $vgpr0 52 %1:vgpr(p5) = COPY $vgpr1 53 G_STORE %0, %1 :: (store (s32), align 4, addrspace 5) 54 55... 56 57--- 58 59name: function_store_private_s32_to_2 60legalized: true 61regBankSelected: true 62tracksRegLiveness: true 63machineFunctionInfo: 64 isEntryFunction: false 65 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 66 stackPtrOffsetReg: $sgpr32 67 68body: | 69 bb.0: 70 liveins: $vgpr0, $vgpr1 71 72 ; GFX6-LABEL: name: function_store_private_s32_to_2 73 ; GFX6: liveins: $vgpr0, $vgpr1 74 ; GFX6-NEXT: {{ $}} 75 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 76 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 77 ; GFX6-NEXT: BUFFER_STORE_SHORT_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (s16), addrspace 5) 78 ; 79 ; GFX9-LABEL: name: function_store_private_s32_to_2 80 ; GFX9: liveins: $vgpr0, $vgpr1 81 ; GFX9-NEXT: {{ $}} 82 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 83 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 84 ; GFX9-NEXT: BUFFER_STORE_SHORT_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (s16), addrspace 5) 85 ; 86 ; GFX11-LABEL: name: function_store_private_s32_to_2 87 ; GFX11: liveins: $vgpr0, $vgpr1 88 ; GFX11-NEXT: {{ $}} 89 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 90 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 91 ; GFX11-NEXT: SCRATCH_STORE_SHORT [[COPY]], [[COPY1]], 0, 0, implicit $exec, implicit $flat_scr :: (store (s16), addrspace 5) 92 ; 93 ; GFX12-LABEL: name: function_store_private_s32_to_2 94 ; GFX12: liveins: $vgpr0, $vgpr1 95 ; GFX12-NEXT: {{ $}} 96 ; GFX12-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 97 ; GFX12-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 98 ; GFX12-NEXT: SCRATCH_STORE_SHORT [[COPY]], [[COPY1]], 0, 0, implicit $exec, implicit $flat_scr :: (store (s16), addrspace 5) 99 %0:vgpr(s32) = COPY $vgpr0 100 %1:vgpr(p5) = COPY $vgpr1 101 G_STORE %0, %1 :: (store (s16), align 2, addrspace 5) 102 103... 104 105--- 106 107name: function_store_private_s32_to_1 108legalized: true 109regBankSelected: true 110tracksRegLiveness: true 111machineFunctionInfo: 112 isEntryFunction: false 113 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 114 stackPtrOffsetReg: $sgpr32 115 116body: | 117 bb.0: 118 liveins: $vgpr0, $vgpr1 119 120 ; GFX6-LABEL: name: function_store_private_s32_to_1 121 ; GFX6: liveins: $vgpr0, $vgpr1 122 ; GFX6-NEXT: {{ $}} 123 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 124 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 125 ; GFX6-NEXT: BUFFER_STORE_BYTE_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (s8), addrspace 5) 126 ; 127 ; GFX9-LABEL: name: function_store_private_s32_to_1 128 ; GFX9: liveins: $vgpr0, $vgpr1 129 ; GFX9-NEXT: {{ $}} 130 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 131 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 132 ; GFX9-NEXT: BUFFER_STORE_BYTE_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (s8), addrspace 5) 133 ; 134 ; GFX11-LABEL: name: function_store_private_s32_to_1 135 ; GFX11: liveins: $vgpr0, $vgpr1 136 ; GFX11-NEXT: {{ $}} 137 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 138 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 139 ; GFX11-NEXT: SCRATCH_STORE_BYTE [[COPY]], [[COPY1]], 0, 0, implicit $exec, implicit $flat_scr :: (store (s8), addrspace 5) 140 ; 141 ; GFX12-LABEL: name: function_store_private_s32_to_1 142 ; GFX12: liveins: $vgpr0, $vgpr1 143 ; GFX12-NEXT: {{ $}} 144 ; GFX12-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 145 ; GFX12-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 146 ; GFX12-NEXT: SCRATCH_STORE_BYTE [[COPY]], [[COPY1]], 0, 0, implicit $exec, implicit $flat_scr :: (store (s8), addrspace 5) 147 %0:vgpr(s32) = COPY $vgpr0 148 %1:vgpr(p5) = COPY $vgpr1 149 G_STORE %0, %1 :: (store (s8), align 1, addrspace 5) 150 151... 152 153--- 154 155name: function_store_private_v2s16 156legalized: true 157regBankSelected: true 158tracksRegLiveness: true 159machineFunctionInfo: 160 isEntryFunction: false 161 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 162 stackPtrOffsetReg: $sgpr32 163 164body: | 165 bb.0: 166 liveins: $vgpr0, $vgpr1 167 168 ; GFX6-LABEL: name: function_store_private_v2s16 169 ; GFX6: liveins: $vgpr0, $vgpr1 170 ; GFX6-NEXT: {{ $}} 171 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 172 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 173 ; GFX6-NEXT: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (<2 x s16>), addrspace 5) 174 ; 175 ; GFX9-LABEL: name: function_store_private_v2s16 176 ; GFX9: liveins: $vgpr0, $vgpr1 177 ; GFX9-NEXT: {{ $}} 178 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 179 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 180 ; GFX9-NEXT: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (<2 x s16>), addrspace 5) 181 ; 182 ; GFX11-LABEL: name: function_store_private_v2s16 183 ; GFX11: liveins: $vgpr0, $vgpr1 184 ; GFX11-NEXT: {{ $}} 185 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 186 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 187 ; GFX11-NEXT: SCRATCH_STORE_DWORD [[COPY]], [[COPY1]], 0, 0, implicit $exec, implicit $flat_scr :: (store (<2 x s16>), addrspace 5) 188 ; 189 ; GFX12-LABEL: name: function_store_private_v2s16 190 ; GFX12: liveins: $vgpr0, $vgpr1 191 ; GFX12-NEXT: {{ $}} 192 ; GFX12-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 193 ; GFX12-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 194 ; GFX12-NEXT: SCRATCH_STORE_DWORD [[COPY]], [[COPY1]], 0, 0, implicit $exec, implicit $flat_scr :: (store (<2 x s16>), addrspace 5) 195 %0:vgpr(<2 x s16>) = COPY $vgpr0 196 %1:vgpr(p5) = COPY $vgpr1 197 G_STORE %0, %1 :: (store (<2 x s16>), align 4, addrspace 5) 198 199... 200 201--- 202 203name: function_store_private_p3 204legalized: true 205regBankSelected: true 206tracksRegLiveness: true 207machineFunctionInfo: 208 isEntryFunction: false 209 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 210 stackPtrOffsetReg: $sgpr32 211 212body: | 213 bb.0: 214 liveins: $vgpr0, $vgpr1 215 216 ; GFX6-LABEL: name: function_store_private_p3 217 ; GFX6: liveins: $vgpr0, $vgpr1 218 ; GFX6-NEXT: {{ $}} 219 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 220 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 221 ; GFX6-NEXT: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (p3), addrspace 5) 222 ; 223 ; GFX9-LABEL: name: function_store_private_p3 224 ; GFX9: liveins: $vgpr0, $vgpr1 225 ; GFX9-NEXT: {{ $}} 226 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 227 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 228 ; GFX9-NEXT: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (p3), addrspace 5) 229 ; 230 ; GFX11-LABEL: name: function_store_private_p3 231 ; GFX11: liveins: $vgpr0, $vgpr1 232 ; GFX11-NEXT: {{ $}} 233 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 234 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 235 ; GFX11-NEXT: SCRATCH_STORE_DWORD [[COPY]], [[COPY1]], 0, 0, implicit $exec, implicit $flat_scr :: (store (p3), addrspace 5) 236 ; 237 ; GFX12-LABEL: name: function_store_private_p3 238 ; GFX12: liveins: $vgpr0, $vgpr1 239 ; GFX12-NEXT: {{ $}} 240 ; GFX12-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 241 ; GFX12-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 242 ; GFX12-NEXT: SCRATCH_STORE_DWORD [[COPY]], [[COPY1]], 0, 0, implicit $exec, implicit $flat_scr :: (store (p3), addrspace 5) 243 %0:vgpr(p3) = COPY $vgpr0 244 %1:vgpr(p5) = COPY $vgpr1 245 G_STORE %0, %1 :: (store (p3), align 4, addrspace 5) 246 247... 248 249--- 250 251name: function_store_private_p5 252legalized: true 253regBankSelected: true 254tracksRegLiveness: true 255machineFunctionInfo: 256 isEntryFunction: false 257 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 258 stackPtrOffsetReg: $sgpr32 259 260body: | 261 bb.0: 262 liveins: $vgpr0, $vgpr1 263 264 ; GFX6-LABEL: name: function_store_private_p5 265 ; GFX6: liveins: $vgpr0, $vgpr1 266 ; GFX6-NEXT: {{ $}} 267 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 268 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 269 ; GFX6-NEXT: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (p5), addrspace 5) 270 ; 271 ; GFX9-LABEL: name: function_store_private_p5 272 ; GFX9: liveins: $vgpr0, $vgpr1 273 ; GFX9-NEXT: {{ $}} 274 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 275 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 276 ; GFX9-NEXT: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (p5), addrspace 5) 277 ; 278 ; GFX11-LABEL: name: function_store_private_p5 279 ; GFX11: liveins: $vgpr0, $vgpr1 280 ; GFX11-NEXT: {{ $}} 281 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 282 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 283 ; GFX11-NEXT: SCRATCH_STORE_DWORD [[COPY]], [[COPY1]], 0, 0, implicit $exec, implicit $flat_scr :: (store (p5), addrspace 5) 284 ; 285 ; GFX12-LABEL: name: function_store_private_p5 286 ; GFX12: liveins: $vgpr0, $vgpr1 287 ; GFX12-NEXT: {{ $}} 288 ; GFX12-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 289 ; GFX12-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 290 ; GFX12-NEXT: SCRATCH_STORE_DWORD [[COPY]], [[COPY1]], 0, 0, implicit $exec, implicit $flat_scr :: (store (p5), addrspace 5) 291 %0:vgpr(p5) = COPY $vgpr0 292 %1:vgpr(p5) = COPY $vgpr1 293 G_STORE %0, %1 :: (store (p5), align 4, addrspace 5) 294 295... 296 297--- 298 299name: function_store_private_s32_to_1_fi_offset_4095 300legalized: true 301regBankSelected: true 302tracksRegLiveness: true 303machineFunctionInfo: 304 isEntryFunction: false 305 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 306 stackPtrOffsetReg: $sgpr32 307stack: 308 - { id: 0, size: 4096, alignment: 4 } 309 310body: | 311 bb.0: 312 313 ; GFX6-LABEL: name: function_store_private_s32_to_1_fi_offset_4095 314 ; GFX6: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 315 ; GFX6-NEXT: BUFFER_STORE_BYTE_OFFEN [[V_MOV_B32_e32_]], %stack.0, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 4095, 0, 0, implicit $exec :: (store (s8), addrspace 5) 316 ; 317 ; GFX9-LABEL: name: function_store_private_s32_to_1_fi_offset_4095 318 ; GFX9: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 319 ; GFX9-NEXT: BUFFER_STORE_BYTE_OFFEN [[V_MOV_B32_e32_]], %stack.0, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 4095, 0, 0, implicit $exec :: (store (s8), addrspace 5) 320 ; 321 ; GFX11-LABEL: name: function_store_private_s32_to_1_fi_offset_4095 322 ; GFX11: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 323 ; GFX11-NEXT: SCRATCH_STORE_BYTE_SADDR [[V_MOV_B32_e32_]], %stack.0, 4095, 0, implicit $exec, implicit $flat_scr :: (store (s8), addrspace 5) 324 ; 325 ; GFX12-LABEL: name: function_store_private_s32_to_1_fi_offset_4095 326 ; GFX12: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 327 ; GFX12-NEXT: SCRATCH_STORE_BYTE_SADDR [[V_MOV_B32_e32_]], %stack.0, 4095, 0, implicit $exec, implicit $flat_scr :: (store (s8), addrspace 5) 328 %0:vgpr(p5) = G_FRAME_INDEX %stack.0 329 %1:vgpr(s32) = G_CONSTANT i32 4095 330 %2:vgpr(p5) = G_PTR_ADD %0, %1 331 %3:vgpr(s32) = G_CONSTANT i32 0 332 G_STORE %3, %2 :: (store (s8), align 1, addrspace 5) 333 334... 335 336--- 337 338name: function_store_private_s32_to_1_constant_4095 339legalized: true 340regBankSelected: true 341tracksRegLiveness: true 342machineFunctionInfo: 343 isEntryFunction: false 344 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 345 stackPtrOffsetReg: $sgpr32 346stack: 347 - { id: 0, size: 4096, alignment: 4 } 348 349body: | 350 bb.0: 351 352 ; GFX6-LABEL: name: function_store_private_s32_to_1_constant_4095 353 ; GFX6: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 354 ; GFX6-NEXT: BUFFER_STORE_BYTE_OFFSET [[V_MOV_B32_e32_]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 4095, 0, 0, implicit $exec :: (store (s8), addrspace 5) 355 ; 356 ; GFX9-LABEL: name: function_store_private_s32_to_1_constant_4095 357 ; GFX9: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 358 ; GFX9-NEXT: BUFFER_STORE_BYTE_OFFSET [[V_MOV_B32_e32_]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 4095, 0, 0, implicit $exec :: (store (s8), addrspace 5) 359 ; 360 ; GFX11-LABEL: name: function_store_private_s32_to_1_constant_4095 361 ; GFX11: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4095, implicit $exec 362 ; GFX11-NEXT: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 363 ; GFX11-NEXT: SCRATCH_STORE_BYTE [[V_MOV_B32_e32_1]], [[V_MOV_B32_e32_]], 0, 0, implicit $exec, implicit $flat_scr :: (store (s8), addrspace 5) 364 ; 365 ; GFX12-LABEL: name: function_store_private_s32_to_1_constant_4095 366 ; GFX12: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4095, implicit $exec 367 ; GFX12-NEXT: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 368 ; GFX12-NEXT: SCRATCH_STORE_BYTE [[V_MOV_B32_e32_1]], [[V_MOV_B32_e32_]], 0, 0, implicit $exec, implicit $flat_scr :: (store (s8), addrspace 5) 369 %0:vgpr(p5) = G_CONSTANT i32 4095 370 %1:vgpr(s32) = G_CONSTANT i32 0 371 G_STORE %1, %0 :: (store (s8), align 1, addrspace 5) 372 373... 374 375--- 376 377name: function_store_private_s32_to_1_constant_4096 378legalized: true 379regBankSelected: true 380tracksRegLiveness: true 381machineFunctionInfo: 382 isEntryFunction: false 383 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 384 stackPtrOffsetReg: $sgpr32 385stack: 386 - { id: 0, size: 4096, alignment: 4 } 387 388body: | 389 bb.0: 390 391 ; GFX6-LABEL: name: function_store_private_s32_to_1_constant_4096 392 ; GFX6: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 393 ; GFX6-NEXT: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4096, implicit $exec 394 ; GFX6-NEXT: BUFFER_STORE_BYTE_OFFEN [[V_MOV_B32_e32_]], [[V_MOV_B32_e32_1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (s8), addrspace 5) 395 ; 396 ; GFX9-LABEL: name: function_store_private_s32_to_1_constant_4096 397 ; GFX9: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 398 ; GFX9-NEXT: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4096, implicit $exec 399 ; GFX9-NEXT: BUFFER_STORE_BYTE_OFFEN [[V_MOV_B32_e32_]], [[V_MOV_B32_e32_1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (s8), addrspace 5) 400 ; 401 ; GFX11-LABEL: name: function_store_private_s32_to_1_constant_4096 402 ; GFX11: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4096, implicit $exec 403 ; GFX11-NEXT: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 404 ; GFX11-NEXT: SCRATCH_STORE_BYTE [[V_MOV_B32_e32_1]], [[V_MOV_B32_e32_]], 0, 0, implicit $exec, implicit $flat_scr :: (store (s8), addrspace 5) 405 ; 406 ; GFX12-LABEL: name: function_store_private_s32_to_1_constant_4096 407 ; GFX12: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4096, implicit $exec 408 ; GFX12-NEXT: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 409 ; GFX12-NEXT: SCRATCH_STORE_BYTE [[V_MOV_B32_e32_1]], [[V_MOV_B32_e32_]], 0, 0, implicit $exec, implicit $flat_scr :: (store (s8), addrspace 5) 410 %0:vgpr(p5) = G_CONSTANT i32 4096 411 %1:vgpr(s32) = G_CONSTANT i32 0 412 G_STORE %1, %0 :: (store (s8), align 1, addrspace 5) 413 414... 415 416--- 417 418name: kernel_store_private_s32_to_4 419legalized: true 420regBankSelected: true 421tracksRegLiveness: true 422machineFunctionInfo: 423 isEntryFunction: true 424 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 425 426body: | 427 bb.0: 428 liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 429 430 ; GFX6-LABEL: name: kernel_store_private_s32_to_4 431 ; GFX6: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 432 ; GFX6-NEXT: {{ $}} 433 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 434 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 435 ; GFX6-NEXT: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (s32), addrspace 5) 436 ; 437 ; GFX9-LABEL: name: kernel_store_private_s32_to_4 438 ; GFX9: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 439 ; GFX9-NEXT: {{ $}} 440 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 441 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 442 ; GFX9-NEXT: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (s32), addrspace 5) 443 ; 444 ; GFX11-LABEL: name: kernel_store_private_s32_to_4 445 ; GFX11: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 446 ; GFX11-NEXT: {{ $}} 447 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 448 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 449 ; GFX11-NEXT: SCRATCH_STORE_DWORD [[COPY]], [[COPY1]], 0, 0, implicit $exec, implicit $flat_scr :: (store (s32), addrspace 5) 450 ; 451 ; GFX12-LABEL: name: kernel_store_private_s32_to_4 452 ; GFX12: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 453 ; GFX12-NEXT: {{ $}} 454 ; GFX12-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 455 ; GFX12-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 456 ; GFX12-NEXT: SCRATCH_STORE_DWORD [[COPY]], [[COPY1]], 0, 0, implicit $exec, implicit $flat_scr :: (store (s32), addrspace 5) 457 %0:vgpr(s32) = COPY $vgpr0 458 %1:vgpr(p5) = COPY $vgpr1 459 G_STORE %0, %1 :: (store (s32), align 4, addrspace 5) 460 461... 462 463--- 464 465name: kernel_store_private_s32_to_2 466legalized: true 467regBankSelected: true 468tracksRegLiveness: true 469machineFunctionInfo: 470 isEntryFunction: true 471 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 472 473body: | 474 bb.0: 475 liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 476 477 ; GFX6-LABEL: name: kernel_store_private_s32_to_2 478 ; GFX6: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 479 ; GFX6-NEXT: {{ $}} 480 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 481 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 482 ; GFX6-NEXT: BUFFER_STORE_SHORT_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (s16), addrspace 5) 483 ; 484 ; GFX9-LABEL: name: kernel_store_private_s32_to_2 485 ; GFX9: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 486 ; GFX9-NEXT: {{ $}} 487 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 488 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 489 ; GFX9-NEXT: BUFFER_STORE_SHORT_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (s16), addrspace 5) 490 ; 491 ; GFX11-LABEL: name: kernel_store_private_s32_to_2 492 ; GFX11: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 493 ; GFX11-NEXT: {{ $}} 494 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 495 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 496 ; GFX11-NEXT: SCRATCH_STORE_SHORT [[COPY]], [[COPY1]], 0, 0, implicit $exec, implicit $flat_scr :: (store (s16), addrspace 5) 497 ; 498 ; GFX12-LABEL: name: kernel_store_private_s32_to_2 499 ; GFX12: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 500 ; GFX12-NEXT: {{ $}} 501 ; GFX12-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 502 ; GFX12-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 503 ; GFX12-NEXT: SCRATCH_STORE_SHORT [[COPY]], [[COPY1]], 0, 0, implicit $exec, implicit $flat_scr :: (store (s16), addrspace 5) 504 %0:vgpr(s32) = COPY $vgpr0 505 %1:vgpr(p5) = COPY $vgpr1 506 G_STORE %0, %1 :: (store (s16), align 2, addrspace 5) 507 508... 509 510--- 511 512name: kernel_store_private_s32_to_1 513legalized: true 514regBankSelected: true 515tracksRegLiveness: true 516machineFunctionInfo: 517 isEntryFunction: true 518 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 519 520body: | 521 bb.0: 522 liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 523 524 ; GFX6-LABEL: name: kernel_store_private_s32_to_1 525 ; GFX6: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 526 ; GFX6-NEXT: {{ $}} 527 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 528 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 529 ; GFX6-NEXT: BUFFER_STORE_BYTE_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (s8), addrspace 5) 530 ; 531 ; GFX9-LABEL: name: kernel_store_private_s32_to_1 532 ; GFX9: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 533 ; GFX9-NEXT: {{ $}} 534 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 535 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 536 ; GFX9-NEXT: BUFFER_STORE_BYTE_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (s8), addrspace 5) 537 ; 538 ; GFX11-LABEL: name: kernel_store_private_s32_to_1 539 ; GFX11: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 540 ; GFX11-NEXT: {{ $}} 541 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 542 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 543 ; GFX11-NEXT: SCRATCH_STORE_BYTE [[COPY]], [[COPY1]], 0, 0, implicit $exec, implicit $flat_scr :: (store (s8), addrspace 5) 544 ; 545 ; GFX12-LABEL: name: kernel_store_private_s32_to_1 546 ; GFX12: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 547 ; GFX12-NEXT: {{ $}} 548 ; GFX12-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 549 ; GFX12-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 550 ; GFX12-NEXT: SCRATCH_STORE_BYTE [[COPY]], [[COPY1]], 0, 0, implicit $exec, implicit $flat_scr :: (store (s8), addrspace 5) 551 %0:vgpr(s32) = COPY $vgpr0 552 %1:vgpr(p5) = COPY $vgpr1 553 G_STORE %0, %1 :: (store (s8), align 1, addrspace 5) 554 555... 556 557--- 558 559name: kernel_store_private_v2s16 560legalized: true 561regBankSelected: true 562tracksRegLiveness: true 563machineFunctionInfo: 564 isEntryFunction: true 565 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 566 567body: | 568 bb.0: 569 liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 570 571 572 ; GFX6-LABEL: name: kernel_store_private_v2s16 573 ; GFX6: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 574 ; GFX6-NEXT: {{ $}} 575 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 576 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 577 ; GFX6-NEXT: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (<2 x s16>), addrspace 5) 578 ; 579 ; GFX9-LABEL: name: kernel_store_private_v2s16 580 ; GFX9: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 581 ; GFX9-NEXT: {{ $}} 582 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 583 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 584 ; GFX9-NEXT: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (<2 x s16>), addrspace 5) 585 ; 586 ; GFX11-LABEL: name: kernel_store_private_v2s16 587 ; GFX11: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 588 ; GFX11-NEXT: {{ $}} 589 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 590 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 591 ; GFX11-NEXT: SCRATCH_STORE_DWORD [[COPY]], [[COPY1]], 0, 0, implicit $exec, implicit $flat_scr :: (store (<2 x s16>), addrspace 5) 592 ; 593 ; GFX12-LABEL: name: kernel_store_private_v2s16 594 ; GFX12: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 595 ; GFX12-NEXT: {{ $}} 596 ; GFX12-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 597 ; GFX12-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 598 ; GFX12-NEXT: SCRATCH_STORE_DWORD [[COPY]], [[COPY1]], 0, 0, implicit $exec, implicit $flat_scr :: (store (<2 x s16>), addrspace 5) 599 %0:vgpr(<2 x s16>) = COPY $vgpr0 600 %1:vgpr(p5) = COPY $vgpr1 601 G_STORE %0, %1 :: (store (<2 x s16>), align 4, addrspace 5) 602 603... 604 605--- 606 607name: kernel_store_private_p3 608legalized: true 609regBankSelected: true 610tracksRegLiveness: true 611machineFunctionInfo: 612 isEntryFunction: true 613 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 614 615body: | 616 bb.0: 617 liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 618 619 ; GFX6-LABEL: name: kernel_store_private_p3 620 ; GFX6: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 621 ; GFX6-NEXT: {{ $}} 622 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 623 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 624 ; GFX6-NEXT: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (p3), addrspace 5) 625 ; 626 ; GFX9-LABEL: name: kernel_store_private_p3 627 ; GFX9: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 628 ; GFX9-NEXT: {{ $}} 629 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 630 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 631 ; GFX9-NEXT: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (p3), addrspace 5) 632 ; 633 ; GFX11-LABEL: name: kernel_store_private_p3 634 ; GFX11: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 635 ; GFX11-NEXT: {{ $}} 636 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 637 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 638 ; GFX11-NEXT: SCRATCH_STORE_DWORD [[COPY]], [[COPY1]], 0, 0, implicit $exec, implicit $flat_scr :: (store (p3), addrspace 5) 639 ; 640 ; GFX12-LABEL: name: kernel_store_private_p3 641 ; GFX12: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 642 ; GFX12-NEXT: {{ $}} 643 ; GFX12-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 644 ; GFX12-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 645 ; GFX12-NEXT: SCRATCH_STORE_DWORD [[COPY]], [[COPY1]], 0, 0, implicit $exec, implicit $flat_scr :: (store (p3), addrspace 5) 646 %0:vgpr(p3) = COPY $vgpr0 647 %1:vgpr(p5) = COPY $vgpr1 648 G_STORE %0, %1 :: (store (p3), align 4, addrspace 5) 649 650... 651 652--- 653 654name: kernel_store_private_p5 655legalized: true 656regBankSelected: true 657tracksRegLiveness: true 658machineFunctionInfo: 659 isEntryFunction: true 660 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 661 662body: | 663 bb.0: 664 liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 665 666 ; GFX6-LABEL: name: kernel_store_private_p5 667 ; GFX6: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 668 ; GFX6-NEXT: {{ $}} 669 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 670 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 671 ; GFX6-NEXT: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (p5), addrspace 5) 672 ; 673 ; GFX9-LABEL: name: kernel_store_private_p5 674 ; GFX9: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 675 ; GFX9-NEXT: {{ $}} 676 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 677 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 678 ; GFX9-NEXT: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[COPY1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (p5), addrspace 5) 679 ; 680 ; GFX11-LABEL: name: kernel_store_private_p5 681 ; GFX11: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 682 ; GFX11-NEXT: {{ $}} 683 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 684 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 685 ; GFX11-NEXT: SCRATCH_STORE_DWORD [[COPY]], [[COPY1]], 0, 0, implicit $exec, implicit $flat_scr :: (store (p5), addrspace 5) 686 ; 687 ; GFX12-LABEL: name: kernel_store_private_p5 688 ; GFX12: liveins: $vgpr0, $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3 689 ; GFX12-NEXT: {{ $}} 690 ; GFX12-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 691 ; GFX12-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 692 ; GFX12-NEXT: SCRATCH_STORE_DWORD [[COPY]], [[COPY1]], 0, 0, implicit $exec, implicit $flat_scr :: (store (p5), addrspace 5) 693 %0:vgpr(p5) = COPY $vgpr0 694 %1:vgpr(p5) = COPY $vgpr1 695 G_STORE %0, %1 :: (store (p5), align 4, addrspace 5) 696 697... 698 699--- 700 701name: kernel_store_private_s32_to_1_fi_offset_4095 702legalized: true 703regBankSelected: true 704tracksRegLiveness: true 705machineFunctionInfo: 706 isEntryFunction: true 707 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 708stack: 709 - { id: 0, size: 4096, alignment: 4 } 710 711body: | 712 bb.0: 713 liveins: $sgpr0_sgpr1_sgpr2_sgpr3 714 715 ; GFX6-LABEL: name: kernel_store_private_s32_to_1_fi_offset_4095 716 ; GFX6: liveins: $sgpr0_sgpr1_sgpr2_sgpr3 717 ; GFX6-NEXT: {{ $}} 718 ; GFX6-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 719 ; GFX6-NEXT: BUFFER_STORE_BYTE_OFFEN [[V_MOV_B32_e32_]], %stack.0, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 4095, 0, 0, implicit $exec :: (store (s8), addrspace 5) 720 ; 721 ; GFX9-LABEL: name: kernel_store_private_s32_to_1_fi_offset_4095 722 ; GFX9: liveins: $sgpr0_sgpr1_sgpr2_sgpr3 723 ; GFX9-NEXT: {{ $}} 724 ; GFX9-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 725 ; GFX9-NEXT: BUFFER_STORE_BYTE_OFFEN [[V_MOV_B32_e32_]], %stack.0, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 4095, 0, 0, implicit $exec :: (store (s8), addrspace 5) 726 ; 727 ; GFX11-LABEL: name: kernel_store_private_s32_to_1_fi_offset_4095 728 ; GFX11: liveins: $sgpr0_sgpr1_sgpr2_sgpr3 729 ; GFX11-NEXT: {{ $}} 730 ; GFX11-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 731 ; GFX11-NEXT: SCRATCH_STORE_BYTE_SADDR [[V_MOV_B32_e32_]], %stack.0, 4095, 0, implicit $exec, implicit $flat_scr :: (store (s8), addrspace 5) 732 ; 733 ; GFX12-LABEL: name: kernel_store_private_s32_to_1_fi_offset_4095 734 ; GFX12: liveins: $sgpr0_sgpr1_sgpr2_sgpr3 735 ; GFX12-NEXT: {{ $}} 736 ; GFX12-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 737 ; GFX12-NEXT: SCRATCH_STORE_BYTE_SADDR [[V_MOV_B32_e32_]], %stack.0, 4095, 0, implicit $exec, implicit $flat_scr :: (store (s8), addrspace 5) 738 %0:vgpr(p5) = G_FRAME_INDEX %stack.0 739 %1:vgpr(s32) = G_CONSTANT i32 4095 740 %2:vgpr(p5) = G_PTR_ADD %0, %1 741 %3:vgpr(s32) = G_CONSTANT i32 0 742 G_STORE %3, %2 :: (store (s8), align 1, addrspace 5) 743 744... 745 746--- 747 748name: kernel_store_private_s32_to_1_constant_4095 749legalized: true 750regBankSelected: true 751tracksRegLiveness: true 752machineFunctionInfo: 753 isEntryFunction: true 754 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 755stack: 756 - { id: 0, size: 4096, alignment: 4 } 757 758body: | 759 bb.0: 760 liveins: $sgpr0_sgpr1_sgpr2_sgpr3 761 762 ; GFX6-LABEL: name: kernel_store_private_s32_to_1_constant_4095 763 ; GFX6: liveins: $sgpr0_sgpr1_sgpr2_sgpr3 764 ; GFX6-NEXT: {{ $}} 765 ; GFX6-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 766 ; GFX6-NEXT: BUFFER_STORE_BYTE_OFFSET [[V_MOV_B32_e32_]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 4095, 0, 0, implicit $exec :: (store (s8), addrspace 5) 767 ; 768 ; GFX9-LABEL: name: kernel_store_private_s32_to_1_constant_4095 769 ; GFX9: liveins: $sgpr0_sgpr1_sgpr2_sgpr3 770 ; GFX9-NEXT: {{ $}} 771 ; GFX9-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 772 ; GFX9-NEXT: BUFFER_STORE_BYTE_OFFSET [[V_MOV_B32_e32_]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 4095, 0, 0, implicit $exec :: (store (s8), addrspace 5) 773 ; 774 ; GFX11-LABEL: name: kernel_store_private_s32_to_1_constant_4095 775 ; GFX11: liveins: $sgpr0_sgpr1_sgpr2_sgpr3 776 ; GFX11-NEXT: {{ $}} 777 ; GFX11-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4095, implicit $exec 778 ; GFX11-NEXT: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 779 ; GFX11-NEXT: SCRATCH_STORE_BYTE [[V_MOV_B32_e32_1]], [[V_MOV_B32_e32_]], 0, 0, implicit $exec, implicit $flat_scr :: (store (s8), addrspace 5) 780 ; 781 ; GFX12-LABEL: name: kernel_store_private_s32_to_1_constant_4095 782 ; GFX12: liveins: $sgpr0_sgpr1_sgpr2_sgpr3 783 ; GFX12-NEXT: {{ $}} 784 ; GFX12-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4095, implicit $exec 785 ; GFX12-NEXT: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 786 ; GFX12-NEXT: SCRATCH_STORE_BYTE [[V_MOV_B32_e32_1]], [[V_MOV_B32_e32_]], 0, 0, implicit $exec, implicit $flat_scr :: (store (s8), addrspace 5) 787 %0:vgpr(p5) = G_CONSTANT i32 4095 788 %1:vgpr(s32) = G_CONSTANT i32 0 789 G_STORE %1, %0 :: (store (s8), align 1, addrspace 5) 790 791... 792 793--- 794 795name: kernel_store_private_s32_to_1_constant_4096 796legalized: true 797regBankSelected: true 798tracksRegLiveness: true 799machineFunctionInfo: 800 isEntryFunction: true 801 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 802stack: 803 - { id: 0, size: 4096, alignment: 4 } 804 805body: | 806 bb.0: 807 liveins: $sgpr0_sgpr1_sgpr2_sgpr3 808 809 ; GFX6-LABEL: name: kernel_store_private_s32_to_1_constant_4096 810 ; GFX6: liveins: $sgpr0_sgpr1_sgpr2_sgpr3 811 ; GFX6-NEXT: {{ $}} 812 ; GFX6-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 813 ; GFX6-NEXT: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4096, implicit $exec 814 ; GFX6-NEXT: BUFFER_STORE_BYTE_OFFEN [[V_MOV_B32_e32_]], [[V_MOV_B32_e32_1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (s8), addrspace 5) 815 ; 816 ; GFX9-LABEL: name: kernel_store_private_s32_to_1_constant_4096 817 ; GFX9: liveins: $sgpr0_sgpr1_sgpr2_sgpr3 818 ; GFX9-NEXT: {{ $}} 819 ; GFX9-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 820 ; GFX9-NEXT: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4096, implicit $exec 821 ; GFX9-NEXT: BUFFER_STORE_BYTE_OFFEN [[V_MOV_B32_e32_]], [[V_MOV_B32_e32_1]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (s8), addrspace 5) 822 ; 823 ; GFX11-LABEL: name: kernel_store_private_s32_to_1_constant_4096 824 ; GFX11: liveins: $sgpr0_sgpr1_sgpr2_sgpr3 825 ; GFX11-NEXT: {{ $}} 826 ; GFX11-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4096, implicit $exec 827 ; GFX11-NEXT: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 828 ; GFX11-NEXT: SCRATCH_STORE_BYTE [[V_MOV_B32_e32_1]], [[V_MOV_B32_e32_]], 0, 0, implicit $exec, implicit $flat_scr :: (store (s8), addrspace 5) 829 ; 830 ; GFX12-LABEL: name: kernel_store_private_s32_to_1_constant_4096 831 ; GFX12: liveins: $sgpr0_sgpr1_sgpr2_sgpr3 832 ; GFX12-NEXT: {{ $}} 833 ; GFX12-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4096, implicit $exec 834 ; GFX12-NEXT: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 835 ; GFX12-NEXT: SCRATCH_STORE_BYTE [[V_MOV_B32_e32_1]], [[V_MOV_B32_e32_]], 0, 0, implicit $exec, implicit $flat_scr :: (store (s8), addrspace 5) 836 %0:vgpr(p5) = G_CONSTANT i32 4096 837 %1:vgpr(s32) = G_CONSTANT i32 0 838 G_STORE %1, %0 :: (store (s8), align 1, addrspace 5) 839 840... 841 842--- 843name: function_store_private_s32_to_4_wave_address 844legalized: true 845regBankSelected: true 846tracksRegLiveness: true 847machineFunctionInfo: 848 isEntryFunction: false 849 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 850 stackPtrOffsetReg: $sgpr32 851 852body: | 853 bb.0: 854 liveins: $vgpr0, $vgpr1 855 856 ; GFX6-LABEL: name: function_store_private_s32_to_4_wave_address 857 ; GFX6: liveins: $vgpr0, $vgpr1 858 ; GFX6-NEXT: {{ $}} 859 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 860 ; GFX6-NEXT: BUFFER_STORE_DWORD_OFFSET [[COPY]], $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 0, 0, 0, implicit $exec :: (store (s32), addrspace 5) 861 ; 862 ; GFX9-LABEL: name: function_store_private_s32_to_4_wave_address 863 ; GFX9: liveins: $vgpr0, $vgpr1 864 ; GFX9-NEXT: {{ $}} 865 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 866 ; GFX9-NEXT: BUFFER_STORE_DWORD_OFFSET [[COPY]], $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 0, 0, 0, implicit $exec :: (store (s32), addrspace 5) 867 ; 868 ; GFX11-LABEL: name: function_store_private_s32_to_4_wave_address 869 ; GFX11: liveins: $vgpr0, $vgpr1 870 ; GFX11-NEXT: {{ $}} 871 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 872 ; GFX11-NEXT: [[V_LSHRREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHRREV_B32_e64 5, $sgpr32, implicit $exec 873 ; GFX11-NEXT: SCRATCH_STORE_DWORD [[COPY]], [[V_LSHRREV_B32_e64_]], 0, 0, implicit $exec, implicit $flat_scr :: (store (s32), addrspace 5) 874 ; 875 ; GFX12-LABEL: name: function_store_private_s32_to_4_wave_address 876 ; GFX12: liveins: $vgpr0, $vgpr1 877 ; GFX12-NEXT: {{ $}} 878 ; GFX12-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 879 ; GFX12-NEXT: [[V_LSHRREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHRREV_B32_e64 5, $sgpr32, implicit $exec 880 ; GFX12-NEXT: SCRATCH_STORE_DWORD [[COPY]], [[V_LSHRREV_B32_e64_]], 0, 0, implicit $exec, implicit $flat_scr :: (store (s32), addrspace 5) 881 %0:vgpr(s32) = COPY $vgpr0 882 %1:vgpr(p5) = G_AMDGPU_WAVE_ADDRESS $sgpr32 883 G_STORE %0, %1 :: (store (s32), align 4, addrspace 5) 884 885... 886 887# Has regbank copy of constant 888--- 889name: function_store_private_s32_to_4_wave_address_offset_copy_constant_4095 890legalized: true 891regBankSelected: true 892tracksRegLiveness: true 893machineFunctionInfo: 894 isEntryFunction: false 895 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 896 stackPtrOffsetReg: $sgpr32 897 898body: | 899 bb.0: 900 liveins: $vgpr0, $vgpr1 901 902 ; GFX6-LABEL: name: function_store_private_s32_to_4_wave_address_offset_copy_constant_4095 903 ; GFX6: liveins: $vgpr0, $vgpr1 904 ; GFX6-NEXT: {{ $}} 905 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 906 ; GFX6-NEXT: BUFFER_STORE_DWORD_OFFSET [[COPY]], $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 4095, 0, 0, implicit $exec :: (store (s32), addrspace 5) 907 ; 908 ; GFX9-LABEL: name: function_store_private_s32_to_4_wave_address_offset_copy_constant_4095 909 ; GFX9: liveins: $vgpr0, $vgpr1 910 ; GFX9-NEXT: {{ $}} 911 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 912 ; GFX9-NEXT: BUFFER_STORE_DWORD_OFFSET [[COPY]], $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 4095, 0, 0, implicit $exec :: (store (s32), addrspace 5) 913 ; 914 ; GFX11-LABEL: name: function_store_private_s32_to_4_wave_address_offset_copy_constant_4095 915 ; GFX11: liveins: $vgpr0, $vgpr1 916 ; GFX11-NEXT: {{ $}} 917 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 918 ; GFX11-NEXT: [[V_LSHRREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHRREV_B32_e64 5, $sgpr32, implicit $exec 919 ; GFX11-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 4095 920 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[S_MOV_B32_]] 921 ; GFX11-NEXT: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 [[V_LSHRREV_B32_e64_]], [[COPY1]], 0, implicit $exec 922 ; GFX11-NEXT: SCRATCH_STORE_DWORD [[COPY]], [[V_ADD_U32_e64_]], 0, 0, implicit $exec, implicit $flat_scr :: (store (s32), addrspace 5) 923 ; 924 ; GFX12-LABEL: name: function_store_private_s32_to_4_wave_address_offset_copy_constant_4095 925 ; GFX12: liveins: $vgpr0, $vgpr1 926 ; GFX12-NEXT: {{ $}} 927 ; GFX12-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 928 ; GFX12-NEXT: [[V_LSHRREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHRREV_B32_e64 5, $sgpr32, implicit $exec 929 ; GFX12-NEXT: SCRATCH_STORE_DWORD [[COPY]], [[V_LSHRREV_B32_e64_]], 4095, 0, implicit $exec, implicit $flat_scr :: (store (s32), addrspace 5) 930 %0:vgpr(s32) = COPY $vgpr0 931 %1:vgpr(p5) = G_AMDGPU_WAVE_ADDRESS $sgpr32 932 %2:sgpr(s32) = G_CONSTANT i32 4095 933 %3:vgpr(s32) = COPY %2 934 %4:vgpr(p5) = G_PTR_ADD %1, %3 935 G_STORE %0, %4 :: (store (s32), align 4, addrspace 5) 936 937... 938 939--- 940name: function_store_private_s32_to_4_wave_address_offset_4095 941legalized: true 942regBankSelected: true 943tracksRegLiveness: true 944machineFunctionInfo: 945 isEntryFunction: false 946 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 947 stackPtrOffsetReg: $sgpr32 948 949body: | 950 bb.0: 951 liveins: $vgpr0, $vgpr1 952 953 ; GFX6-LABEL: name: function_store_private_s32_to_4_wave_address_offset_4095 954 ; GFX6: liveins: $vgpr0, $vgpr1 955 ; GFX6-NEXT: {{ $}} 956 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 957 ; GFX6-NEXT: BUFFER_STORE_DWORD_OFFSET [[COPY]], $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 4095, 0, 0, implicit $exec :: (store (s32), addrspace 5) 958 ; 959 ; GFX9-LABEL: name: function_store_private_s32_to_4_wave_address_offset_4095 960 ; GFX9: liveins: $vgpr0, $vgpr1 961 ; GFX9-NEXT: {{ $}} 962 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 963 ; GFX9-NEXT: BUFFER_STORE_DWORD_OFFSET [[COPY]], $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 4095, 0, 0, implicit $exec :: (store (s32), addrspace 5) 964 ; 965 ; GFX11-LABEL: name: function_store_private_s32_to_4_wave_address_offset_4095 966 ; GFX11: liveins: $vgpr0, $vgpr1 967 ; GFX11-NEXT: {{ $}} 968 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 969 ; GFX11-NEXT: [[V_LSHRREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHRREV_B32_e64 5, $sgpr32, implicit $exec 970 ; GFX11-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4095, implicit $exec 971 ; GFX11-NEXT: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 [[V_LSHRREV_B32_e64_]], [[V_MOV_B32_e32_]], 0, implicit $exec 972 ; GFX11-NEXT: SCRATCH_STORE_DWORD [[COPY]], [[V_ADD_U32_e64_]], 0, 0, implicit $exec, implicit $flat_scr :: (store (s32), addrspace 5) 973 ; 974 ; GFX12-LABEL: name: function_store_private_s32_to_4_wave_address_offset_4095 975 ; GFX12: liveins: $vgpr0, $vgpr1 976 ; GFX12-NEXT: {{ $}} 977 ; GFX12-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 978 ; GFX12-NEXT: [[V_LSHRREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHRREV_B32_e64 5, $sgpr32, implicit $exec 979 ; GFX12-NEXT: SCRATCH_STORE_DWORD [[COPY]], [[V_LSHRREV_B32_e64_]], 4095, 0, implicit $exec, implicit $flat_scr :: (store (s32), addrspace 5) 980 %0:vgpr(s32) = COPY $vgpr0 981 %1:vgpr(p5) = G_AMDGPU_WAVE_ADDRESS $sgpr32 982 %2:vgpr(s32) = G_CONSTANT i32 4095 983 %3:vgpr(p5) = G_PTR_ADD %1, %2 984 G_STORE %0, %3 :: (store (s32), align 4, addrspace 5) 985 986... 987 988--- 989name: function_store_private_s32_to_4_wave_address_offset_copy_constant_4096 990legalized: true 991regBankSelected: true 992tracksRegLiveness: true 993machineFunctionInfo: 994 isEntryFunction: false 995 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 996 stackPtrOffsetReg: $sgpr32 997 998body: | 999 bb.0: 1000 liveins: $vgpr0, $vgpr1 1001 1002 ; GFX6-LABEL: name: function_store_private_s32_to_4_wave_address_offset_copy_constant_4096 1003 ; GFX6: liveins: $vgpr0, $vgpr1 1004 ; GFX6-NEXT: {{ $}} 1005 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 1006 ; GFX6-NEXT: [[V_LSHRREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHRREV_B32_e64 6, $sgpr32, implicit $exec 1007 ; GFX6-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 4096 1008 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[S_MOV_B32_]] 1009 ; GFX6-NEXT: [[V_ADD_CO_U32_e64_:%[0-9]+]]:vgpr_32, dead [[V_ADD_CO_U32_e64_1:%[0-9]+]]:sreg_64_xexec = V_ADD_CO_U32_e64 [[V_LSHRREV_B32_e64_]], [[COPY1]], 0, implicit $exec 1010 ; GFX6-NEXT: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[V_ADD_CO_U32_e64_]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (s32), addrspace 5) 1011 ; 1012 ; GFX9-LABEL: name: function_store_private_s32_to_4_wave_address_offset_copy_constant_4096 1013 ; GFX9: liveins: $vgpr0, $vgpr1 1014 ; GFX9-NEXT: {{ $}} 1015 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 1016 ; GFX9-NEXT: [[V_LSHRREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHRREV_B32_e64 6, $sgpr32, implicit $exec 1017 ; GFX9-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 4096 1018 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[S_MOV_B32_]] 1019 ; GFX9-NEXT: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 [[V_LSHRREV_B32_e64_]], [[COPY1]], 0, implicit $exec 1020 ; GFX9-NEXT: BUFFER_STORE_DWORD_OFFEN [[COPY]], [[V_ADD_U32_e64_]], $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, implicit $exec :: (store (s32), addrspace 5) 1021 ; 1022 ; GFX11-LABEL: name: function_store_private_s32_to_4_wave_address_offset_copy_constant_4096 1023 ; GFX11: liveins: $vgpr0, $vgpr1 1024 ; GFX11-NEXT: {{ $}} 1025 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 1026 ; GFX11-NEXT: [[V_LSHRREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHRREV_B32_e64 5, $sgpr32, implicit $exec 1027 ; GFX11-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 4096 1028 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[S_MOV_B32_]] 1029 ; GFX11-NEXT: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 [[V_LSHRREV_B32_e64_]], [[COPY1]], 0, implicit $exec 1030 ; GFX11-NEXT: SCRATCH_STORE_DWORD [[COPY]], [[V_ADD_U32_e64_]], 0, 0, implicit $exec, implicit $flat_scr :: (store (s32), addrspace 5) 1031 ; 1032 ; GFX12-LABEL: name: function_store_private_s32_to_4_wave_address_offset_copy_constant_4096 1033 ; GFX12: liveins: $vgpr0, $vgpr1 1034 ; GFX12-NEXT: {{ $}} 1035 ; GFX12-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 1036 ; GFX12-NEXT: [[V_LSHRREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHRREV_B32_e64 5, $sgpr32, implicit $exec 1037 ; GFX12-NEXT: SCRATCH_STORE_DWORD [[COPY]], [[V_LSHRREV_B32_e64_]], 4096, 0, implicit $exec, implicit $flat_scr :: (store (s32), addrspace 5) 1038 %0:vgpr(s32) = COPY $vgpr0 1039 %1:vgpr(p5) = G_AMDGPU_WAVE_ADDRESS $sgpr32 1040 %2:sgpr(s32) = G_CONSTANT i32 4096 1041 %3:vgpr(s32) = COPY %2 1042 %4:vgpr(p5) = G_PTR_ADD %1, %3 1043 G_STORE %0, %4 :: (store (s32), align 4, addrspace 5) 1044 1045... 1046