1 # RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass=si-fold-operands,dead-mi-elimination -verify-machineinstrs %s -o - | FileCheck -check-prefix=GCN %s
5 # GCN-LABEL: name: fold_sgpr_to_sgpr_copy_full
6 # GCN: %0:sgpr_32 = IMPLICIT_DEF
7 # GCN-NEXT: S_STORE_DWORD_IMM %0, undef $sgpr10_sgpr11, 0, 0
9 name: fold_sgpr_to_sgpr_copy_full
13 %0:sgpr_32 = IMPLICIT_DEF
16 S_STORE_DWORD_IMM %2, undef $sgpr10_sgpr11, 0, 0
19 # GCN-LABEL: name: fold_sgpr_to_sgpr_copy_subreg
20 # GCN: %0:sreg_64 = IMPLICIT_DEF
21 # GCN-NEXT: %2:sgpr_32 = COPY %0.sub0
22 # GCN-NEXT: S_STORE_DWORD_IMM %2, undef $sgpr10_sgpr11, 0, 0
24 name: fold_sgpr_to_sgpr_copy_subreg
28 %0:sreg_64 = IMPLICIT_DEF
29 %1:sgpr_32 = COPY %0.sub0
31 S_STORE_DWORD_IMM %2, undef $sgpr10_sgpr11, 0, 0
34 # GCN-LABEL: name: fold_sgpr_to_sgpr_copy_subreg2
35 # GCN: %0:sreg_64 = IMPLICIT_DEF
36 # GCN-NEXT: %3:sreg_32_xm0_xexec = COPY %0.sub0
37 # GCN-NEXT: S_STORE_DWORD_IMM %3, undef $sgpr10_sgpr11, 0, 0
39 name: fold_sgpr_to_sgpr_copy_subreg2
43 %0:sreg_64 = IMPLICIT_DEF
44 %1:sgpr_32 = COPY %0.sub0
46 %3:sreg_32_xm0_xexec = COPY %2
47 S_STORE_DWORD_IMM %3, undef $sgpr10_sgpr11, 0, 0