[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / llvm / test / CodeGen / AMDGPU / waitcnt-skip-meta.mir
blob00a2b78e903f6fa312ff922661f2c4f478542684
1 # RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass si-insert-waitcnts  %s -o - | FileCheck %s
3 # Ensure we insert waitcnts after any meta instructions at the start of
4 # non-kernel functions. Without this, the inserted waitcnts can affect e.g. the
5 # PC ranges covered by CFI and debug values.
7 ---
8 # CHECK-LABEL: name: skip_implicit_def{{$}}
9 # CHECK: IMPLICIT_DEF
10 # CHECK: S_WAITCNT
11 name: skip_implicit_def
12 machineFunctionInfo:
13 body: |
14   bb.0:
15     $sgpr0 = IMPLICIT_DEF
16 ...
17 ---
18 # CHECK-LABEL: name: skip_kill{{$}}
19 # CHECK: KILL
20 # CHECK: S_WAITCNT
21 name: skip_kill
22 machineFunctionInfo:
23 body: |
24   bb.0:
25     KILL $sgpr0
26 ...
27 ---
28 # CHECK-LABEL: name: skip_cfi{{$}}
29 # CHECK: CFI_INSTRUCTION
30 # CHECK: S_WAITCNT
31 name: skip_cfi
32 machineFunctionInfo:
33 body: |
34   bb.0:
35     CFI_INSTRUCTION undefined $sgpr0
36 ...
37 ---
38 # CHECK-LABEL: name: skip_eh_label{{$}}
39 # CHECK: EH_LABEL
40 # CHECK: S_WAITCNT
41 name: skip_eh_label
42 machineFunctionInfo:
43 body: |
44   bb.0:
45     EH_LABEL 0
46 ...
47 ---
48 # CHECK-LABEL: name: skip_gc_label{{$}}
49 # CHECK: GC_LABEL
50 # CHECK: S_WAITCNT
51 name: skip_gc_label
52 machineFunctionInfo:
53 body: |
54   bb.0:
55     GC_LABEL 0
56 ...
57 ---
58 # CHECK-LABEL: name: skip_dbg_value{{$}}
59 # CHECK: DBG_VALUE
60 # CHECK: S_WAITCNT
61 name: skip_dbg_value
62 machineFunctionInfo:
63 body: |
64   bb.0:
65     DBG_VALUE 0
66 ...
67 ---
68 # CHECK-LABEL: name: skip_dbg_label{{$}}
69 # CHECK: DBG_LABEL
70 # CHECK: S_WAITCNT
71 name: skip_dbg_label
72 machineFunctionInfo:
73 body: |
74   bb.0:
75     DBG_LABEL 0
76 ...
77 ---
78 # CHECK-LABEL: name: skip_lifetime_start{{$}}
79 # CHECK: LIFETIME_START
80 # CHECK: S_WAITCNT
81 name: skip_lifetime_start
82 machineFunctionInfo:
83 body: |
84   bb.0:
85     LIFETIME_START 0
86 ...
87 ---
88 # CHECK-LABEL: name: skip_lifetime_end{{$}}
89 # CHECK: LIFETIME_END
90 # CHECK: S_WAITCNT
91 name: skip_lifetime_end
92 machineFunctionInfo:
93 body: |
94   bb.0:
95     LIFETIME_END 0
96 ...