File: gfx940-hazards.mir

package info (click to toggle)
llvm-toolchain-15 1%3A15.0.6-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,554,644 kB
  • sloc: cpp: 5,922,452; ansic: 1,012,136; asm: 674,362; python: 191,568; objc: 73,855; f90: 42,327; lisp: 31,913; pascal: 11,973; javascript: 10,144; sh: 9,421; perl: 7,447; ml: 5,527; awk: 3,523; makefile: 2,520; xml: 885; cs: 573; fortran: 567
file content (243 lines) | stat: -rw-r--r-- 7,762 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
# RUN: llc -march=amdgcn -mcpu=gfx940 -verify-machineinstrs -run-pass post-RA-hazard-rec %s -o - | FileCheck -check-prefix=GCN %s

# GCN-LABEL: name: trans32_write_non_trans32_read
# GCN:      V_RCP_F32
# GCN-NEXT: S_NOP 0
# GCN-NEXT: V_MUL_F32
name:            trans32_write_non_trans32_read
body:             |
  bb.0:
    $vgpr1 = V_RCP_F32_e32 $vgpr0, implicit $mode, implicit $exec
    $vgpr2 = V_MUL_F32_e32 $vgpr1, $vgpr2, implicit $mode, implicit $exec
...

# GCN-LABEL: name: trans32_write_trans_read
# GCN:      V_SIN_F32
# GCN-NEXT: V_COS_F32
name:            trans32_write_trans_read
body:             |
  bb.0:
    $vgpr0 = V_SIN_F32_e32 $vgpr1, implicit $mode, implicit $exec
    $vgpr2 = V_COS_F32_e32 $vgpr0, implicit $mode, implicit $exec
...

# GCN-LABEL: name: trans64_write_non_trans_read
# GCN:      V_RCP_F64
# GCN-NEXT: S_NOP 0
# GCN-NEXT: V_OR_B32
name:            trans64_write_non_trans_read
body:             |
  bb.0:
    $vgpr0_vgpr1 = V_RCP_F64_e32 $vgpr2_vgpr3, implicit $mode, implicit $exec
    $vgpr4 = V_OR_B32_e32 $vgpr1, $vgpr5, implicit $mode, implicit $exec
...

# GCN-LABEL: name: trans32_write_non_trans64_read
# GCN:      V_EXP_F32
# GCN-NEXT: S_NOP 0
# GCN-NEXT: V_MUL_F64
name:            trans32_write_non_trans64_read
body:             |
  bb.0:
    $vgpr1 = V_EXP_F32_e32 $vgpr0, implicit $mode, implicit $exec
    $vgpr2_vgpr3 = V_MUL_F64_e64 0, $vgpr0_vgpr1, 0, $vgpr2_vgpr3, 0, 0, implicit $mode, implicit $exec
...

# GCN-LABEL: name: opsel_hi16_write_valu_read
# GCN:      V_ADD_I16
# GCN-NEXT: S_NOP 0
# GCN-NEXT: V_MUL_F64
name:            opsel_hi16_write_valu_read
body:             |
  bb.0:
    $vgpr0 = V_ADD_I16_e64 8, $vgpr1, 0, $vgpr2, 0, 0, implicit $exec
    $vgpr4_vgpr5 = V_MUL_F64_e64 0, $vgpr0_vgpr1, 0, $vgpr2_vgpr3, 0, 0, implicit $mode, implicit $exec
...

# GCN-LABEL: name: opsel_lo16_write_valu_read
# GCN:      V_ADD_I16
# GCN-NEXT: V_MUL_F64
name:            opsel_lo16_write_valu_read
body:             |
  bb.0:
    $vgpr0 = V_ADD_I16_e64 0, $vgpr1, 0, $vgpr2, 0, 0, implicit $exec
    $vgpr4_vgpr5 = V_MUL_F64_e64 0, $vgpr0_vgpr1, 0, $vgpr2_vgpr3, 0, 0, implicit $mode, implicit $exec
...

