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=hawaii -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX7 %s 4# RUN: llc -march=amdgcn -mcpu=fiji -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX7 %s 5# RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX9 %s 6# RUN: llc -march=amdgcn -mcpu=gfx1010 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX9 %s 7 8--- 9 10name: store_local_s32_to_4 11legalized: true 12regBankSelected: true 13tracksRegLiveness: true 14machineFunctionInfo: 15 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 16 stackPtrOffsetReg: $sgpr32 17 18body: | 19 bb.0: 20 liveins: $vgpr0, $vgpr1 21 22 ; GFX7-LABEL: name: store_local_s32_to_4 23 ; GFX7: liveins: $vgpr0, $vgpr1 24 ; GFX7: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 25 ; GFX7: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 26 ; GFX7: $m0 = S_MOV_B32 -1 27 ; GFX7: DS_WRITE_B32 [[COPY1]], [[COPY]], 0, 0, implicit $m0, implicit $exec :: (store 4, addrspace 3) 28 ; GFX9-LABEL: name: store_local_s32_to_4 29 ; GFX9: liveins: $vgpr0, $vgpr1 30 ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 31 ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 32 ; GFX9: DS_WRITE_B32_gfx9 [[COPY1]], [[COPY]], 0, 0, implicit $exec :: (store 4, addrspace 3) 33 ; GFX6-LABEL: name: store_local_s32_to_4 34 ; GFX6: liveins: $vgpr0, $vgpr1 35 ; GFX6: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 36 ; GFX6: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 37 ; GFX6: $m0 = S_MOV_B32 -1 38 ; GFX6: DS_WRITE_B32 [[COPY1]], [[COPY]], 0, 0, implicit $m0, implicit $exec :: (store 4, addrspace 3) 39 %0:vgpr(s32) = COPY $vgpr0 40 %1:vgpr(p3) = COPY $vgpr1 41 G_STORE %0, %1 :: (store 4, align 4, addrspace 3) 42 43... 44 45--- 46 47name: store_local_s32_to_2 48legalized: true 49regBankSelected: true 50tracksRegLiveness: true 51machineFunctionInfo: 52 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 53 stackPtrOffsetReg: $sgpr32 54 55body: | 56 bb.0: 57 liveins: $vgpr0, $vgpr1 58 59 ; GFX7-LABEL: name: store_local_s32_to_2 60 ; GFX7: liveins: $vgpr0, $vgpr1 61 ; GFX7: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 62 ; GFX7: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 63 ; GFX7: $m0 = S_MOV_B32 -1 64 ; GFX7: DS_WRITE_B16 [[COPY1]], [[COPY]], 0, 0, implicit $m0, implicit $exec :: (store 2, addrspace 3) 65 ; GFX9-LABEL: name: store_local_s32_to_2 66 ; GFX9: liveins: $vgpr0, $vgpr1 67 ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 68 ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 69 ; GFX9: DS_WRITE_B16_gfx9 [[COPY1]], [[COPY]], 0, 0, implicit $exec :: (store 2, addrspace 3) 70 ; GFX6-LABEL: name: store_local_s32_to_2 71 ; GFX6: liveins: $vgpr0, $vgpr1 72 ; GFX6: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 73 ; GFX6: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 74 ; GFX6: $m0 = S_MOV_B32 -1 75 ; GFX6: DS_WRITE_B16 [[COPY1]], [[COPY]], 0, 0, implicit $m0, implicit $exec :: (store 2, addrspace 3) 76 %0:vgpr(s32) = COPY $vgpr0 77 %1:vgpr(p3) = COPY $vgpr1 78 G_STORE %0, %1 :: (store 2, align 2, addrspace 3) 79 80... 81 82--- 83 84name: store_local_s32_to_1 85legalized: true 86regBankSelected: true 87tracksRegLiveness: true 88machineFunctionInfo: 89 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 90 stackPtrOffsetReg: $sgpr32 91 92body: | 93 bb.0: 94 liveins: $vgpr0, $vgpr1 95 96 ; GFX7-LABEL: name: store_local_s32_to_1 97 ; GFX7: liveins: $vgpr0, $vgpr1 98 ; GFX7: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 99 ; GFX7: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 100 ; GFX7: $m0 = S_MOV_B32 -1 101 ; GFX7: DS_WRITE_B8 [[COPY1]], [[COPY]], 0, 0, implicit $m0, implicit $exec :: (store 1, addrspace 3) 102 ; GFX9-LABEL: name: store_local_s32_to_1 103 ; GFX9: liveins: $vgpr0, $vgpr1 104 ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 105 ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 106 ; GFX9: DS_WRITE_B8_gfx9 [[COPY1]], [[COPY]], 0, 0, implicit $exec :: (store 1, addrspace 3) 107 ; GFX6-LABEL: name: store_local_s32_to_1 108 ; GFX6: liveins: $vgpr0, $vgpr1 109 ; GFX6: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 110 ; GFX6: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 111 ; GFX6: $m0 = S_MOV_B32 -1 112 ; GFX6: DS_WRITE_B8 [[COPY1]], [[COPY]], 0, 0, implicit $m0, implicit $exec :: (store 1, addrspace 3) 113 %0:vgpr(s32) = COPY $vgpr0 114 %1:vgpr(p3) = COPY $vgpr1 115 G_STORE %0, %1 :: (store 1, align 1, addrspace 3) 116 117... 118 119--- 120 121name: store_local_v2s16 122legalized: true 123regBankSelected: true 124tracksRegLiveness: true 125machineFunctionInfo: 126 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 127 stackPtrOffsetReg: $sgpr32 128 129body: | 130 bb.0: 131 liveins: $vgpr0, $vgpr1 132 133 ; GFX7-LABEL: name: store_local_v2s16 134 ; GFX7: liveins: $vgpr0, $vgpr1 135 ; GFX7: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 136 ; GFX7: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 137 ; GFX7: $m0 = S_MOV_B32 -1 138 ; GFX7: DS_WRITE_B32 [[COPY1]], [[COPY]], 0, 0, implicit $m0, implicit $exec :: (store 4, addrspace 3) 139 ; GFX9-LABEL: name: store_local_v2s16 140 ; GFX9: liveins: $vgpr0, $vgpr1 141 ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 142 ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 143 ; GFX9: DS_WRITE_B32_gfx9 [[COPY1]], [[COPY]], 0, 0, implicit $exec :: (store 4, addrspace 3) 144 ; GFX6-LABEL: name: store_local_v2s16 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: $m0 = S_MOV_B32 -1 149 ; GFX6: DS_WRITE_B32 [[COPY1]], [[COPY]], 0, 0, implicit $m0, implicit $exec :: (store 4, addrspace 3) 150 %0:vgpr(<2 x s16>) = COPY $vgpr0 151 %1:vgpr(p3) = COPY $vgpr1 152 G_STORE %0, %1 :: (store 4, align 4, addrspace 3) 153 154... 155 156--- 157 158name: store_local_p3 159legalized: true 160regBankSelected: true 161tracksRegLiveness: true 162machineFunctionInfo: 163 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 164 stackPtrOffsetReg: $sgpr32 165 166body: | 167 bb.0: 168 liveins: $vgpr0, $vgpr1 169 170 ; GFX7-LABEL: name: store_local_p3 171 ; GFX7: liveins: $vgpr0, $vgpr1 172 ; GFX7: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 173 ; GFX7: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 174 ; GFX7: $m0 = S_MOV_B32 -1 175 ; GFX7: DS_WRITE_B32 [[COPY1]], [[COPY]], 0, 0, implicit $m0, implicit $exec :: (store 4, addrspace 3) 176 ; GFX9-LABEL: name: store_local_p3 177 ; GFX9: liveins: $vgpr0, $vgpr1 178 ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 179 ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 180 ; GFX9: DS_WRITE_B32_gfx9 [[COPY1]], [[COPY]], 0, 0, implicit $exec :: (store 4, addrspace 3) 181 ; GFX6-LABEL: name: store_local_p3 182 ; GFX6: liveins: $vgpr0, $vgpr1 183 ; GFX6: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 184 ; GFX6: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 185 ; GFX6: $m0 = S_MOV_B32 -1 186 ; GFX6: DS_WRITE_B32 [[COPY1]], [[COPY]], 0, 0, implicit $m0, implicit $exec :: (store 4, addrspace 3) 187 %0:vgpr(p3) = COPY $vgpr0 188 %1:vgpr(p3) = COPY $vgpr1 189 G_STORE %0, %1 :: (store 4, align 4, addrspace 3) 190 191... 192 193--- 194 195name: store_local_s32_to_1_constant_4095 196legalized: true 197regBankSelected: true 198tracksRegLiveness: true 199 200body: | 201 bb.0: 202 203 ; GFX7-LABEL: name: store_local_s32_to_1_constant_4095 204 ; GFX7: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4095, implicit $exec 205 ; GFX7: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 206 ; GFX7: $m0 = S_MOV_B32 -1 207 ; GFX7: DS_WRITE_B8 [[V_MOV_B32_e32_]], [[V_MOV_B32_e32_1]], 0, 0, implicit $m0, implicit $exec :: (store 1, addrspace 3) 208 ; GFX9-LABEL: name: store_local_s32_to_1_constant_4095 209 ; GFX9: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4095, implicit $exec 210 ; GFX9: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 211 ; GFX9: DS_WRITE_B8_gfx9 [[V_MOV_B32_e32_]], [[V_MOV_B32_e32_1]], 0, 0, implicit $exec :: (store 1, addrspace 3) 212 ; GFX6-LABEL: name: store_local_s32_to_1_constant_4095 213 ; GFX6: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4095, implicit $exec 214 ; GFX6: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 215 ; GFX6: $m0 = S_MOV_B32 -1 216 ; GFX6: DS_WRITE_B8 [[V_MOV_B32_e32_]], [[V_MOV_B32_e32_1]], 0, 0, implicit $m0, implicit $exec :: (store 1, addrspace 3) 217 %0:vgpr(p3) = G_CONSTANT i32 4095 218 %1:vgpr(s32) = G_CONSTANT i32 0 219 G_STORE %1, %0 :: (store 1, align 1, addrspace 3) 220 221... 222 223--- 224 225name: store_local_s32_to_1_constant_4096 226legalized: true 227regBankSelected: true 228tracksRegLiveness: true 229machineFunctionInfo: 230 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 231 stackPtrOffsetReg: $sgpr32 232stack: 233 - { id: 0, size: 4096, alignment: 4 } 234 235body: | 236 bb.0: 237 238 ; GFX7-LABEL: name: store_local_s32_to_1_constant_4096 239 ; GFX7: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4096, implicit $exec 240 ; GFX7: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 241 ; GFX7: $m0 = S_MOV_B32 -1 242 ; GFX7: DS_WRITE_B8 [[V_MOV_B32_e32_]], [[V_MOV_B32_e32_1]], 0, 0, implicit $m0, implicit $exec :: (store 1, addrspace 3) 243 ; GFX9-LABEL: name: store_local_s32_to_1_constant_4096 244 ; GFX9: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4096, implicit $exec 245 ; GFX9: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 246 ; GFX9: DS_WRITE_B8_gfx9 [[V_MOV_B32_e32_]], [[V_MOV_B32_e32_1]], 0, 0, implicit $exec :: (store 1, addrspace 3) 247 ; GFX6-LABEL: name: store_local_s32_to_1_constant_4096 248 ; GFX6: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4096, implicit $exec 249 ; GFX6: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec 250 ; GFX6: $m0 = S_MOV_B32 -1 251 ; GFX6: DS_WRITE_B8 [[V_MOV_B32_e32_]], [[V_MOV_B32_e32_1]], 0, 0, implicit $m0, implicit $exec :: (store 1, addrspace 3) 252 %0:vgpr(p3) = G_CONSTANT i32 4096 253 %1:vgpr(s32) = G_CONSTANT i32 0 254 G_STORE %1, %0 :: (store 1, align 1, addrspace 3) 255 256... 257 258--- 259 260name: store_local_s64_align4 261legalized: true 262regBankSelected: true 263tracksRegLiveness: true 264machineFunctionInfo: 265 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 266 stackPtrOffsetReg: $sgpr32 267 268body: | 269 bb.0: 270 liveins: $vgpr0_vgpr1, $vgpr2 271 272 ; GFX7-LABEL: name: store_local_s64_align4 273 ; GFX7: liveins: $vgpr0_vgpr1, $vgpr2 274 ; GFX7: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 275 ; GFX7: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2 276 ; GFX7: $m0 = S_MOV_B32 -1 277 ; GFX7: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 278 ; GFX7: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 279 ; GFX7: DS_WRITE2_B32 [[COPY1]], [[COPY3]], [[COPY2]], 0, 1, 0, implicit $m0, implicit $exec :: (store 8, align 4, addrspace 3) 280 ; GFX9-LABEL: name: store_local_s64_align4 281 ; GFX9: liveins: $vgpr0_vgpr1, $vgpr2 282 ; GFX9: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 283 ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2 284 ; GFX9: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 285 ; GFX9: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 286 ; GFX9: DS_WRITE2_B32_gfx9 [[COPY1]], [[COPY3]], [[COPY2]], 0, 1, 0, implicit $exec :: (store 8, align 4, addrspace 3) 287 ; GFX6-LABEL: name: store_local_s64_align4 288 ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2 289 ; GFX6: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1 290 ; GFX6: [[COPY1:%[0-9]+]]:vgpr(p3) = COPY $vgpr2 291 ; GFX6: $m0 = S_MOV_B32 -1 292 ; GFX6: G_STORE [[COPY]](s64), [[COPY1]](p3) :: (store 8, align 4, addrspace 3) 293 %0:vgpr(s64) = COPY $vgpr0_vgpr1 294 %1:vgpr(p3) = COPY $vgpr2 295 G_STORE %0, %1 :: (store 8, align 4, addrspace 3) 296 297... 298 299--- 300 301name: store_local_p1_align4 302legalized: true 303regBankSelected: true 304tracksRegLiveness: true 305machineFunctionInfo: 306 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 307 stackPtrOffsetReg: $sgpr32 308 309body: | 310 bb.0: 311 liveins: $vgpr0_vgpr1, $vgpr2 312 313 ; GFX7-LABEL: name: store_local_p1_align4 314 ; GFX7: liveins: $vgpr0_vgpr1, $vgpr2 315 ; GFX7: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 316 ; GFX7: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2 317 ; GFX7: $m0 = S_MOV_B32 -1 318 ; GFX7: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 319 ; GFX7: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 320 ; GFX7: DS_WRITE2_B32 [[COPY1]], [[COPY3]], [[COPY2]], 0, 1, 0, implicit $m0, implicit $exec :: (store 8, align 4, addrspace 3) 321 ; GFX9-LABEL: name: store_local_p1_align4 322 ; GFX9: liveins: $vgpr0_vgpr1, $vgpr2 323 ; GFX9: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 324 ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2 325 ; GFX9: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 326 ; GFX9: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 327 ; GFX9: DS_WRITE2_B32_gfx9 [[COPY1]], [[COPY3]], [[COPY2]], 0, 1, 0, implicit $exec :: (store 8, align 4, addrspace 3) 328 ; GFX6-LABEL: name: store_local_p1_align4 329 ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2 330 ; GFX6: [[COPY:%[0-9]+]]:vgpr(p1) = COPY $vgpr0_vgpr1 331 ; GFX6: [[COPY1:%[0-9]+]]:vgpr(p3) = COPY $vgpr2 332 ; GFX6: $m0 = S_MOV_B32 -1 333 ; GFX6: G_STORE [[COPY]](p1), [[COPY1]](p3) :: (store 8, align 4, addrspace 3) 334 %0:vgpr(p1) = COPY $vgpr0_vgpr1 335 %1:vgpr(p3) = COPY $vgpr2 336 G_STORE %0, %1 :: (store 8, align 4, addrspace 3) 337 338... 339 340--- 341 342name: store_local_v2s32_align4 343legalized: true 344regBankSelected: true 345tracksRegLiveness: true 346machineFunctionInfo: 347 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 348 stackPtrOffsetReg: $sgpr32 349 350body: | 351 bb.0: 352 liveins: $vgpr0_vgpr1, $vgpr2 353 354 ; GFX7-LABEL: name: store_local_v2s32_align4 355 ; GFX7: liveins: $vgpr0_vgpr1, $vgpr2 356 ; GFX7: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 357 ; GFX7: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2 358 ; GFX7: $m0 = S_MOV_B32 -1 359 ; GFX7: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 360 ; GFX7: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 361 ; GFX7: DS_WRITE2_B32 [[COPY1]], [[COPY3]], [[COPY2]], 0, 1, 0, implicit $m0, implicit $exec :: (store 8, align 4, addrspace 3) 362 ; GFX9-LABEL: name: store_local_v2s32_align4 363 ; GFX9: liveins: $vgpr0_vgpr1, $vgpr2 364 ; GFX9: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 365 ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2 366 ; GFX9: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 367 ; GFX9: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 368 ; GFX9: DS_WRITE2_B32_gfx9 [[COPY1]], [[COPY3]], [[COPY2]], 0, 1, 0, implicit $exec :: (store 8, align 4, addrspace 3) 369 ; GFX6-LABEL: name: store_local_v2s32_align4 370 ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2 371 ; GFX6: [[COPY:%[0-9]+]]:vgpr(<2 x s32>) = COPY $vgpr0_vgpr1 372 ; GFX6: [[COPY1:%[0-9]+]]:vgpr(p3) = COPY $vgpr2 373 ; GFX6: $m0 = S_MOV_B32 -1 374 ; GFX6: G_STORE [[COPY]](<2 x s32>), [[COPY1]](p3) :: (store 8, align 4, addrspace 3) 375 %0:vgpr(<2 x s32>) = COPY $vgpr0_vgpr1 376 %1:vgpr(p3) = COPY $vgpr2 377 G_STORE %0, %1 :: (store 8, align 4, addrspace 3) 378 379... 380 381--- 382 383name: store_local_v4s16_align4 384legalized: true 385regBankSelected: true 386tracksRegLiveness: true 387machineFunctionInfo: 388 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 389 stackPtrOffsetReg: $sgpr32 390 391body: | 392 bb.0: 393 liveins: $vgpr0_vgpr1, $vgpr2 394 395 ; GFX7-LABEL: name: store_local_v4s16_align4 396 ; GFX7: liveins: $vgpr0_vgpr1, $vgpr2 397 ; GFX7: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 398 ; GFX7: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2 399 ; GFX7: $m0 = S_MOV_B32 -1 400 ; GFX7: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 401 ; GFX7: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 402 ; GFX7: DS_WRITE2_B32 [[COPY1]], [[COPY3]], [[COPY2]], 0, 1, 0, implicit $m0, implicit $exec :: (store 8, align 4, addrspace 3) 403 ; GFX9-LABEL: name: store_local_v4s16_align4 404 ; GFX9: liveins: $vgpr0_vgpr1, $vgpr2 405 ; GFX9: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 406 ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2 407 ; GFX9: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 408 ; GFX9: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 409 ; GFX9: DS_WRITE2_B32_gfx9 [[COPY1]], [[COPY3]], [[COPY2]], 0, 1, 0, implicit $exec :: (store 8, align 4, addrspace 3) 410 ; GFX6-LABEL: name: store_local_v4s16_align4 411 ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2 412 ; GFX6: [[COPY:%[0-9]+]]:vgpr(<4 x s16>) = COPY $vgpr0_vgpr1 413 ; GFX6: [[COPY1:%[0-9]+]]:vgpr(p3) = COPY $vgpr2 414 ; GFX6: $m0 = S_MOV_B32 -1 415 ; GFX6: G_STORE [[COPY]](<4 x s16>), [[COPY1]](p3) :: (store 8, align 4, addrspace 3) 416 %0:vgpr(<4 x s16>) = COPY $vgpr0_vgpr1 417 %1:vgpr(p3) = COPY $vgpr2 418 G_STORE %0, %1 :: (store 8, align 4, addrspace 3) 419 420... 421 422--- 423 424name: store_local_s64_align8 425legalized: true 426regBankSelected: true 427tracksRegLiveness: true 428machineFunctionInfo: 429 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 430 stackPtrOffsetReg: $sgpr32 431 432body: | 433 bb.0: 434 liveins: $vgpr0_vgpr1, $vgpr2 435 436 ; GFX7-LABEL: name: store_local_s64_align8 437 ; GFX7: liveins: $vgpr0_vgpr1, $vgpr2 438 ; GFX7: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 439 ; GFX7: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2 440 ; GFX7: $m0 = S_MOV_B32 -1 441 ; GFX7: DS_WRITE_B64 [[COPY1]], [[COPY]], 0, 0, implicit $m0, implicit $exec :: (store 8, addrspace 3) 442 ; GFX9-LABEL: name: store_local_s64_align8 443 ; GFX9: liveins: $vgpr0_vgpr1, $vgpr2 444 ; GFX9: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 445 ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2 446 ; GFX9: DS_WRITE_B64_gfx9 [[COPY1]], [[COPY]], 0, 0, implicit $exec :: (store 8, addrspace 3) 447 ; GFX6-LABEL: name: store_local_s64_align8 448 ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2 449 ; GFX6: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 450 ; GFX6: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2 451 ; GFX6: $m0 = S_MOV_B32 -1 452 ; GFX6: DS_WRITE_B64 [[COPY1]], [[COPY]], 0, 0, implicit $m0, implicit $exec :: (store 8, addrspace 3) 453 %0:vgpr(s64) = COPY $vgpr0_vgpr1 454 %1:vgpr(p3) = COPY $vgpr2 455 G_STORE %0, %1 :: (store 8, align 8, addrspace 3) 456 457... 458 459--- 460 461name: store_local_p1_align8 462legalized: true 463regBankSelected: true 464tracksRegLiveness: true 465machineFunctionInfo: 466 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 467 stackPtrOffsetReg: $sgpr32 468 469body: | 470 bb.0: 471 liveins: $vgpr0_vgpr1, $vgpr2 472 473 ; GFX7-LABEL: name: store_local_p1_align8 474 ; GFX7: liveins: $vgpr0_vgpr1, $vgpr2 475 ; GFX7: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 476 ; GFX7: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2 477 ; GFX7: $m0 = S_MOV_B32 -1 478 ; GFX7: DS_WRITE_B64 [[COPY1]], [[COPY]], 0, 0, implicit $m0, implicit $exec :: (store 8, addrspace 3) 479 ; GFX9-LABEL: name: store_local_p1_align8 480 ; GFX9: liveins: $vgpr0_vgpr1, $vgpr2 481 ; GFX9: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 482 ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2 483 ; GFX9: DS_WRITE_B64_gfx9 [[COPY1]], [[COPY]], 0, 0, implicit $exec :: (store 8, addrspace 3) 484 ; GFX6-LABEL: name: store_local_p1_align8 485 ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2 486 ; GFX6: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 487 ; GFX6: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2 488 ; GFX6: $m0 = S_MOV_B32 -1 489 ; GFX6: DS_WRITE_B64 [[COPY1]], [[COPY]], 0, 0, implicit $m0, implicit $exec :: (store 8, addrspace 3) 490 %0:vgpr(p1) = COPY $vgpr0_vgpr1 491 %1:vgpr(p3) = COPY $vgpr2 492 G_STORE %0, %1 :: (store 8, align 8, addrspace 3) 493 494... 495 496--- 497 498name: store_local_v2s32_align8 499legalized: true 500regBankSelected: true 501tracksRegLiveness: true 502machineFunctionInfo: 503 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 504 stackPtrOffsetReg: $sgpr32 505 506body: | 507 bb.0: 508 liveins: $vgpr0_vgpr1, $vgpr2 509 510 ; GFX7-LABEL: name: store_local_v2s32_align8 511 ; GFX7: liveins: $vgpr0_vgpr1, $vgpr2 512 ; GFX7: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 513 ; GFX7: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2 514 ; GFX7: $m0 = S_MOV_B32 -1 515 ; GFX7: DS_WRITE_B64 [[COPY1]], [[COPY]], 0, 0, implicit $m0, implicit $exec :: (store 8, addrspace 3) 516 ; GFX9-LABEL: name: store_local_v2s32_align8 517 ; GFX9: liveins: $vgpr0_vgpr1, $vgpr2 518 ; GFX9: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 519 ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2 520 ; GFX9: DS_WRITE_B64_gfx9 [[COPY1]], [[COPY]], 0, 0, implicit $exec :: (store 8, addrspace 3) 521 ; GFX6-LABEL: name: store_local_v2s32_align8 522 ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2 523 ; GFX6: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 524 ; GFX6: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2 525 ; GFX6: $m0 = S_MOV_B32 -1 526 ; GFX6: DS_WRITE_B64 [[COPY1]], [[COPY]], 0, 0, implicit $m0, implicit $exec :: (store 8, addrspace 3) 527 %0:vgpr(<2 x s32>) = COPY $vgpr0_vgpr1 528 %1:vgpr(p3) = COPY $vgpr2 529 G_STORE %0, %1 :: (store 8, align 8, addrspace 3) 530 531... 532 533--- 534 535name: store_local_v4s16_align8 536legalized: true 537regBankSelected: true 538tracksRegLiveness: true 539machineFunctionInfo: 540 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 541 stackPtrOffsetReg: $sgpr32 542 543body: | 544 bb.0: 545 liveins: $vgpr0_vgpr1, $vgpr2 546 547 ; GFX7-LABEL: name: store_local_v4s16_align8 548 ; GFX7: liveins: $vgpr0_vgpr1, $vgpr2 549 ; GFX7: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 550 ; GFX7: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2 551 ; GFX7: $m0 = S_MOV_B32 -1 552 ; GFX7: DS_WRITE_B64 [[COPY1]], [[COPY]], 0, 0, implicit $m0, implicit $exec :: (store 8, addrspace 3) 553 ; GFX9-LABEL: name: store_local_v4s16_align8 554 ; GFX9: liveins: $vgpr0_vgpr1, $vgpr2 555 ; GFX9: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 556 ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2 557 ; GFX9: DS_WRITE_B64_gfx9 [[COPY1]], [[COPY]], 0, 0, implicit $exec :: (store 8, addrspace 3) 558 ; GFX6-LABEL: name: store_local_v4s16_align8 559 ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2 560 ; GFX6: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 561 ; GFX6: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2 562 ; GFX6: $m0 = S_MOV_B32 -1 563 ; GFX6: DS_WRITE_B64 [[COPY1]], [[COPY]], 0, 0, implicit $m0, implicit $exec :: (store 8, addrspace 3) 564 %0:vgpr(<4 x s16>) = COPY $vgpr0_vgpr1 565 %1:vgpr(p3) = COPY $vgpr2 566 G_STORE %0, %1 :: (store 8, align 8, addrspace 3) 567 568... 569 570--- 571 572name: store_local_s64_align4_from_1_gep_1016 573legalized: true 574regBankSelected: true 575tracksRegLiveness: true 576machineFunctionInfo: 577 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 578 stackPtrOffsetReg: $sgpr32 579 580body: | 581 bb.0: 582 liveins: $vgpr0_vgpr1, $vgpr2 583 584 ; GFX7-LABEL: name: store_local_s64_align4_from_1_gep_1016 585 ; GFX7: liveins: $vgpr0_vgpr1, $vgpr2 586 ; GFX7: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 587 ; GFX7: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2 588 ; GFX7: $m0 = S_MOV_B32 -1 589 ; GFX7: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 590 ; GFX7: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 591 ; GFX7: DS_WRITE2_B32 [[COPY1]], [[COPY3]], [[COPY2]], 254, 255, 0, implicit $m0, implicit $exec :: (store 8, align 4, addrspace 3) 592 ; GFX9-LABEL: name: store_local_s64_align4_from_1_gep_1016 593 ; GFX9: liveins: $vgpr0_vgpr1, $vgpr2 594 ; GFX9: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 595 ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2 596 ; GFX9: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 597 ; GFX9: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 598 ; GFX9: DS_WRITE2_B32_gfx9 [[COPY1]], [[COPY3]], [[COPY2]], 254, 255, 0, implicit $exec :: (store 8, align 4, addrspace 3) 599 ; GFX6-LABEL: name: store_local_s64_align4_from_1_gep_1016 600 ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2 601 ; GFX6: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1 602 ; GFX6: [[COPY1:%[0-9]+]]:vgpr(p3) = COPY $vgpr2 603 ; GFX6: [[C:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 1016 604 ; GFX6: [[PTR_ADD:%[0-9]+]]:vgpr(p3) = G_PTR_ADD [[COPY1]], [[C]](s32) 605 ; GFX6: $m0 = S_MOV_B32 -1 606 ; GFX6: G_STORE [[COPY]](s64), [[PTR_ADD]](p3) :: (store 8, align 4, addrspace 3) 607 %0:vgpr(s64) = COPY $vgpr0_vgpr1 608 %1:vgpr(p3) = COPY $vgpr2 609 %2:vgpr(s32) = G_CONSTANT i32 1016 610 %3:vgpr(p3) = G_PTR_ADD %1, %2 611 G_STORE %0, %3 :: (store 8, align 4, addrspace 3) 612 613... 614 615--- 616 617name: store_local_s64_align4_from_1_gep_1020 618legalized: true 619regBankSelected: true 620tracksRegLiveness: true 621machineFunctionInfo: 622 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 623 stackPtrOffsetReg: $sgpr32 624 625body: | 626 bb.0: 627 liveins: $vgpr0_vgpr1, $vgpr2 628 629 ; GFX7-LABEL: name: store_local_s64_align4_from_1_gep_1020 630 ; GFX7: liveins: $vgpr0_vgpr1, $vgpr2 631 ; GFX7: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 632 ; GFX7: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2 633 ; GFX7: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 1020, implicit $exec 634 ; GFX7: %3:vgpr_32, dead %6:sreg_64_xexec = V_ADD_CO_U32_e64 [[COPY1]], [[V_MOV_B32_e32_]], 0, implicit $exec 635 ; GFX7: $m0 = S_MOV_B32 -1 636 ; GFX7: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 637 ; GFX7: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 638 ; GFX7: DS_WRITE2_B32 %3, [[COPY3]], [[COPY2]], 0, 1, 0, implicit $m0, implicit $exec :: (store 8, align 4, addrspace 3) 639 ; GFX9-LABEL: name: store_local_s64_align4_from_1_gep_1020 640 ; GFX9: liveins: $vgpr0_vgpr1, $vgpr2 641 ; GFX9: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 642 ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2 643 ; GFX9: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 1020, implicit $exec 644 ; GFX9: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 [[COPY1]], [[V_MOV_B32_e32_]], 0, implicit $exec 645 ; GFX9: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 646 ; GFX9: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 647 ; GFX9: DS_WRITE2_B32_gfx9 [[V_ADD_U32_e64_]], [[COPY3]], [[COPY2]], 0, 1, 0, implicit $exec :: (store 8, align 4, addrspace 3) 648 ; GFX6-LABEL: name: store_local_s64_align4_from_1_gep_1020 649 ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2 650 ; GFX6: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1 651 ; GFX6: [[COPY1:%[0-9]+]]:vgpr(p3) = COPY $vgpr2 652 ; GFX6: [[C:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 1020 653 ; GFX6: [[PTR_ADD:%[0-9]+]]:vgpr(p3) = G_PTR_ADD [[COPY1]], [[C]](s32) 654 ; GFX6: $m0 = S_MOV_B32 -1 655 ; GFX6: G_STORE [[COPY]](s64), [[PTR_ADD]](p3) :: (store 8, align 4, addrspace 3) 656 %0:vgpr(s64) = COPY $vgpr0_vgpr1 657 %1:vgpr(p3) = COPY $vgpr2 658 %2:vgpr(s32) = G_CONSTANT i32 1020 659 %3:vgpr(p3) = G_PTR_ADD %1, %2 660 G_STORE %0, %3 :: (store 8, align 4, addrspace 3) 661 662... 663