llvm/llvm/test/CodeGen/AMDGPU/greedy-remark-crash-unassigned-reg.mir

# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 \
# RUN:   -start-before=greedy,0 -stop-after=virtregrewriter,0 -pass-remarks='.*' -pass-remarks-output=%t.yaml -o /dev/null %s
# RUN: FileCheck %s < %t.yaml

# CHECK: Name:            SpillReloadCopies
# CHECK-NEXT: Function:        func
# CHECK-NEXT: Args:
# CHECK-NEXT: - NumVRCopies:     '3'
# CHECK-NEXT: - String:          ' virtual registers copies '

# Make sure the remarks do not crash with subregisters on unassigned
# virtual register copies.

---
name:            func
tracksRegLiveness: true
body:             |
  bb.0:
    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3, $sgpr1

  ; Unassigned dest with subreg
  undef %0.sub0:vreg_64 = COPY $vgpr0_vgpr1

  ; unassigned src and dest with subregs
  undef %1.sub1:vreg_64 = COPY %0.sub0

   %2:vreg_64 = COPY $vgpr2_vgpr3

  ; Unassigned src with subregs
  $vgpr0 = COPY %2.sub0

  ; Dummy SGPR to allocate to ensure allocation ran.
  %3:sreg_32 = COPY $sgpr1
  S_ENDPGM 0, implicit %0, implicit %1, implicit $vgpr0, implicit %3

...