1# RUN: llc -march=amdgcn -mcpu=gfx908 -run-pass=postra-machine-sink -verify-machineinstrs -o - %s | FileCheck %s
2
3# Don't sink copy that writes sub-register of another copy source register
4# CHECK-LABEL: name: donotsinkcopy
5# CHECK-LABEL: bb.0:
6# CHECK: renamable $sgpr1 = COPY renamable $sgpr2
7# CHECK-LABEL: bb.1:
8# CHECK: liveins: $sgpr0_sgpr1:0x000000000000000F
9# CHECK: renamable $vgpr1_vgpr2 = COPY renamable $sgpr0_sgpr1
10
11---
12name: donotsinkcopy
13tracksRegLiveness: true
14body: |
15  bb.0:
16    liveins: $sgpr0, $sgpr2, $vgpr3
17    S_CMP_LT_U32 renamable $sgpr2, target-flags(amdgpu-gotprel32-lo) 2, implicit-def $scc
18    renamable $sgpr1 = COPY renamable $sgpr2
19    renamable $vgpr1_vgpr2 = COPY renamable $sgpr0_sgpr1
20    S_CBRANCH_SCC0 %bb.2, implicit $scc
21
22  bb.1:
23    liveins: $vgpr2, $sgpr0_sgpr1:0x00000003
24    S_BRANCH %bb.4
25
26  bb.2:
27    liveins: $sgpr1
28
29  bb.4:
30   S_ENDPGM 0
31...
32