1 # RUN: llc -o - -march=amdgcn -run-pass mir-canonicalizer -x mir %s | FileCheck %s
3 # CHECK: %namedVReg4354:vgpr_32 = COPY $vgpr0
4 # CHECK: %namedVReg1352:vgpr_32 = COPY %namedVReg4353
5 # CHECK-NEXT: %namedVReg1358:vgpr_32 = COPY %namedVReg1361
6 # CHECK-NEXT: %namedVReg1359:vgpr_32 = COPY %namedVReg1362
7 # CHECK-NEXT: %namedVReg1353:vreg_64 = REG_SEQUENCE %namedVReg4354, %subreg.sub0, %namedVReg1352, %subreg.sub1
8 # CHECK-NEXT: %namedVReg1354:sgpr_128 = REG_SEQUENCE %namedVReg4354, %subreg.sub0, %namedVReg1352, %subreg.sub1, %namedVReg1358, %subreg.sub2, %namedVReg1359, %subreg.sub3
9 # This tests for the itereator invalidation fix (reviews.llvm.org/D62713)
10 # CHECK-NEXT: BUFFER_STORE_DWORD_ADDR64 %namedVReg1352, %namedVReg1353, %namedVReg1354, 0, 0, 0, 0, 0, 0, implicit $exec
16 %10:sreg_32_xm0 = S_MOV_B32 61440
17 %11:sreg_32_xm0 = S_MOV_B32 0
18 %3:vgpr_32 = COPY $vgpr0
20 %vreg123_0:vgpr_32 = COPY %3
21 %0:sgpr_64 = COPY $sgpr0_sgpr1
22 %vreg123_1:vgpr_32 = COPY %11
23 %27:vreg_64 = REG_SEQUENCE %vreg123_0, %subreg.sub0, %vreg123_1, %subreg.sub1
24 %4:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 9, 0, 0
25 %vreg123_2:vgpr_32 = COPY %4
26 %5:sreg_64_xexec = S_LOAD_DWORDX2_IMM %0, 11, 0, 0
27 %vreg123_3:vgpr_32 = COPY %5
28 %16:sgpr_128 = REG_SEQUENCE killed %vreg123_0, %subreg.sub0, %vreg123_1, %subreg.sub1, %vreg123_2, %subreg.sub2, %vreg123_3, %subreg.sub3
30 BUFFER_STORE_DWORD_ADDR64 %vreg123_1, %27, killed %16, 0, 0, 0, 0, 0, 0, implicit $exec