1# RUN: llc -o - %s -mtriple=amdgcn-amd-amdhsa-opencl -run-pass=simple-register-coalescing | FileCheck %s
2---
3# Checks for a bug where subregister liveranges were not properly pruned for
4# an IMPLCITI_DEF that gets removed completely.
5#
6# CHECK-LABEL: name: func
7# IMPLICIT_DEF should be gone without llc hitting assertion failures.
8# CHECK-NOT: IMPLICIT_DEF
9name: func
10tracksRegLiveness: true
11body: |
12  bb.0:
13    undef %5.sub1 = V_MOV_B32_e32 0, implicit $exec
14    %6 = COPY %5
15    S_CBRANCH_VCCZ %bb.2, implicit undef $vcc
16
17  bb.1:
18    %1 : sreg_32_xm0 = S_MOV_B32 0
19    undef %0.sub0 : sreg_64 = COPY %1
20    %0.sub1 = COPY %1
21    %4 : vreg_64 = COPY killed %0
22    %5 : vreg_64 = IMPLICIT_DEF
23    %6 : vreg_64 = COPY killed %4
24
25  bb.2:
26    %2 : vgpr_32 = V_CVT_F32_I32_e32 killed %5.sub1, implicit $exec
27
28  bb.3:
29    %3 : vgpr_32 = V_CVT_F32_I32_e32 killed %6.sub1, implicit $exec
30    S_ENDPGM
31...
32