# GCN-LABEL: name: sdwa_hi16_write_valu_read
# GCN:      V_MOV_B32_sdwa
# GCN-NEXT: S_NOP 0
# GCN-NEXT: V_MOV_B32_e32
name:            sdwa_hi16_write_valu_read
body:             |
  bb.0:
    $vgpr0 = V_MOV_B32_sdwa 0, $vgpr1, 0, 5, 2, 5, implicit $vgpr0(tied-def 0), implicit $exec
    $vgpr3 = V_MOV_B32_e32 $vgpr0, implicit $exec
...

# GCN-LABEL: name: sdwa_lo16_write_valu_read
# GCN:      V_MOV_B32_sdwa
# GCN-NEXT: S_NOP 0
# GCN-NEXT: V_MOV_B32_e32
name:            sdwa_lo16_write_valu_read
body:             |
  bb.0:
    $vgpr0 = V_MOV_B32_sdwa 0, $vgpr1, 0, 4, 2, 5, implicit $vgpr0(tied-def 0), implicit $exec
    $vgpr3 = V_MOV_B32_e32 $vgpr0, implicit $exec
...

# GCN-LABEL: name: sdwa_dword_write_valu_read
# GCN:      V_MOV_B32_sdwa
# GCN-NEXT: V_MOV_B32_e32
name:            sdwa_dword_write_valu_read
body:             |
  bb.0:
    $vgpr0 = V_MOV_B32_sdwa 0, $vgpr1, 0, 6, 2, 5, implicit $vgpr0(tied-def 0), implicit $exec
    $vgpr3 = V_MOV_B32_e32 $vgpr0, implicit $exec
...

# GCN-LABEL: name: sdwa_lo16_no_write_valu_read
# GCN:      V_CMP_EQ_U32_sdwa
# GCN-NEXT: V_MOV_B32_e32
name:            sdwa_lo16_no_write_valu_read
body:             |
  bb.0:
    $vcc = V_CMP_EQ_U32_sdwa 0, $vgpr1, 0, $vgpr0, 0, 5, 2, implicit $exec
    $vgpr3 = V_MOV_B32_e32 $vgpr0, implicit $exec
...

# GCN-LABEL: name: valu_write_sgpr_valu_read_as_constant
# GCN:      V_READFIRSTLANE_B32
# GCN-NEXT: S_NOP 1
# GCN-NEXT: V_MOV_B32_e32
name:            valu_write_sgpr_valu_read_as_constant
body:             |
  bb.0:
    $sgpr0 = V_READFIRSTLANE_B32 $vgpr0, implicit $exec
    $vgpr1 = V_MOV_B32_e32 $sgpr0, implicit $exec
...

# GCN-LABEL: name: valu_write_vcc_valu_read_as_constant
# GCN:      V_CMP_NE_U32_e32
# GCN-NEXT: S_NOP 1
# GCN-NEXT: V_ADDC_U32_e32
name:            valu_write_vcc_valu_read_as_constant
body:             |
  bb.0:
    V_CMP_NE_U32_e32 0, $vgpr0, implicit-def $vcc, implicit $exec
    $vgpr1 = V_ADDC_U32_e32 0, $vgpr1, implicit-def $vcc, implicit $vcc, implicit $exec
...

# GCN-LABEL: name: valu_write_sgpr_readlane_read_as_laneselect
# GCN:      V_READFIRSTLANE_B32
# GCN-NEXT: S_NOP 3
# GCN-NEXT: V_READLANE_B32
name:            valu_write_sgpr_readlane_read_as_laneselect
body:             |
  bb.0:
    $sgpr0 = V_READFIRSTLANE_B32 $vgpr0, implicit $exec
    $sgpr1 = V_READLANE_B32 $vgpr1, $sgpr0, implicit $exec
...

# GCN-LABEL: name: valu_write_sgpr_writelane_read_as_laneselect
# GCN:      V_ADD_CO_U32_e64
# GCN-NEXT: S_NOP 3
# GCN-NEXT: V_WRITELANE_B32
name:            valu_write_sgpr_writelane_read_as_laneselect
body:             |
  bb.0:
    $vgpr0, $sgpr0_sgpr1 = V_ADD_CO_U32_e64 $vgpr0, 1, 0, implicit $exec
    $vgpr1 = V_WRITELANE_B32 0, $sgpr0, $vgpr1, implicit $exec
...

