1 # RUN: llc -march=amdgcn -verify-machineinstrs -run-pass si-insert-waitcnts -o - %s | FileCheck -check-prefixes=GCN %s
3 # GCN-LABEL: name: test{{$}}
4 # GCN: S_WAITCNT -16257
7 # GCN: S_WAITCNT 383{{$}}
8 # GCN-NEXT: $vgpr1 = V_ADD_U32_e32 1, killed $vgpr1, implicit $exec
9 # GCN-NEXT: $vgpr1 = V_MAX_U32_e32 killed $vgpr0, killed $vgpr1, implicit $exec
10 # GCN-NEXT: S_WAITCNT 127{{$}}
11 # GCN-NEXT: $vgpr1 = V_MAX_U32_e32 killed $vgpr2, killed $vgpr1, implicit $exec
13 define amdgpu_cs void @test() {
21 liveins: $sgpr0, $sgpr1, $vgpr0
23 renamable $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = S_LOAD_DWORDX8_IMM renamable $sgpr0_sgpr1, 480, 0, 0
24 renamable $vgpr13 = V_LSHLREV_B32_e32 2, killed $vgpr0, implicit $exec
26 renamable $vgpr0_vgpr1 = DS_READ2_B32 renamable $vgpr13, 0, 1, 0, implicit $m0, implicit $exec
27 renamable $vgpr2_vgpr3 = DS_READ2_B32 renamable $vgpr13, 2, 3, 0, implicit $m0, implicit $exec
28 renamable $vgpr1 = V_ADD_U32_e32 1, killed $vgpr1, implicit $exec
29 renamable $vgpr1 = V_MAX_U32_e32 killed $vgpr0, killed $vgpr1, implicit $exec
30 renamable $vgpr1 = V_MAX_U32_e32 killed $vgpr2, killed $vgpr1, implicit $exec
31 renamable $vgpr1 = V_MAX_U32_e32 killed $vgpr3, killed $vgpr1, implicit $exec
32 $vgpr0 = V_MOV_B32_e32 $vgpr1, implicit $exec, implicit $exec
33 $vgpr2 = V_MOV_B32_e32 $vgpr1, implicit $exec, implicit $exec
34 $vgpr3 = V_MOV_B32_e32 $vgpr1, implicit $exec, implicit $exec
35 IMAGE_STORE_V4_V2 killed renamable $vgpr0_vgpr1_vgpr2_vgpr3, killed renamable $vgpr0_vgpr1, killed renamable $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, 15, -1, 1, 0, 0, 0, 0, 0, 0, implicit $exec