# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 2
# RUN: llc -mtriple=amdgcn-amd-amdhsa -verify-machineinstrs -run-pass=machine-cp -o - %s | FileCheck %s
# machine copy prop should not introduce use before def
---
name: back_copy_block
body: |
bb.0:
; CHECK-LABEL: name: back_copy_block
; CHECK: $vgpr20_vgpr21_vgpr22_vgpr23 = IMPLICIT_DEF
; CHECK-NEXT: $vgpr10_vgpr11_vgpr12_vgpr13 = IMPLICIT_DEF
; CHECK-NEXT: renamable $vgpr0_vgpr1 = V_MOV_B64_e64 killed $vgpr20_vgpr21, implicit $exec
; CHECK-NEXT: renamable $vgpr20 = V_MOV_B32_e32 killed $vgpr1, implicit $exec
; CHECK-NEXT: renamable $vgpr6_vgpr7_vgpr8_vgpr9 = COPY renamable $vgpr10_vgpr11_vgpr12_vgpr13
; CHECK-NEXT: renamable $vgpr20 = V_MOV_B32_e32 killed $vgpr6, implicit $exec
; CHECK-NEXT: S_ENDPGM 0, amdgpu_allvgprs
$vgpr20_vgpr21_vgpr22_vgpr23 = IMPLICIT_DEF
$vgpr10_vgpr11_vgpr12_vgpr13 = IMPLICIT_DEF
renamable $vgpr0_vgpr1 = V_MOV_B64_e64 killed renamable $vgpr20_vgpr21, implicit $exec
renamable $vgpr20 = V_MOV_B32_e32 killed renamable $vgpr1, implicit $exec
renamable $vgpr6_vgpr7_vgpr8_vgpr9 = COPY killed renamable $vgpr10_vgpr11_vgpr12_vgpr13
renamable $vgpr14_vgpr15 = COPY killed renamable $vgpr0_vgpr1
renamable $vgpr20 = V_MOV_B32_e32 killed renamable $vgpr6, implicit $exec
renamable $vgpr1_vgpr2_vgpr3_vgpr4 = COPY killed renamable $vgpr6_vgpr7_vgpr8_vgpr9
S_ENDPGM 0, amdgpu_allvgprs
...