# GCN-LABEL: name: vcmpx_write_exec_valu_read_as_constant
# GCN:      V_CMPX_EQ_I32_e32
# GCN-NEXT: S_NOP 1
# GCN-NEXT: V_MOV_B32_e32
name:            vcmpx_write_exec_valu_read_as_constant
body:             |
  bb.0:
    implicit $exec, implicit $vcc = V_CMPX_EQ_I32_e32 $vgpr0, $vgpr1, implicit $exec
    $vgpr1 = V_MOV_B32_e32 $exec_lo, implicit $exec
...

# GCN-LABEL: name: vcmpx_write_exec_readlane
# GCN:      V_CMPX_EQ_I32_e32
# GCN-NEXT: S_NOP 3
# GCN-NEXT: V_READLANE_B32
name:            vcmpx_write_exec_readlane
body:             |
  bb.0:
    implicit $exec, implicit $vcc = V_CMPX_EQ_I32_e32 $vgpr0, $vgpr1, implicit $exec
    $sgpr1 = V_READLANE_B32 $vgpr1, 0, implicit $exec
...

# GCN-LABEL: name: vcmpx_write_exec_readfirstlane
# GCN:      V_CMPX_EQ_I32_e32
# GCN-NEXT: S_NOP 3
# GCN-NEXT: V_READFIRSTLANE_B32
name:            vcmpx_write_exec_readfirstlane
body:             |
  bb.0:
    implicit $exec, implicit $vcc = V_CMPX_EQ_I32_e32 $vgpr0, $vgpr1, implicit $exec
    $sgpr1 = V_READFIRSTLANE_B32 $vgpr1, implicit $exec
...

# GCN-LABEL: name: vcmpx_write_exec_writelane
# GCN:      V_CMPX_EQ_I32_e32
# GCN-NEXT: S_NOP 3
# GCN-NEXT: V_WRITELANE_B32
name:            vcmpx_write_exec_writelane
body:             |
  bb.0:
    implicit $exec, implicit $vcc = V_CMPX_EQ_I32_e32 $vgpr0, $vgpr1, implicit $exec
    $vgpr1 = V_WRITELANE_B32 0, $sgpr0, $vgpr1, implicit $exec
...

# GCN-LABEL: name: valu_write_vgpr_readlane_read
# GCN:      V_ADD_CO_U32_e32
# GCN-NEXT: S_NOP 0
# GCN-NEXT: V_READLANE_B32
name:            valu_write_vgpr_readlane_read
body:             |
  bb.0:
    $vgpr1 = V_ADD_CO_U32_e32 $vgpr0, $vgpr0, implicit-def $vcc, implicit $exec
    $sgpr1 = V_READLANE_B32 $vgpr1, $sgpr0, implicit $exec
...

# GCN-LABEL: name: valu_write_vgpr_readfirstlane_read
# GCN:      V_ADD_CO_U32_e32
# GCN-NEXT: S_NOP 0
# GCN-NEXT: V_READFIRSTLANE_B32
name:            valu_write_vgpr_readfirstlane_read
body:             |
  bb.0:
    $vgpr1 = V_ADD_CO_U32_e32 $vgpr0, $vgpr0, implicit-def $vcc, implicit $exec
    $sgpr1 = V_READFIRSTLANE_B32 $vgpr1, implicit $exec
...

# GCN-LABEL: name: global_store_dwordx4_data_hazard
# GCN:      GLOBAL_STORE_DWORDX4
# GCN-NEXT: S_NOP 1
# GCN-NEXT: V_MOV_B32_e32
name: global_store_dwordx4_data_hazard

body:             |
  bb.0:
    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
    GLOBAL_STORE_DWORDX4 $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5, 0, 0, implicit $exec
    $vgpr2 = V_MOV_B32_e32 0, implicit $exec
...

# GCN-LABEL: name: global_store_dwordx3_data_hazard
# GCN:      GLOBAL_STORE_DWORDX3
# GCN-NEXT: S_NOP 1
# GCN-NEXT: V_MOV_B32_e32
name: global_store_dwordx3_data_hazard

body:             |
  bb.0:
    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4
    GLOBAL_STORE_DWORDX3 $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4, 0, 0, implicit $exec
    $vgpr2 = V_MOV_B32_e32 0, implicit $exec
...