1# RUN: llc -march=amdgcn -verify-machineinstrs -run-pass si-insert-waitcnts -o - %s | FileCheck -check-prefixes=GCN %s
2
3# GCN-LABEL: name: irreducible_loop{{$}}
4# GCN: S_LOAD_DWORDX4_IMM
5# GCN: S_WAITCNT 127{{$}}
6# GCN: S_BUFFER_LOAD_DWORD_IMM
7# GCN: S_WAITCNT 127{{$}}
8# GCN: S_CMP_GE_I32
9--- |
10
11  define amdgpu_ps void @irreducible_loop() {
12  main:
13    ret void
14  }
15
16...
17---
18name:            irreducible_loop
19body:             |
20  bb.0:
21    successors: %bb.3, %bb.2
22
23    S_CBRANCH_VCCZ %bb.2, implicit $vcc
24    S_BRANCH %bb.3
25
26  bb.1:
27    successors: %bb.3, %bb.2
28
29    S_CBRANCH_VCCNZ %bb.3, implicit $vcc
30
31  bb.2:
32    successors: %bb.3
33
34    renamable $sgpr4_sgpr5_sgpr6_sgpr7 = S_LOAD_DWORDX4_IMM renamable $sgpr0_sgpr1, 0, 0
35    renamable $sgpr3 = S_BUFFER_LOAD_DWORD_IMM killed renamable $sgpr4_sgpr5_sgpr6_sgpr7, 0, 0
36
37  bb.3:
38    successors: %bb.1, %bb.4
39
40    S_CMP_GE_I32 renamable $sgpr2, renamable $sgpr3, implicit-def $scc
41    S_CBRANCH_SCC0 %bb.1, implicit killed $scc
42
43  bb.4:
44
45    S_ENDPGM
46
47...
48