1# RUN: llc -march=amdgcn -mcpu=hawaii -verify-machineinstrs -run-pass si-insert-waitcnts -o - %s | FileCheck -check-prefixes=GCN %s
2
3# GCN-LABEL: name: test{{$}}
4# GCN: S_WAITCNT -16257
5# GCN: DS_READ2_B32
6# GCN: DS_READ2_B32
7# GCN: S_WAITCNT 383{{$}}
8# GCN-NEXT: $vgpr1 = V_OR_B32_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
12--- |
13  define amdgpu_cs void @test() {
14    ret void
15  }
16...
17---
18name:            test
19body:             |
20  bb.0:
21    liveins: $sgpr0, $sgpr1, $vgpr0
22
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
25    S_WAITCNT -16257
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_OR_B32_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 :: (store 16)
36    S_ENDPGM 0
37...
38