1 # RUN: llc -march=amdgcn -run-pass si-fold-operands -verify-machineinstrs %s -o - | FileCheck -check-prefix=GCN %s
3 # GCN-LABEL: name: fold-imm-copy
4 # GCN: [[SREG:%[0-9+]]]:sreg_32_xm0 = S_MOV_B32 65535
5 # GCN: V_AND_B32_e32 [[SREG]]
9 tracksRegLiveness: true
12 liveins: $vgpr0, $sgpr0_sgpr1
13 %0:vgpr_32 = COPY $vgpr0
14 %1:sgpr_64 = COPY $sgpr0_sgpr1
15 %2:sreg_128 = S_LOAD_DWORDX4_IMM %1, 9, 0, 0
16 %3:sreg_32_xm0 = S_MOV_B32 2
17 %4:vgpr_32 = V_LSHLREV_B32_e64 killed %3, %0, implicit $exec
18 %5:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
19 %6:vreg_64 = REG_SEQUENCE killed %4, %subreg.sub0, killed %5, %subreg.sub1
20 %7:vgpr_32 = BUFFER_LOAD_DWORD_ADDR64 %6, %2, 0, 4, 0, 0, 0, 0, implicit $exec
21 %8:sreg_32_xm0 = S_MOV_B32 65535
23 %10:vgpr_32 = V_AND_B32_e32 %7, %9, implicit $exec