1# RUN: llc -march=amdgcn -mcpu=gfx1010 -verify-machineinstrs -run-pass greedy,amdgpu-regbanks-reassign,virtregrewriter -o - %s | FileCheck -check-prefix=GCN %s 2 3# GCN-LABEL: v1_vs_v5{{$}} 4# GCN: V_AND_B32_e32 killed $vgpr3, killed $vgpr1, 5--- 6name: v1_vs_v5 7tracksRegLiveness: true 8registers: 9 - { id: 0, class: vgpr_32, preferred-register: '$vgpr1' } 10 - { id: 1, class: vgpr_32, preferred-register: '$vgpr5' } 11 - { id: 2, class: vgpr_32 } 12body: | 13 bb.0: 14 %0 = IMPLICIT_DEF 15 %1 = IMPLICIT_DEF 16 %2 = V_AND_B32_e32 %1, %0, implicit $exec 17 S_ENDPGM 0 18... 19 20# GCN-LABEL: v0_1_vs_v4{{$}} 21# GCN: GLOBAL_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr3, 22--- 23name: v0_1_vs_v4 24tracksRegLiveness: true 25registers: 26 - { id: 0, class: vgpr_32, preferred-register: '$vgpr4' } 27 - { id: 1, class: vreg_64, preferred-register: '$vgpr0_vgpr1' } 28body: | 29 bb.0: 30 %0 = IMPLICIT_DEF 31 %1 = IMPLICIT_DEF 32 GLOBAL_STORE_DWORD %1, %0, 0, 0, 0, 0, implicit $exec 33 S_ENDPGM 0 34... 35 36# GCN-LABEL: v1_2_vs_v4_5{{$}} 37# GCN: GLOBAL_STORE_DWORDX2 killed renamable $vgpr2_vgpr3, killed renamable $vgpr4_vgpr5, 38--- 39name: v1_2_vs_v4_5 40tracksRegLiveness: true 41registers: 42 - { id: 0, class: vreg_64, preferred-register: '$vgpr4_vgpr5' } 43 - { id: 1, class: vreg_64, preferred-register: '$vgpr1_vgpr2' } 44body: | 45 bb.0: 46 %0 = IMPLICIT_DEF 47 %1 = IMPLICIT_DEF 48 GLOBAL_STORE_DWORDX2 %1, %0, 0, 0, 0, 0, implicit $exec 49 S_ENDPGM 0 50... 51 52# GCN-LABEL: s11_vs_vcc{{$}} 53# GCN: $vgpr0, $vcc_lo = V_ADDC_U32_e64 killed $sgpr14, killed $vgpr0, killed $vcc_lo, 0 54--- 55name: s11_vs_vcc 56tracksRegLiveness: true 57registers: 58 - { id: 0, class: sgpr_32, preferred-register: '$sgpr11' } 59 - { id: 1, class: vgpr_32 } 60 - { id: 2, class: vgpr_32 } 61body: | 62 bb.0: 63 %0 = IMPLICIT_DEF 64 %1 = IMPLICIT_DEF 65 $vcc_lo = IMPLICIT_DEF 66 %2, $vcc_lo = V_ADDC_U32_e64 killed %0, killed %1, killed $vcc_lo, 0, implicit $exec 67 S_ENDPGM 0 68... 69 70# GCN-LABEL: s0_vs_s16{{$}} 71# GCN: S_AND_B32 killed renamable $sgpr14, $sgpr0, 72--- 73name: s0_vs_s16 74tracksRegLiveness: true 75registers: 76 - { id: 0, class: sgpr_32, preferred-register: '$sgpr16' } 77 - { id: 1, class: sgpr_32 } 78body: | 79 bb.0: 80 %0 = IMPLICIT_DEF 81 $sgpr0 = IMPLICIT_DEF 82 %1 = S_AND_B32 %0, $sgpr0, implicit-def $scc 83 S_ENDPGM 0 84... 85 86# GCN-LABEL: s1_vs_s16{{$}} 87# GCN: S_AND_B32 killed renamable $sgpr14, $sgpr1, 88--- 89name: s1_vs_s16 90tracksRegLiveness: true 91registers: 92 - { id: 0, class: sgpr_32, preferred-register: '$sgpr16' } 93 - { id: 1, class: sgpr_32 } 94body: | 95 bb.0: 96 %0 = IMPLICIT_DEF 97 $sgpr1 = IMPLICIT_DEF 98 %1 = S_AND_B32 %0, $sgpr1, implicit-def $scc 99 S_ENDPGM 0 100... 101 102# GCN-LABEL: s12_vs_null{{$}} 103# GCN: S_AND_B32 $sgpr_null, killed renamable $sgpr14, 104--- 105name: s12_vs_null 106tracksRegLiveness: true 107registers: 108 - { id: 0, class: sgpr_32, preferred-register: '$sgpr12' } 109 - { id: 1, class: sgpr_32 } 110body: | 111 bb.0: 112 %0 = IMPLICIT_DEF 113 %1 = S_AND_B32 $sgpr_null, %0, implicit-def $scc 114 S_ENDPGM 0 115... 116 117# GCN-LABEL: s13_vs_m0{{$}} 118# GCN: S_AND_B32 $m0, killed renamable $sgpr14, 119--- 120name: s13_vs_m0 121tracksRegLiveness: true 122registers: 123 - { id: 0, class: sgpr_32, preferred-register: '$sgpr13' } 124 - { id: 1, class: sgpr_32 } 125body: | 126 bb.0: 127 %0 = IMPLICIT_DEF 128 %1 = S_AND_B32 $m0, %0, implicit-def $scc 129 S_ENDPGM 0 130... 131 132# GCN-LABEL: s12_13_vs_s28_s29{{$}} 133# GCN: S_AND_B64 $sgpr28_sgpr29, killed renamable $sgpr14_sgpr15, 134--- 135name: s12_13_vs_s28_s29 136tracksRegLiveness: true 137registers: 138 - { id: 0, class: sreg_64, preferred-register: '$sgpr12_sgpr13' } 139 - { id: 1, class: sreg_64 } 140body: | 141 bb.0: 142 %0 = IMPLICIT_DEF 143 $sgpr28_sgpr29 = IMPLICIT_DEF 144 %1 = S_AND_B64 $sgpr28_sgpr29, %0, implicit-def $scc 145 S_ENDPGM 0 146... 147 148# GCN-LABEL: livein{{$}} 149# GCN: V_AND_B32_e32 killed $vgpr4, killed $vgpr0, 150--- 151name: livein 152tracksRegLiveness: true 153registers: 154 - { id: 0, class: vgpr_32, preferred-register: '$vgpr0' } 155 - { id: 1, class: vgpr_32, preferred-register: '$vgpr4' } 156 - { id: 2, class: vgpr_32 } 157liveins: 158 - { reg: '$vgpr0', virtual-reg: '' } 159 - { reg: '$vgpr4', virtual-reg: '' } 160body: | 161 bb.0: 162 liveins: $vgpr0, $vgpr4 163 164 %0 = COPY $vgpr0 165 %1 = COPY $vgpr4 166 %2 = V_AND_B32_e32 %1, %0, implicit $exec 167 S_ENDPGM 0 168... 169 170# GCN-LABEL: liveout{{$}} 171# GCN: V_AND_B32_e32 $vgpr4, $vgpr0, 172--- 173name: liveout 174tracksRegLiveness: true 175registers: 176 - { id: 0, class: vgpr_32, preferred-register: '$vgpr0' } 177 - { id: 1, class: vgpr_32, preferred-register: '$vgpr4' } 178 - { id: 2, class: vgpr_32 } 179body: | 180 bb.0: 181 %0 = IMPLICIT_DEF 182 %1 = IMPLICIT_DEF 183 %2 = V_AND_B32_e32 %1, %0, implicit $exec 184 $vgpr0 = COPY %0 185 $vgpr4 = COPY %1 186 S_ENDPGM 0 187... 188 189# GCN-LABEL: implicit{{$}} 190# GCN: V_MOV_B32_indirect undef $vgpr4, undef $vgpr0, implicit $exec, implicit-def dead renamable $vgpr0_vgpr1_vgpr2_vgpr3, implicit killed $vgpr4_vgpr5_vgpr6_vgpr7, implicit $m0 191--- 192name: implicit 193tracksRegLiveness: true 194registers: 195 - { id: 0, class: vreg_128 } 196 - { id: 1, class: vreg_128, preferred-register: '$vgpr4_vgpr5_vgpr6_vgpr7' } 197body: | 198 bb.0: 199 %1 = IMPLICIT_DEF 200 V_MOV_B32_indirect undef %1.sub0:vreg_128, undef $vgpr0, implicit $exec, implicit-def %0:vreg_128, implicit %1:vreg_128, implicit $m0 201 S_ENDPGM 0 202... 203 204# GCN-LABEL: occupancy_limit{{$}} 205# GCN: V_AND_B32_e32 $vgpr4, $vgpr0, 206--- 207name: occupancy_limit 208tracksRegLiveness: true 209registers: 210 - { id: 0, class: vgpr_32, preferred-register: '$vgpr0' } 211 - { id: 1, class: vgpr_32, preferred-register: '$vgpr4' } 212 - { id: 2, class: vgpr_32, preferred-register: '$vgpr1' } 213 - { id: 3, class: vreg_64, preferred-register: '$vgpr2_vgpr3' } 214 - { id: 4, class: vgpr_32, preferred-register: '$vgpr5' } 215 - { id: 5, class: vreg_64, preferred-register: '$vgpr6_vgpr7' } 216 - { id: 6, class: vreg_128, preferred-register: '$vgpr8_vgpr9_vgpr10_vgpr11' } 217 - { id: 7, class: vreg_128, preferred-register: '$vgpr12_vgpr13_vgpr14_vgpr15' } 218 - { id: 8, class: vreg_128, preferred-register: '$vgpr16_vgpr17_vgpr18_vgpr19' } 219 - { id: 9, class: vreg_128, preferred-register: '$vgpr20_vgpr21_vgpr22_vgpr23' } 220 - { id: 10, class: vreg_128, preferred-register: '$vgpr24_vgpr25_vgpr26_vgpr27' } 221 - { id: 11, class: vreg_128, preferred-register: '$vgpr28_vgpr29_vgpr30_vgpr31' } 222 - { id: 12, class: vreg_128, preferred-register: '$vgpr32_vgpr33_vgpr34_vgpr35' } 223 - { id: 13, class: vreg_128, preferred-register: '$vgpr36_vgpr37_vgpr38_vgpr39' } 224 - { id: 14, class: vreg_128, preferred-register: '$vgpr40_vgpr41_vgpr42_vgpr43' } 225 - { id: 15, class: vreg_128, preferred-register: '$vgpr44_vgpr45_vgpr46_vgpr47' } 226body: | 227 bb.0: 228 %0 = IMPLICIT_DEF 229 %1 = IMPLICIT_DEF 230 %3 = IMPLICIT_DEF 231 %4 = IMPLICIT_DEF 232 %5 = IMPLICIT_DEF 233 %6 = IMPLICIT_DEF 234 %7 = IMPLICIT_DEF 235 %8 = IMPLICIT_DEF 236 %9 = IMPLICIT_DEF 237 %10 = IMPLICIT_DEF 238 %11 = IMPLICIT_DEF 239 %12 = IMPLICIT_DEF 240 %13 = IMPLICIT_DEF 241 %14 = IMPLICIT_DEF 242 %15 = IMPLICIT_DEF 243 %2 = V_AND_B32_e32 %1, %0, implicit $exec 244 GLOBAL_STORE_DWORD %3, %0, 0, 0, 0, 0, implicit $exec 245 GLOBAL_STORE_DWORD %3, %1, 0, 0, 0, 0, implicit $exec 246 GLOBAL_STORE_DWORD %3, %2, 0, 0, 0, 0, implicit $exec 247 GLOBAL_STORE_DWORD %3, %4, 0, 0, 0, 0, implicit $exec 248 GLOBAL_STORE_DWORDX2 %3, %5, 0, 0, 0, 0, implicit $exec 249 GLOBAL_STORE_DWORDX4 %3, %6, 0, 0, 0, 0, implicit $exec 250 GLOBAL_STORE_DWORDX4 %3, %7, 0, 0, 0, 0, implicit $exec 251 GLOBAL_STORE_DWORDX4 %3, %8, 0, 0, 0, 0, implicit $exec 252 GLOBAL_STORE_DWORDX4 %3, %9, 0, 0, 0, 0, implicit $exec 253 S_ENDPGM 0 254... 255 256# GCN-LABEL: csr{{$}} 257# GCN: V_AND_B32_e32 $vgpr37, $vgpr0, 258--- 259name: csr 260tracksRegLiveness: true 261registers: 262 - { id: 0, class: vgpr_32, preferred-register: '$vgpr0' } 263 - { id: 1, class: vgpr_32, preferred-register: '$vgpr4' } 264 - { id: 2, class: vgpr_32, preferred-register: '$vgpr1' } 265 - { id: 3, class: vreg_64, preferred-register: '$vgpr2_vgpr3' } 266 - { id: 4, class: vgpr_32, preferred-register: '$vgpr5' } 267 - { id: 5, class: vreg_64, preferred-register: '$vgpr6_vgpr7' } 268 - { id: 6, class: vreg_128, preferred-register: '$vgpr8_vgpr9_vgpr10_vgpr11' } 269 - { id: 7, class: vreg_128, preferred-register: '$vgpr12_vgpr13_vgpr14_vgpr15' } 270 - { id: 8, class: vreg_128, preferred-register: '$vgpr16_vgpr17_vgpr18_vgpr19' } 271 - { id: 9, class: vreg_128, preferred-register: '$vgpr20_vgpr21_vgpr22_vgpr23' } 272 - { id: 10, class: vreg_128, preferred-register: '$vgpr24_vgpr25_vgpr26_vgpr27' } 273 - { id: 11, class: vreg_128, preferred-register: '$vgpr28_vgpr29_vgpr30_vgpr31' } 274 - { id: 12, class: vgpr_32, preferred-register: '$vgpr33' } 275body: | 276 bb.0: 277 %0 = IMPLICIT_DEF 278 %1 = IMPLICIT_DEF 279 %3 = IMPLICIT_DEF 280 %4 = IMPLICIT_DEF 281 %5 = IMPLICIT_DEF 282 %6 = IMPLICIT_DEF 283 %7 = IMPLICIT_DEF 284 %8 = IMPLICIT_DEF 285 %9 = IMPLICIT_DEF 286 %10 = IMPLICIT_DEF 287 %11 = IMPLICIT_DEF 288 %12 = IMPLICIT_DEF 289 %2 = V_AND_B32_e32 %1, %0, implicit $exec 290 GLOBAL_STORE_DWORD %3, %0, 0, 0, 0, 0, implicit $exec 291 GLOBAL_STORE_DWORD %3, %1, 0, 0, 0, 0, implicit $exec 292 GLOBAL_STORE_DWORD %3, %2, 0, 0, 0, 0, implicit $exec 293 GLOBAL_STORE_DWORD %3, %4, 0, 0, 0, 0, implicit $exec 294 GLOBAL_STORE_DWORDX2 %3, %5, 0, 0, 0, 0, implicit $exec 295 GLOBAL_STORE_DWORDX4 %3, %6, 0, 0, 0, 0, implicit $exec 296 GLOBAL_STORE_DWORDX4 %3, %7, 0, 0, 0, 0, implicit $exec 297 GLOBAL_STORE_DWORDX4 %3, %8, 0, 0, 0, 0, implicit $exec 298 GLOBAL_STORE_DWORDX4 %3, %9, 0, 0, 0, 0, implicit $exec 299 GLOBAL_STORE_DWORDX4 %3, %10, 0, 0, 0, 0, implicit $exec 300 GLOBAL_STORE_DWORDX4 %3, %11, 0, 0, 0, 0, implicit $exec 301 GLOBAL_STORE_DWORD %3, %12, 0, 0, 0, 0, implicit $exec 302 S_ENDPGM 0 303... 304 305# Do not touch undefs 306# GCN-LABEL: s0_vs_s16_undef{{$}} 307# GCN: S_AND_B32 killed renamable $sgpr16, undef $sgpr0, 308--- 309name: s0_vs_s16_undef 310tracksRegLiveness: true 311registers: 312 - { id: 0, class: sgpr_32, preferred-register: '$sgpr16' } 313 - { id: 1, class: sgpr_32 } 314body: | 315 bb.0: 316 %0 = IMPLICIT_DEF 317 %1 = S_AND_B32 %0, undef $sgpr0, implicit-def $scc 318 S_ENDPGM 0 319... 320 321# GCN-LABEL: smem_bundle{{$}} 322# GCN: S_BUFFER_LOAD_DWORD_SGPR renamable $sgpr0_sgpr1_sgpr2_sgpr3, renamable $sgpr14, 0, 0 323# GCN: S_BUFFER_LOAD_DWORD_SGPR renamable $sgpr0_sgpr1_sgpr2_sgpr3, renamable $sgpr15, 0, 0 324--- 325name: smem_bundle 326tracksRegLiveness: true 327registers: 328 - { id: 0, class: sgpr_128, preferred-register: '$sgpr0_sgpr1_sgpr2_sgpr3' } 329 - { id: 1, class: sreg_32_xm0_xexec, preferred-register: '$sgpr16' } 330 - { id: 2, class: sreg_32_xm0_xexec, preferred-register: '$sgpr17' } 331 - { id: 3, class: sreg_32_xm0_xexec, preferred-register: '$sgpr4' } 332 - { id: 4, class: sreg_32_xm0_xexec, preferred-register: '$sgpr5' } 333body: | 334 bb.0: 335 %0 = IMPLICIT_DEF 336 %1 = IMPLICIT_DEF 337 %2 = IMPLICIT_DEF 338 early-clobber %3, early-clobber %4 = BUNDLE %0, %1, %2 { 339 %3 = S_BUFFER_LOAD_DWORD_SGPR %0, %1, 0, 0 340 %4 = S_BUFFER_LOAD_DWORD_SGPR %0, %2, 0, 0 341 } 342 S_ENDPGM 0 343... 344 345# GCN-LABEL: vreg_512_subs{{$}} 346# don't care about the assignment: this used to trigger an infinite loop 347--- 348name: vreg_512_subs 349tracksRegLiveness: true 350registers: 351 - { id: 1, class: vreg_512, preferred-register: '$vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15' } 352 - { id: 2, class: vgpr_32, preferred-register: '$vgpr28' } 353body: | 354 bb.0: 355 %1 = IMPLICIT_DEF 356 %2 = IMPLICIT_DEF 357 DS_WRITE2_B32_gfx9 %2, %1.sub0, %1.sub1, 0, 1, 0, implicit $exec 358 DS_WRITE2_B32_gfx9 %2, %1.sub2, %1.sub3, 2, 3, 0, implicit $exec 359 DS_WRITE2_B32_gfx9 %2, %1.sub4, %1.sub5, 4, 5, 0, implicit $exec 360 DS_WRITE2_B32_gfx9 %2, %1.sub6, %1.sub7, 6, 7, 0, implicit $exec 361 DS_WRITE2_B32_gfx9 %2, %1.sub8, %1.sub9, 8, 9, 0, implicit $exec 362 DS_WRITE2_B32_gfx9 %2, %1.sub10, %1.sub11, 10, 11, 0, implicit $exec 363 DS_WRITE2_B32_gfx9 %2, %1.sub12, %1.sub13, 12, 13, 0, implicit $exec 364 DS_WRITE2_B32_gfx9 %2, %1.sub14, %1.sub15, 14, 15, 0, implicit $exec 365 S_ENDPGM 0 366... 367 368# GCN-LABEL: vgpr_lo16_sub{{$}} 369# GCN: renamable $vgpr0 = V_AND_B32_e32 killed $vgpr3, killed $vgpr1, implicit $exec 370# GCN: renamable $vgpr1_lo16 = COPY renamable $vgpr0_lo16 371--- 372name: vgpr_lo16_sub 373tracksRegLiveness: true 374registers: 375 - { id: 0, class: vgpr_32, preferred-register: '$vgpr1' } 376 - { id: 1, class: vgpr_32, preferred-register: '$vgpr5' } 377 - { id: 2, class: vgpr_32 } 378 - { id: 3, class: vgpr_lo16 } 379body: | 380 bb.0: 381 %0 = IMPLICIT_DEF 382 %1 = IMPLICIT_DEF 383 %2 = V_AND_B32_e32 %1, %0, implicit $exec 384 %3 = COPY %2.lo16 385 $vgpr1_lo16 = COPY %3 386 SI_RETURN_TO_EPILOG $vgpr1_lo16 387... 388 389# GCN-LABEL: vgpr_lo16{{$}} 390# GCN: $vgpr1_lo16 = COPY killed renamable $vgpr0_lo16 391--- 392name: vgpr_lo16 393tracksRegLiveness: true 394registers: 395 - { id: 0, class: vgpr_lo16, preferred-register: '$vgpr4_lo16' } 396body: | 397 bb.0: 398 liveins: $vgpr0_lo16 399 400 %0 = COPY $vgpr0_lo16 401 $vgpr1_lo16 = COPY %0 402 SI_RETURN_TO_EPILOG $vgpr1_lo16 403... 404 405# GCN-LABEL: vgpr_hi16_sub{{$}} 406# GCN: renamable $vgpr0 = V_AND_B32_e32 killed $vgpr3, killed $vgpr1, implicit $exec 407# GCN: renamable $vgpr1_hi16 = COPY renamable $vgpr0_hi16 408--- 409name: vgpr_hi16_sub 410tracksRegLiveness: true 411registers: 412 - { id: 0, class: vgpr_32, preferred-register: '$vgpr1' } 413 - { id: 1, class: vgpr_32, preferred-register: '$vgpr5' } 414 - { id: 2, class: vgpr_32 } 415 - { id: 3, class: vgpr_hi16 } 416body: | 417 bb.0: 418 %0 = IMPLICIT_DEF 419 %1 = IMPLICIT_DEF 420 %2 = V_AND_B32_e32 %1, %0, implicit $exec 421 %3 = COPY %2.hi16 422 $vgpr1_hi16 = COPY %3 423 SI_RETURN_TO_EPILOG $vgpr1_hi16 424... 425 426# GCN-LABEL: vgpr_hi16{{$}} 427# GCN: $vgpr1_hi16 = COPY killed renamable $vgpr0_hi16 428--- 429name: vgpr_hi16 430tracksRegLiveness: true 431registers: 432 - { id: 0, class: vgpr_hi16, preferred-register: '$vgpr4_hi16' } 433body: | 434 bb.0: 435 liveins: $vgpr0_hi16 436 437 %0 = COPY $vgpr0_hi16 438 $vgpr1_hi16 = COPY %0 439 SI_RETURN_TO_EPILOG $vgpr1_hi16 440... 441 442# GCN-LABEL: sgpr_lo16_sub{{$}} 443# GCN: renamable $sgpr0 = S_AND_B32 killed renamable $sgpr14, $sgpr0, implicit-def $scc 444# GCN: renamable $sgpr1_lo16 = COPY renamable $sgpr0_lo16 445--- 446name: sgpr_lo16_sub 447tracksRegLiveness: true 448registers: 449 - { id: 0, class: sgpr_32, preferred-register: '$sgpr16' } 450 - { id: 1, class: sgpr_32 } 451 - { id: 2, class: sgpr_lo16 } 452body: | 453 bb.0: 454 %0 = IMPLICIT_DEF 455 $sgpr0 = IMPLICIT_DEF 456 %1 = S_AND_B32 %0, $sgpr0, implicit-def $scc 457 %2 = COPY %1.lo16 458 $sgpr1_lo16 = COPY %2 459 SI_RETURN_TO_EPILOG $sgpr1_lo16 460... 461 462# GCN-LABEL: sgpr_lo16{{$}} 463# GCN: $sgpr1_lo16 = COPY killed renamable $sgpr0_lo16 464--- 465name: sgpr_lo16 466tracksRegLiveness: true 467registers: 468 - { id: 0, class: sgpr_lo16, preferred-register: '$sgpr4_lo16' } 469body: | 470 bb.0: 471 liveins: $sgpr0_lo16 472 473 %0 = COPY $sgpr0_lo16 474 $sgpr1_lo16 = COPY %0 475 SI_RETURN_TO_EPILOG $sgpr1_lo16 476... 477 478# Check that we do not use VGPR3 which we would use otherwise. 479# We cannot use it because of interference with VGPR3_LO16. 480# GCN-LABEL: v1_vs_v5_src_interence{{$}} 481# GCN: V_AND_B32_e32 killed $vgpr7, killed $vgpr1, 482--- 483name: v1_vs_v5_src_interence 484tracksRegLiveness: true 485registers: 486 - { id: 0, class: vgpr_32, preferred-register: '$vgpr1' } 487 - { id: 1, class: vgpr_32, preferred-register: '$vgpr5' } 488 - { id: 2, class: vgpr_32 } 489body: | 490 bb.0: 491 %0 = IMPLICIT_DEF 492 %1 = IMPLICIT_DEF 493 $vgpr3_lo16 = IMPLICIT_DEF 494 %2 = V_AND_B32_e32 %1, %0, implicit $exec 495 S_ENDPGM 0 496... 497 498# Test that bank of subreg is considered during scavenging. 499# If handled incorrectly an infinite loop occurs. 500# GCN-LABEL: s0_vs_s15_16_17_sub1{{$}} 501# GCN: S_AND_B32 renamable $sgpr13, $sgpr0, 502--- 503name: s0_vs_s15_16_17_sub1 504tracksRegLiveness: true 505registers: 506 - { id: 0, class: sgpr_96, preferred-register: '$sgpr15_sgpr16_sgpr17' } 507 - { id: 1, class: sgpr_32 } 508body: | 509 bb.0: 510 %0 = IMPLICIT_DEF 511 $sgpr0 = IMPLICIT_DEF 512 %1 = S_AND_B32 %0.sub1, $sgpr0, implicit-def $scc 513 S_ENDPGM 0 514... 515 516# Test that the size of subreg is correctly handled in bank calculation. 517# If handled incorrectly an infinite loop occurs. 518# GCN-LABEL: vgpr_sub_dependence{{$}} 519# GCN: $vgpr9_vgpr10_vgpr11_vgpr12 = IMPLICIT_DEF 520# GCN: $vgpr16_vgpr17 = IMPLICIT_DEF 521# GCN: $vgpr14_vgpr15 = IMPLICIT_DEF 522# GCN: $vgpr0_vgpr1 = IMPLICIT_DEF 523# GCN: $vgpr7_vgpr8 = IMPLICIT_DEF 524# GCN: $vgpr3_vgpr4_vgpr5_vgpr6 = IMPLICIT_DEF 525# GCN: $vgpr18_vgpr19 = IMPLICIT_DEF 526# GCN: $vgpr20_vgpr21_vgpr22_vgpr23 = IMPLICIT_DEF 527# GCN: $vgpr24_vgpr25_vgpr26_vgpr27 = IMPLICIT_DEF 528# GCN: $vgpr28_vgpr29_vgpr30_vgpr31 = IMPLICIT_DEF 529# GCN: $vgpr32_vgpr33_vgpr34_vgpr35 = IMPLICIT_DEF 530# GCN: $vgpr36_vgpr37_vgpr38_vgpr39 = IMPLICIT_DEF 531# GCN: $vgpr40_vgpr41_vgpr42_vgpr43 = IMPLICIT_DEF 532# GCN: $vgpr44_vgpr45_vgpr46_vgpr47 = IMPLICIT_DEF 533# GCN: $vgpr0_vgpr1 = V_ADD_F64 0, $vgpr11_vgpr12, 0, killed $vgpr16_vgpr17, 0, 0, implicit $mode, implicit $exec 534# GCN: $vgpr0_vgpr1 = V_ADD_F64 0, $vgpr9_vgpr10, 0, killed $vgpr14_vgpr15, 0, 0, implicit $mode, implicit $exec 535--- 536name: vgpr_sub_dependence 537tracksRegLiveness: true 538registers: 539 - { id: 0, class: vreg_128, preferred-register: '$vgpr10_vgpr11_vgpr12_vgpr13' } 540 - { id: 1, class: vreg_64, preferred-register: '$vgpr16_vgpr17' } 541 - { id: 2, class: vreg_64, preferred-register: '$vgpr14_vgpr15' } 542 - { id: 3, class: vreg_64 } 543 - { id: 4, class: vreg_64 } 544 - { id: 5, class: vreg_64, preferred-register: '$vgpr0_vgpr1' } 545 - { id: 6, class: vreg_64, preferred-register: '$vgpr7_vgpr8' } 546 - { id: 7, class: vreg_128, preferred-register: '$vgpr3_vgpr4_vgpr5_vgpr6' } 547 - { id: 8, class: vreg_64, preferred-register: '$vgpr18_vgpr19' } 548 - { id: 9, class: vreg_128, preferred-register: '$vgpr20_vgpr21_vgpr22_vgpr23' } 549 - { id: 10, class: vreg_128, preferred-register: '$vgpr24_vgpr25_vgpr26_vgpr27' } 550 - { id: 11, class: vreg_128, preferred-register: '$vgpr28_vgpr29_vgpr30_vgpr31' } 551 - { id: 12, class: vreg_128, preferred-register: '$vgpr32_vgpr33_vgpr34_vgpr35' } 552 - { id: 13, class: vreg_128, preferred-register: '$vgpr36_vgpr37_vgpr38_vgpr39' } 553 - { id: 14, class: vreg_128, preferred-register: '$vgpr40_vgpr41_vgpr42_vgpr43' } 554 - { id: 15, class: vreg_128, preferred-register: '$vgpr44_vgpr45_vgpr46_vgpr47' } 555body: | 556 bb.0: 557 %0 = IMPLICIT_DEF 558 %1 = IMPLICIT_DEF 559 %2 = IMPLICIT_DEF 560 %5 = IMPLICIT_DEF 561 %6 = IMPLICIT_DEF 562 %7 = IMPLICIT_DEF 563 %8 = IMPLICIT_DEF 564 %9 = IMPLICIT_DEF 565 %10 = IMPLICIT_DEF 566 %11 = IMPLICIT_DEF 567 %12 = IMPLICIT_DEF 568 %13 = IMPLICIT_DEF 569 %14 = IMPLICIT_DEF 570 %15 = IMPLICIT_DEF 571 %3 = V_ADD_F64 0, %0.sub2_sub3:vreg_128, 0, %1:vreg_64, 0, 0, implicit $mode, implicit $exec 572 %4 = V_ADD_F64 0, %0.sub0_sub1:vreg_128, 0, %2:vreg_64, 0, 0, implicit $mode, implicit $exec 573 S_ENDPGM 0 574... 575