1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -verify-coalescing -run-pass=register-coalescer -o - %s | FileCheck %s
4 # Check that there's no "Live segment doesn't end at a valid
5 # instruction" failure after coalescing %0 into %2, which is
6 # ultimately a pair of dead copies.
9 name: coalesce_into_dead_subreg_copy
10 tracksRegLiveness: true
13 scratchRSrcReg: '$sgpr0_sgpr1_sgpr2_sgpr3'
14 stackPtrOffsetReg: '$sgpr32'
17 ; CHECK-LABEL: name: coalesce_into_dead_subreg_copy
19 ; CHECK-NEXT: successors: %bb.1(0x80000000)
21 ; CHECK-NEXT: dead [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM undef %1:sgpr_64, 24, 0 :: (dereferenceable invariant load (s64), addrspace 4)
22 ; CHECK-NEXT: S_BRANCH %bb.1
26 %0:sreg_64_xexec = S_LOAD_DWORDX2_IMM undef %1:sgpr_64, 24, 0 :: (dereferenceable invariant load (s64), addrspace 4)
27 undef %2.sub0:sreg_64 = COPY %0.sub0:sreg_64_xexec
28 %2.sub1:sreg_64 = COPY killed %0.sub1:sreg_64_xexec