1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a -verify-regalloc -run-pass=greedy -o - %s | FileCheck %s
4 # Initially %2 starts out with 2 subranges (one for sub0, and one for
5 # the rest of the lanes). After %2 is split, after refineSubRanges the
6 # newly created register has a different set of lane masks since the
7 # copy bundle uses 2 different defs to cover the register. This was
8 # fixed by doing refineSubRanges after all the COPYs being inserted.
11 name: subrange_for_this_mask_not_found
12 tracksRegLiveness: true
14 scratchRSrcReg: '$sgpr0_sgpr1_sgpr2_sgpr3'
15 stackPtrOffsetReg: '$sgpr32'
18 ; CHECK-LABEL: name: subrange_for_this_mask_not_found
20 ; CHECK-NEXT: successors: %bb.1(0x80000000)
22 ; CHECK-NEXT: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
23 ; CHECK-NEXT: [[DEF1:%[0-9]+]]:vreg_1024_align2 = IMPLICIT_DEF
24 ; CHECK-NEXT: [[COPY:%[0-9]+]]:av_1024_align2 = COPY [[DEF1]]
27 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
29 ; CHECK-NEXT: dead [[DEF2:%[0-9]+]]:vreg_64 = IMPLICIT_DEF
30 ; CHECK-NEXT: S_NOP 0, implicit [[DEF1]]
31 ; CHECK-NEXT: S_NOP 0, implicit [[DEF1]]
32 ; CHECK-NEXT: [[DEF3:%[0-9]+]]:vreg_1024_align2 = IMPLICIT_DEF
33 ; CHECK-NEXT: S_CBRANCH_VCCNZ %bb.1, implicit undef $vcc
36 ; CHECK-NEXT: successors: %bb.3(0x80000000)
38 ; CHECK-NEXT: undef %6.sub1_sub2_sub3_sub4_sub5_sub6_sub7_sub8_sub9_sub10_sub11_sub12_sub13_sub14_sub15_sub16:av_1024_align2 = COPY [[COPY]].sub1_sub2_sub3_sub4_sub5_sub6_sub7_sub8_sub9_sub10_sub11_sub12_sub13_sub14_sub15_sub16 {
39 ; CHECK-NEXT: internal %6.sub17_lo16_sub17_hi16_sub18_lo16_sub18_hi16_sub19_lo16_sub19_hi16_sub20_lo16_sub20_hi16_sub21_lo16_sub21_hi16_sub22_lo16_sub22_hi16_sub23_lo16_sub23_hi16_sub24_lo16_sub24_hi16_sub25_lo16_sub25_hi16_sub26_lo16_sub26_hi16_sub27_lo16_sub27_hi16_sub28_lo16_sub28_hi16:av_1024_align2 = COPY [[COPY]].sub17_lo16_sub17_hi16_sub18_lo16_sub18_hi16_sub19_lo16_sub19_hi16_sub20_lo16_sub20_hi16_sub21_lo16_sub21_hi16_sub22_lo16_sub22_hi16_sub23_lo16_sub23_hi16_sub24_lo16_sub24_hi16_sub25_lo16_sub25_hi16_sub26_lo16_sub26_hi16_sub27_lo16_sub27_hi16_sub28_lo16_sub28_hi16
40 ; CHECK-NEXT: internal %6.sub29_sub30_sub31:av_1024_align2 = COPY [[COPY]].sub29_sub30_sub31
42 ; CHECK-NEXT: %6.sub0:av_1024_align2 = IMPLICIT_DEF
43 ; CHECK-NEXT: S_NOP 0, implicit %6.sub0
46 ; CHECK-NEXT: successors: %bb.4(0x80000000)
48 ; CHECK-NEXT: S_NOP 0, implicit %6
51 ; CHECK-NEXT: successors: %bb.3(0x40000000), %bb.5(0x40000000)
53 ; CHECK-NEXT: [[DEF3:%[0-9]+]]:av_1024_align2 = IMPLICIT_DEF
54 ; CHECK-NEXT: S_CBRANCH_VCCNZ %bb.3, implicit undef $vcc
57 ; CHECK-NEXT: undef %4.sub0:vreg_1024_align2 = COPY [[DEF]]
58 ; CHECK-NEXT: S_NOP 0, implicit %4
60 %0:vgpr_32 = IMPLICIT_DEF
61 %1:vreg_1024_align2 = IMPLICIT_DEF
62 %2:vreg_1024_align2 = COPY %1
65 %5:vreg_64 = IMPLICIT_DEF
68 %1:vreg_1024_align2 = IMPLICIT_DEF
69 S_CBRANCH_VCCNZ %bb.1, implicit undef $vcc
72 %2.sub0:vreg_1024_align2 = IMPLICIT_DEF
73 S_NOP 0, implicit %2.sub0
79 %2:vreg_1024_align2 = IMPLICIT_DEF
80 S_CBRANCH_VCCNZ %bb.4, implicit undef $vcc
83 undef %4.sub0:vreg_1024_align2 = COPY %0