1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -march=amdgcn -mcpu=gfx900 -verify-machineinstrs -run-pass=si-insert-waitcnts -o - %s | FileCheck -check-prefix=GCN %s
3
4# Make sure no waitcnt is inserted for meta instruction uses.
5
6---
7
8name: waitcnt_kill
9
10body:             |
11  bb.0:
12    liveins: $vgpr0_vgpr1
13    ; GCN-LABEL: name: waitcnt_kill
14    ; GCN: S_WAITCNT 0
15    ; GCN: $vgpr0 = GLOBAL_LOAD_DWORD $vgpr0_vgpr1, 0, 0, 0, 0, implicit $exec
16    ; GCN: KILL $vgpr0
17    $vgpr0 = GLOBAL_LOAD_DWORD $vgpr0_vgpr1, 0, 0, 0, 0, implicit $exec
18    KILL $vgpr0
19...
20
21---
22
23name: waitcnt_implicit_def
24
25body:             |
26  bb.0:
27    liveins: $vgpr0_vgpr1
28    ; GCN-LABEL: name: waitcnt_implicit_def
29    ; GCN: S_WAITCNT 0
30    ; GCN: $vgpr0 = GLOBAL_LOAD_DWORD $vgpr0_vgpr1, 0, 0, 0, 0, implicit $exec
31    ; GCN: $vgpr0 = IMPLICIT_DEF
32    $vgpr0 = GLOBAL_LOAD_DWORD $vgpr0_vgpr1, 0, 0, 0, 0, implicit $exec
33    $vgpr0 = IMPLICIT_DEF
34...
35
36---
37
38name: waitcnt_eh_label
39
40body:             |
41  bb.0:
42    liveins: $vgpr0_vgpr1, $vgpr2
43    ; GCN-LABEL: name: waitcnt_eh_label
44    ; GCN: S_WAITCNT 0
45    ; GCN: $vgpr0 = GLOBAL_LOAD_DWORD $vgpr0_vgpr1, 0, 0, 0, 0, implicit $exec
46    ; GCN: EH_LABEL <mcsymbol Ltmp0>, implicit $vgpr0
47    $vgpr0 = GLOBAL_LOAD_DWORD $vgpr0_vgpr1, 0, 0, 0, 0, implicit $exec
48    EH_LABEL <mcsymbol Ltmp0>, implicit $vgpr0
49
50...
51
52---
53
54name: waitcnt_cfi
55
56body:             |
57  bb.0:
58    liveins: $vgpr0_vgpr1, $vgpr2
59    ; GCN-LABEL: name: waitcnt_cfi
60    ; GCN: S_WAITCNT 0
61    ; GCN: $vgpr0 = GLOBAL_LOAD_DWORD $vgpr0_vgpr1, 0, 0, 0, 0, implicit $exec
62    ; GCN: CFI_INSTRUCTION offset $vgpr0_lo16, 16
63    $vgpr0 = GLOBAL_LOAD_DWORD $vgpr0_vgpr1, 0, 0, 0, 0, implicit $exec
64    CFI_INSTRUCTION offset $vgpr0, 16
65
66...
67