1 # RUN: llc -mtriple=amdgcn -mcpu=gfx900 -run-pass si-fix-sgpr-copies -o - %s | FileCheck -check-prefix=GCN %s
3 # GCN-LABEL: name: smrd_vgpr_offset_imm
4 # GCN: V_READFIRSTLANE_B32
5 # GCN: S_BUFFER_LOAD_DWORD_SGPR
7 name: smrd_vgpr_offset_imm
10 liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3, $vgpr0
12 %4:vgpr_32 = COPY $vgpr0
13 %3:sgpr_32 = COPY $sgpr3
14 %2:sgpr_32 = COPY $sgpr2
15 %1:sgpr_32 = COPY $sgpr1
16 %0:sgpr_32 = COPY $sgpr0
17 %5:sgpr_128 = REG_SEQUENCE %0, %subreg.sub0, %1, %subreg.sub1, %2, %subreg.sub2, %3, %subreg.sub3
18 %6:sreg_32_xm0 = S_MOV_B32 4095
20 %7:vgpr_32 = V_ADD_CO_U32_e32 %4, killed %8, implicit-def dead $vcc, implicit $exec
22 %9:sreg_32_xm0_xexec = S_BUFFER_LOAD_DWORD_SGPR killed %5, killed %10, 0
24 SI_RETURN_TO_EPILOG $vgpr0
27 # GCN-LABEL: name: smrd_vgpr_offset_imm_add_u32
28 # GCN: V_READFIRSTLANE_B32
29 # GCN: S_BUFFER_LOAD_DWORD_SGPR
31 name: smrd_vgpr_offset_imm_add_u32
34 liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3, $vgpr0
36 %4:vgpr_32 = COPY $vgpr0
37 %3:sgpr_32 = COPY $sgpr3
38 %2:sgpr_32 = COPY $sgpr2
39 %1:sgpr_32 = COPY $sgpr1
40 %0:sgpr_32 = COPY $sgpr0
41 %5:sgpr_128 = REG_SEQUENCE %0, %subreg.sub0, %1, %subreg.sub1, %2, %subreg.sub2, %3, %subreg.sub3
42 %6:sreg_32_xm0 = S_MOV_B32 4095
44 %7:vgpr_32 = V_ADD_U32_e32 %4, killed %8, implicit $exec
46 %9:sreg_32_xm0_xexec = S_BUFFER_LOAD_DWORD_SGPR killed %5, killed %10, 0 :: (dereferenceable invariant load (s32))
48 SI_RETURN_TO_EPILOG $vgpr0