• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: llc -march=amdgcn -mcpu=fiji -run-pass=si-peephole-sdwa -verify-machineinstrs -o - %s | FileCheck -check-prefix=VI -check-prefix=GFX89 -check-prefix=GCN %s
2# RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass=si-peephole-sdwa -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX9 -check-prefix=GFX89 -check-prefix=GCN %s
3
4# GFX89-LABEL: {{^}}name: vop1_instructions
5
6# GFX89: %{{[0-9]+}}:vgpr_32 = V_MOV_B32_sdwa 0, %{{[0-9]+}}, 0, 5, 0, 5, implicit $exec
7# GFX89: %{{[0-9]+}}:vgpr_32 = V_FRACT_F32_sdwa 0, %{{[0-9]+}}, 0, 0, 5, 0, 6, implicit $exec
8# GFX89: %{{[0-9]+}}:vgpr_32 = V_SIN_F32_sdwa 0, %{{[0-9]+}}, 0, 0, 5, 0, 5, implicit $exec
9# GFX89: %{{[0-9]+}}:vgpr_32 = V_CVT_U32_F32_sdwa 0, %{{[0-9]+}}, 0, 5, 0, 5, implicit $exec
10# GFX89: %{{[0-9]+}}:vgpr_32 = V_CVT_F32_I32_sdwa 0, %{{[0-9]+}}, 0, 0, 5, 0, 6, implicit $exec
11
12
13# GFX89: %{{[0-9]+}}:vgpr_32 = V_MOV_B32_sdwa 0, %{{[0-9]+}}, 0, 6, 0, 5, implicit $exec
14# GFX89: %{{[0-9]+}}:vgpr_32 = V_FRACT_F32_sdwa 0, %{{[0-9]+}}, 0, 0, 5, 0, 6, implicit $exec
15# GFX89: %{{[0-9]+}}:vgpr_32 = V_SIN_F32_sdwa 0, %{{[0-9]+}}, 0, 0, 5, 0, 5, implicit $exec
16# GFX89: %{{[0-9]+}}:vgpr_32 = V_CVT_U32_F32_sdwa 0, %{{[0-9]+}}, 0, 5, 0, 5, implicit $exec
17# GFX89: %{{[0-9]+}}:vgpr_32 = V_CVT_F32_I32_sdwa 0, %{{[0-9]+}}, 0, 0, 5, 0, 6, implicit $exec
18
19
20# VI: %{{[0-9]+}}:vgpr_32 = V_FRACT_F32_sdwa 1, %{{[0-9]+}}, 0, 0, 5, 0, 5, implicit $exec
21# VI: %{{[0-9]+}}:vgpr_32 = V_SIN_F32_sdwa 0, %{{[0-9]+}}, 1, 0, 5, 0, 5, implicit $exec
22# VI: %{{[0-9]+}}:vgpr_32 = V_CVT_U32_F32_sdwa 1, %{{[0-9]+}}, 0, 5, 0, 5, implicit $exec
23# VI: %{{[0-9]+}}:vgpr_32 = V_CVT_F32_I32_e64 %{{[0-9]+}}, 0, 1, implicit $exec
24
25# GFX9: %{{[0-9]+}}:vgpr_32 = V_FRACT_F32_sdwa 1, %{{[0-9]+}}, 0, 0, 5, 0, 5, implicit $exec
26# GFX9: %{{[0-9]+}}:vgpr_32 = V_SIN_F32_sdwa 0, %{{[0-9]+}}, 1, 0, 5, 0, 5, implicit $exec
27# GFX9: %{{[0-9]+}}:vgpr_32 = V_CVT_U32_F32_sdwa 1, %{{[0-9]+}}, 0, 5, 0, 5, implicit $exec
28# GFX9: %{{[0-9]+}}:vgpr_32 = V_CVT_F32_I32_sdwa 0, %{{[0-9]+}}, 0, 1, 5, 0, 5, implicit $exec
29
30
31---
32name:            vop1_instructions
33tracksRegLiveness: true
34registers:
35  - { id: 0, class: vreg_64 }
36  - { id: 1, class: vreg_64 }
37  - { id: 2, class: sreg_64 }
38  - { id: 3, class: vgpr_32 }
39  - { id: 4, class: sreg_32_xm0 }
40  - { id: 5, class: sreg_32_xm0 }
41  - { id: 6, class: sreg_32_xm0 }
42  - { id: 7, class: sreg_32_xm0 }
43  - { id: 8, class: sreg_32 }
44  - { id: 9, class: vgpr_32 }
45  - { id: 10, class: vgpr_32 }
46  - { id: 11, class: vgpr_32 }
47  - { id: 12, class: vgpr_32 }
48  - { id: 13, class: vgpr_32 }
49  - { id: 14, class: vgpr_32 }
50  - { id: 15, class: vgpr_32 }
51  - { id: 16, class: vgpr_32 }
52  - { id: 17, class: vgpr_32 }
53  - { id: 18, class: vgpr_32 }
54  - { id: 19, class: vgpr_32 }
55  - { id: 20, class: vgpr_32 }
56  - { id: 21, class: vgpr_32 }
57  - { id: 22, class: vgpr_32 }
58  - { id: 23, class: vgpr_32 }
59  - { id: 24, class: vgpr_32 }
60  - { id: 25, class: vgpr_32 }
61  - { id: 26, class: vgpr_32 }
62  - { id: 27, class: vgpr_32 }
63  - { id: 28, class: vgpr_32 }
64  - { id: 29, class: vgpr_32 }
65  - { id: 30, class: vgpr_32 }
66  - { id: 31, class: vgpr_32 }
67  - { id: 32, class: vgpr_32 }
68  - { id: 33, class: vgpr_32 }
69  - { id: 34, class: vgpr_32 }
70  - { id: 35, class: vgpr_32 }
71  - { id: 36, class: vgpr_32 }
72  - { id: 37, class: vgpr_32 }
73  - { id: 38, class: vgpr_32 }
74  - { id: 39, class: vgpr_32 }
75  - { id: 40, class: vgpr_32 }
76  - { id: 41, class: vgpr_32 }
77  - { id: 42, class: vgpr_32 }
78  - { id: 43, class: vgpr_32 }
79  - { id: 44, class: vgpr_32 }
80  - { id: 45, class: vgpr_32 }
81  - { id: 46, class: vgpr_32 }
82  - { id: 47, class: vgpr_32 }
83  - { id: 48, class: vgpr_32 }
84  - { id: 100, class: vgpr_32 }
85body:             |
86  bb.0:
87    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3, $sgpr30_sgpr31
88
89    %2 = COPY $sgpr30_sgpr31
90    %1 = COPY $vgpr2_vgpr3
91    %0 = COPY $vgpr0_vgpr1
92    %3 = FLAT_LOAD_DWORD %1, 0, 0, 0, implicit $exec, implicit $flat_scr :: (load 4)
93
94    %5 = S_MOV_B32 65535
95    %6 = S_MOV_B32 65535
96
97    %10 = V_LSHRREV_B32_e64 16, %3, implicit $exec
98    %11 = V_MOV_B32_e32 %10, implicit $exec
99    %12 = V_LSHLREV_B32_e64 16, %11, implicit $exec
100    %14 = V_FRACT_F32_e32 123, implicit $exec
101    %15 = V_LSHLREV_B32_e64 16, %14, implicit $exec
102    %16 = V_LSHRREV_B32_e64 16, %15, implicit $exec
103    %17 = V_SIN_F32_e32 %16, implicit $exec
104    %18 = V_LSHLREV_B32_e64 16, %17, implicit $exec
105    %19 = V_LSHRREV_B32_e64 16, %18, implicit $exec
106    %20 = V_CVT_U32_F32_e32 %19, implicit $exec
107    %21 = V_LSHLREV_B32_e64 16, %20, implicit $exec
108    %23 = V_CVT_F32_I32_e32 123, implicit $exec
109    %24 = V_LSHLREV_B32_e64 16, %23, implicit $exec
110
111    %25 = V_LSHRREV_B32_e64 16, %3, implicit $exec
112    %26 = V_MOV_B32_e64 %25, implicit $exec
113    %26 = V_LSHLREV_B32_e64 16, %26, implicit $exec
114    %27 = V_FRACT_F32_e64 0, %6, 0, 0, implicit $exec
115    %28 = V_LSHLREV_B32_e64 16, %27, implicit $exec
116    %29 = V_LSHRREV_B32_e64 16, %28, implicit $exec
117    %30 = V_SIN_F32_e64 0, %29, 0, 0, implicit $exec
118    %31 = V_LSHLREV_B32_e64 16, %30, implicit $exec
119    %32 = V_LSHRREV_B32_e64 16, %31, implicit $exec
120    %33 = V_CVT_U32_F32_e64 0, %32, 0, 0, implicit $exec
121    %34 = V_LSHLREV_B32_e64 16, %33, implicit $exec
122    %35 = V_CVT_F32_I32_e64 %6, 0, 0, implicit $exec
123    %36 = V_LSHLREV_B32_e64 16, %35, implicit $exec
124
125
126    %37 = V_LSHRREV_B32_e64 16, %36, implicit $exec
127    %38 = V_FRACT_F32_e64 1, %37, 0, 0, implicit $exec
128    %39 = V_LSHLREV_B32_e64 16, %38, implicit $exec
129    %40 = V_LSHRREV_B32_e64 16, %39, implicit $exec
130    %41 = V_SIN_F32_e64 0, %40, 1, 0, implicit $exec
131    %42 = V_LSHLREV_B32_e64 16, %41, implicit $exec
132    %43 = V_LSHRREV_B32_e64 16, %42, implicit $exec
133    %44 = V_CVT_U32_F32_e64 1, %43, 0, 0, implicit $exec
134    %45 = V_LSHLREV_B32_e64 16, %44, implicit $exec
135    %46 = V_LSHRREV_B32_e64 16, %45, implicit $exec
136    %47 = V_CVT_F32_I32_e64 %46, 0, 1, implicit $exec
137    %48 = V_LSHLREV_B32_e64 16, %47, implicit $exec
138
139
140    %100 = V_MOV_B32_e32 %48, implicit $exec
141
142    FLAT_STORE_DWORD %0, %100, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4)
143    $sgpr30_sgpr31 = COPY %2
144    S_SETPC_B64_return $sgpr30_sgpr31
145
146...
147---
148# GCN-LABEL: {{^}}name: vop2_instructions
149
150
151# VI: %{{[0-9]+}}:vgpr_32 = V_AND_B32_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 5, 0, 6, 5, implicit $exec
152# VI: %{{[0-9]+}}:vgpr_32 = V_ADD_F32_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 0, 5, 0, 5, 1, implicit $exec
153# VI: %{{[0-9]+}}:vgpr_32 = V_SUB_F16_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 0, 6, 0, 5, 1, implicit $exec
154# VI: %{{[0-9]+}}:vgpr_32 = V_MAC_F32_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, %{{[0-9]+}}, 0, 0, 6, 0, 6, 1, implicit $exec
155# VI: %{{[0-9]+}}:vgpr_32 = V_MAC_F16_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, %{{[0-9]+}}, 0, 0, 6, 0, 5, 1, implicit $exec
156
157# GFX9: %{{[0-9]+}}:vgpr_32 = V_AND_B32_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 5, 0, 6, 5, implicit $exec
158# GFX9: %{{[0-9]+}}:vgpr_32 = V_ADD_F32_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 0, 5, 0, 5, 1, implicit $exec
159# GFX9: %{{[0-9]+}}:vgpr_32 = V_SUB_F16_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 0, 6, 0, 5, 1, implicit $exec
160# GFX9: %{{[0-9]+}}:vgpr_32 = V_MAC_F32_e32 %{{[0-9]+}}, %{{[0-9]+}}, %{{[0-9]+}}, implicit $exec
161# GFX9: %{{[0-9]+}}:vgpr_32 = V_MAC_F16_e32 %{{[0-9]+}}, %{{[0-9]+}}, %{{[0-9]+}}, implicit $exec
162
163
164# VI: %{{[0-9]+}}:vgpr_32 = V_AND_B32_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 5, 0, 6, 5, implicit $exec
165# VI: %{{[0-9]+}}:vgpr_32 = V_ADD_F32_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 0, 5, 0, 5, 1, implicit $exec
166# VI: %{{[0-9]+}}:vgpr_32 = V_SUB_F16_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 0, 5, 0, 6, 1, implicit $exec
167# VI: %{{[0-9]+}}:vgpr_32 = V_MAC_F32_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, %{{[0-9]+}}, 0, 0, 6, 0, 6, 1, implicit $exec
168# VI: %{{[0-9]+}}:vgpr_32 = V_MAC_F16_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, %{{[0-9]+}}, 0, 0, 6, 0, 5, 1, implicit $exec
169
170# GFX9: %{{[0-9]+}}:vgpr_32 = V_AND_B32_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 5, 0, 6, 5, implicit $exec
171# GFX9: %{{[0-9]+}}:vgpr_32 = V_ADD_F32_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 0, 5, 0, 5, 1, implicit $exec
172# GFX9: %{{[0-9]+}}:vgpr_32 = V_SUB_F16_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 0, 5, 0, 6, 1, implicit $exec
173# GFX9: %{{[0-9]+}}:vgpr_32 = V_MAC_F32_e64 0, 23, 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 0, implicit $exec
174# GFX9: %{{[0-9]+}}:vgpr_32 = V_MAC_F16_e64 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 0, implicit $exec
175
176
177# VI: %{{[0-9]+}}:vgpr_32 = V_ADD_F32_sdwa 0, %{{[0-9]+}}, 1, %{{[0-9]+}}, 0, 0, 5, 0, 5, 1, implicit $exec
178# VI: %{{[0-9]+}}:vgpr_32 = V_SUB_F16_sdwa 1, %{{[0-9]+}}, 1, %{{[0-9]+}}, 0, 0, 5, 0, 6, 1, implicit $exec
179# VI: %{{[0-9]+}}:vgpr_32 = V_MAC_F32_sdwa 1, %{{[0-9]+}}, 1, %{{[0-9]+}}, %{{[0-9]+}}, 1, 0, 6, 0, 6, 1, implicit $exec
180# VI: %{{[0-9]+}}:vgpr_32 = V_MAC_F16_e64 1, %{{[0-9]+}}, 1, %{{[0-9]+}}, 1, %{{[0-9]+}}, 0, 2, implicit $exec
181
182# GFX9: %{{[0-9]+}}:vgpr_32 = V_ADD_F32_sdwa 0, %{{[0-9]+}}, 1, %{{[0-9]+}}, 0, 0, 5, 0, 5, 1, implicit $exec
183# GFX9: %{{[0-9]+}}:vgpr_32 = V_SUB_F16_sdwa 1, %{{[0-9]+}}, 1, %{{[0-9]+}}, 0, 0, 5, 0, 6, 1, implicit $exec
184# GFX9: %{{[0-9]+}}:vgpr_32 = V_MAC_F32_e64 1, 23, 1, %{{[0-9]+}}, 1, %{{[0-9]+}}, 1, 0, implicit $exec
185# GFX9: %{{[0-9]+}}:vgpr_32 = V_MAC_F16_e64 1, %{{[0-9]+}}, 1, %{{[0-9]+}}, 1, %{{[0-9]+}}, 0, 2, implicit $exec
186
187name:            vop2_instructions
188tracksRegLiveness: true
189registers:
190  - { id: 0, class: vreg_64 }
191  - { id: 1, class: vreg_64 }
192  - { id: 2, class: sreg_64 }
193  - { id: 3, class: vgpr_32 }
194  - { id: 4, class: sreg_32_xm0 }
195  - { id: 5, class: sreg_32_xm0 }
196  - { id: 6, class: sreg_32_xm0 }
197  - { id: 7, class: sreg_32_xm0 }
198  - { id: 8, class: sreg_32 }
199  - { id: 9, class: vgpr_32 }
200  - { id: 10, class: vgpr_32 }
201  - { id: 11, class: vgpr_32 }
202  - { id: 12, class: vgpr_32 }
203  - { id: 13, class: vgpr_32 }
204  - { id: 14, class: vgpr_32 }
205  - { id: 15, class: vgpr_32 }
206  - { id: 16, class: vgpr_32 }
207  - { id: 17, class: vgpr_32 }
208  - { id: 18, class: vgpr_32 }
209  - { id: 19, class: vgpr_32 }
210  - { id: 20, class: vgpr_32 }
211  - { id: 21, class: vgpr_32 }
212  - { id: 22, class: vgpr_32 }
213  - { id: 23, class: vgpr_32 }
214  - { id: 24, class: vgpr_32 }
215  - { id: 25, class: vgpr_32 }
216  - { id: 26, class: vgpr_32 }
217  - { id: 27, class: vgpr_32 }
218  - { id: 28, class: vgpr_32 }
219  - { id: 29, class: vgpr_32 }
220  - { id: 30, class: vgpr_32 }
221  - { id: 31, class: vgpr_32 }
222  - { id: 32, class: vgpr_32 }
223  - { id: 33, class: vgpr_32 }
224  - { id: 34, class: vgpr_32 }
225  - { id: 35, class: vgpr_32 }
226  - { id: 36, class: vgpr_32 }
227  - { id: 37, class: vgpr_32 }
228  - { id: 38, class: vgpr_32 }
229  - { id: 39, class: vgpr_32 }
230  - { id: 40, class: vgpr_32 }
231  - { id: 41, class: vgpr_32 }
232  - { id: 42, class: vgpr_32 }
233  - { id: 43, class: vgpr_32 }
234  - { id: 44, class: vgpr_32 }
235  - { id: 45, class: vgpr_32 }
236  - { id: 46, class: vgpr_32 }
237  - { id: 47, class: vgpr_32 }
238  - { id: 48, class: vgpr_32 }
239  - { id: 49, class: vgpr_32 }
240  - { id: 50, class: vgpr_32 }
241  - { id: 51, class: vgpr_32 }
242  - { id: 52, class: vgpr_32 }
243  - { id: 53, class: vgpr_32 }
244  - { id: 54, class: vgpr_32 }
245  - { id: 55, class: vgpr_32 }
246  - { id: 56, class: vgpr_32 }
247  - { id: 57, class: vgpr_32 }
248  - { id: 58, class: vgpr_32 }
249  - { id: 59, class: vgpr_32 }
250  - { id: 60, class: vgpr_32 }
251  - { id: 100, class: vgpr_32 }
252body:             |
253  bb.0:
254    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3, $sgpr30_sgpr31
255
256    %2 = COPY $sgpr30_sgpr31
257    %1 = COPY $vgpr2_vgpr3
258    %0 = COPY $vgpr0_vgpr1
259    %3 = FLAT_LOAD_DWORD %1, 0, 0, 0, implicit $exec, implicit $flat_scr :: (load 4)
260
261    %5 = S_MOV_B32 65535
262    %6 = S_MOV_B32 65535
263
264    %11 = V_LSHRREV_B32_e64 16, %3, implicit $exec
265    %12 = V_AND_B32_e32 %6, %11, implicit $exec
266    %13 = V_LSHLREV_B32_e64 16, %12, implicit $exec
267    %14 = V_LSHRREV_B32_e64 16, %13, implicit $exec
268    %15 = V_BFE_U32 %13, 8, 8, implicit $exec
269    %16 = V_ADD_F32_e32 %14, %15, implicit $exec
270    %17 = V_LSHLREV_B32_e64 16, %16, implicit $exec
271    %18 = V_LSHRREV_B32_e64 16, %17, implicit $exec
272    %19 = V_BFE_U32 %17, 8, 8, implicit $exec
273    %20 = V_SUB_F16_e32 %18, %19, implicit $exec
274    %21 = V_LSHLREV_B32_e64 16, %20, implicit $exec
275    %22 = V_BFE_U32 %20, 8, 8, implicit $exec
276    %23 = V_MAC_F32_e32 %21, %22, %22, implicit $exec
277    %24 = V_LSHLREV_B32_e64 16, %23, implicit $exec
278    %25 = V_LSHRREV_B32_e64 16, %24, implicit $exec
279    %26 = V_BFE_U32 %24, 8, 8, implicit $exec
280    %27 = V_MAC_F16_e32 %25, %26, %26, implicit $exec
281    %28 = V_LSHLREV_B32_e64 16, %27, implicit $exec
282
283    %29 = V_LSHRREV_B32_e64 16, %28, implicit $exec
284    %30 = V_AND_B32_e64 23, %29, implicit $exec
285    %31 = V_LSHLREV_B32_e64 16, %30, implicit $exec
286    %32 = V_LSHRREV_B32_e64 16, %31, implicit $exec
287    %33 = V_BFE_U32 %31, 8, 8, implicit $exec
288    %34 = V_ADD_F32_e64 0, %32, 0, %33, 0, 0, implicit $exec
289    %35 = V_LSHLREV_B32_e64 16, %34, implicit $exec
290    %37 = V_BFE_U32 %35, 8, 8, implicit $exec
291    %38 = V_SUB_F16_e64 0, 23, 0, %37, 0, 0, implicit $exec
292    %39 = V_LSHLREV_B32_e64 16, %38, implicit $exec
293    %40 = V_BFE_U32 %39, 8, 8, implicit $exec
294    %41 = V_MAC_F32_e64 0, 23, 0, %40, 0, %40, 0, 0, implicit $exec
295    %42 = V_LSHLREV_B32_e64 16, %41, implicit $exec
296    %43 = V_LSHRREV_B32_e64 16, %42, implicit $exec
297    %44 = V_BFE_U32 %42, 8, 8, implicit $exec
298    %45 = V_MAC_F16_e64 0, %43, 0, %44, 0, %44, 0, 0, implicit $exec
299    %46 = V_LSHLREV_B32_e64 16, %45, implicit $exec
300
301    %47 = V_LSHRREV_B32_e64 16, %46, implicit $exec
302    %48 = V_BFE_U32 %46, 8, 8, implicit $exec
303    %49 = V_ADD_F32_e64 0, %47, 1, %48, 0, 0, implicit $exec
304    %50 = V_LSHLREV_B32_e64 16, %49, implicit $exec
305    %51 = V_BFE_U32 %50, 8, 8, implicit $exec
306    %52 = V_SUB_F16_e64 1, 23, 1, %51, 0, 0, implicit $exec
307    %53 = V_LSHLREV_B32_e64 16, %52, implicit $exec
308    %54 = V_BFE_U32 %53, 8, 8, implicit $exec
309    %55 = V_MAC_F32_e64 1, 23, 1, %54, 1, %54, 1, 0, implicit $exec
310    %56 = V_LSHLREV_B32_e64 16, %55, implicit $exec
311    %57 = V_LSHRREV_B32_e64 16, %56, implicit $exec
312    %58 = V_BFE_U32 %56, 8, 8, implicit $exec
313    %59 = V_MAC_F16_e64 1, %57, 1, %58, 1, %58, 0, 2, implicit $exec
314    %60 = V_LSHLREV_B32_e64 16, %59, implicit $exec
315
316    %100 = V_MOV_B32_e32 %60, implicit $exec
317
318    FLAT_STORE_DWORD %0, %100, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4)
319    $sgpr30_sgpr31 = COPY %2
320    S_SETPC_B64_return $sgpr30_sgpr31
321
322...
323---
324
325# GCN-LABEL: {{^}}name: vopc_instructions
326
327# GFX89: %{{[0-9]+}}:vgpr_32 = V_MOV_B32_e32 123, implicit $exec
328# GFX89: $vcc = V_CMP_EQ_F32_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 6, 4, implicit-def $vcc, implicit $exec
329# GFX89: $vcc = V_CMPX_GT_F32_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 6, 4, implicit-def $vcc, implicit-def $exec, implicit $exec
330# GFX89: $vcc = V_CMP_LT_I32_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 6, 4, implicit-def $vcc, implicit $exec
331# GFX89: $vcc = V_CMPX_EQ_I32_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 6, 4, implicit-def $vcc, implicit-def $exec, implicit $exec
332
333
334# VI: $vcc = V_CMP_EQ_F32_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 6, 4, implicit-def $vcc, implicit $exec
335# VI: %{{[0-9]+}}:sreg_64 = V_CMPX_GT_F32_e64 0, 23, 0, killed %{{[0-9]+}}, 0, implicit-def $exec, implicit $exec
336# VI: $vcc = V_CMP_LT_I32_sdwa 0, %{{[0-9]+}}, 0, %3, 0, 6, 4, implicit-def $vcc, implicit $exec
337# VI: %{{[0-9]+}}:sreg_64 = V_CMPX_EQ_I32_e64 23, killed %{{[0-9]+}}, implicit-def $exec, implicit $exec
338
339# GFX9: $vcc = V_CMP_EQ_F32_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 6, 4, implicit-def $vcc, implicit $exec
340# GFX9: %{{[0-9]+}}:vgpr_32 = V_MOV_B32_e32 23, implicit $exec
341# GFX9: %{{[0-9]+}}:sreg_64 = V_CMPX_GT_F32_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 6, 4, implicit-def $vcc, implicit-def $exec, implicit $exec
342# GFX9: $vcc = V_CMP_LT_I32_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 6, 4, implicit-def $vcc, implicit $exec
343# GFX9: %{{[0-9]+}}:vgpr_32 = V_MOV_B32_e32 23, implicit $exec
344# GFX9: %{{[0-9]+}}:sreg_64 = V_CMPX_EQ_I32_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 6, 4, implicit-def $vcc, implicit-def $exec, implicit $exec
345
346
347# VI: $vcc = V_CMP_EQ_F32_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 1, 6, 4, implicit-def $vcc, implicit $exec
348# VI: $vcc = V_CMPX_GT_F32_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 6, 4, implicit-def $vcc, implicit-def $exec, implicit $exec
349# VI: $vcc = V_CMP_EQ_F32_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 1, 6, 4, implicit-def $vcc, implicit $exec
350# VI: $vcc = V_CMPX_GT_F32_sdwa 1, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 6, 4, implicit-def $vcc, implicit-def $exec, implicit $exec
351# VI: $vcc = V_CMPX_GT_F32_sdwa 0, %{{[0-9]+}}, 1, %{{[0-9]+}}, 0, 6, 4, implicit-def $vcc, implicit-def $exec, implicit $exec
352# VI: $vcc = V_CMPX_GT_F32_sdwa 1, %{{[0-9]+}}, 1, %{{[0-9]+}}, 0, 6, 4, implicit-def $vcc, implicit-def $exec, implicit $exec
353# VI: $vcc = V_CMPX_GT_F32_sdwa 1, %{{[0-9]+}}, 1, %{{[0-9]+}}, 1, 6, 4, implicit-def $vcc, implicit-def $exec, implicit $exec
354
355# GFX9: $vcc = V_CMP_EQ_F32_e64 0, %{{[0-9]+}}, 0, killed %{{[0-9]+}}, 1, implicit $exec
356# GFX9: $vcc = V_CMPX_GT_F32_sdwa 0, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 6, 4, implicit-def $vcc, implicit-def $exec, implicit $exec
357# GFX9: $vcc = V_CMP_EQ_F32_e64 0, %{{[0-9]+}}, 0, killed %{{[0-9]+}}, 1, implicit $exec
358# GFX9: $vcc = V_CMPX_GT_F32_sdwa 1, %{{[0-9]+}}, 0, %{{[0-9]+}}, 0, 6, 4, implicit-def $vcc, implicit-def $exec, implicit $exec
359# GFX9: $vcc = V_CMPX_GT_F32_sdwa 0, %{{[0-9]+}}, 1, %{{[0-9]+}}, 0, 6, 4, implicit-def $vcc, implicit-def $exec, implicit $exec
360# GFX9: $vcc = V_CMPX_GT_F32_sdwa 1, %{{[0-9]+}}, 1, %{{[0-9]+}}, 0, 6, 4, implicit-def $vcc, implicit-def $exec, implicit $exec
361# GFX9: $vcc = V_CMPX_GT_F32_e64 1, 23, 1, killed %{{[0-9]+}}, 1, implicit-def $exec, implicit $exec
362
363
364
365name:            vopc_instructions
366tracksRegLiveness: true
367registers:
368  - { id: 0, class: vreg_64 }
369  - { id: 1, class: vreg_64 }
370  - { id: 2, class: sreg_64 }
371  - { id: 3, class: vgpr_32 }
372  - { id: 4, class: sreg_32_xm0 }
373  - { id: 5, class: sreg_32_xm0 }
374  - { id: 6, class: sreg_32_xm0 }
375  - { id: 7, class: sreg_32_xm0 }
376  - { id: 8, class: sreg_32 }
377  - { id: 9, class: vgpr_32 }
378  - { id: 10, class: vgpr_32 }
379  - { id: 11, class: vgpr_32 }
380  - { id: 12, class: vgpr_32 }
381  - { id: 13, class: vgpr_32 }
382  - { id: 14, class: vgpr_32 }
383  - { id: 15, class: vgpr_32 }
384  - { id: 16, class: vgpr_32 }
385  - { id: 17, class: vgpr_32 }
386  - { id: 18, class: sreg_64 }
387  - { id: 19, class: sreg_64 }
388  - { id: 20, class: vgpr_32 }
389  - { id: 21, class: vgpr_32 }
390  - { id: 22, class: vgpr_32 }
391  - { id: 23, class: vgpr_32 }
392  - { id: 24, class: vgpr_32 }
393  - { id: 25, class: vgpr_32 }
394  - { id: 26, class: vgpr_32 }
395  - { id: 27, class: vgpr_32 }
396  - { id: 100, class: vgpr_32 }
397body:             |
398  bb.0:
399    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3, $sgpr30_sgpr31
400
401    %2 = COPY $sgpr30_sgpr31
402    %1 = COPY $vgpr2_vgpr3
403    %0 = COPY $vgpr0_vgpr1
404    %3 = FLAT_LOAD_DWORD %1, 0, 0, 0, implicit $exec, implicit $flat_scr :: (load 4)
405
406    %5 = S_MOV_B32 65535
407    %6 = S_MOV_B32 65535
408
409    %10 = V_AND_B32_e64 %5, %3, implicit $exec
410    V_CMP_EQ_F32_e32 123, killed %10, implicit-def $vcc, implicit $exec
411    %11 = V_AND_B32_e64 %5, %3, implicit $exec
412    V_CMPX_GT_F32_e32 123, killed %11, implicit-def $vcc, implicit-def $exec, implicit $exec
413    %12 = V_AND_B32_e64 %5, %3, implicit $exec
414    V_CMP_LT_I32_e32 123, killed %12, implicit-def $vcc, implicit $exec
415    %13 = V_AND_B32_e64 %5, %3, implicit $exec
416    V_CMPX_EQ_I32_e32 123, killed %13, implicit-def $vcc, implicit-def $exec, implicit $exec
417
418    %14 = V_AND_B32_e64 %5, %3, implicit $exec
419    $vcc = V_CMP_EQ_F32_e64 0, %6, 0, killed %14, 0, implicit $exec
420    %15 = V_AND_B32_e64 %5, %3, implicit $exec
421    %18 = V_CMPX_GT_F32_e64 0, 23, 0, killed %15, 0, implicit-def $exec, implicit $exec
422    %16 = V_AND_B32_e64 %5, %3, implicit $exec
423    $vcc = V_CMP_LT_I32_e64 %6, killed %16, implicit $exec
424    %17 = V_AND_B32_e64 %5, %3, implicit $exec
425    %19 = V_CMPX_EQ_I32_e64 23, killed %17, implicit-def $exec, implicit $exec
426
427    %20 = V_AND_B32_e64 %5, %3, implicit $exec
428    $vcc = V_CMP_EQ_F32_e64 0, %6, 0, killed %20, 1, implicit $exec
429    %21 = V_AND_B32_e64 %5, %3, implicit $exec
430    $vcc = V_CMPX_GT_F32_e64 0, 23, 0, killed %21, 0, implicit-def $exec, implicit $exec
431    %23 = V_AND_B32_e64 %5, %3, implicit $exec
432    $vcc = V_CMP_EQ_F32_e64 0, %6, 0, killed %23, 1, implicit $exec
433    %24 = V_AND_B32_e64 %5, %3, implicit $exec
434    $vcc = V_CMPX_GT_F32_e64 1, 23, 0, killed %24, 0, implicit-def $exec, implicit $exec
435    %25 = V_AND_B32_e64 %5, %3, implicit $exec
436    $vcc = V_CMPX_GT_F32_e64 0, 23, 1, killed %25, 0, implicit-def $exec, implicit $exec
437    %26 = V_AND_B32_e64 %5, %3, implicit $exec
438    $vcc = V_CMPX_GT_F32_e64 1, 23, 1, killed %26, 0, implicit-def $exec, implicit $exec
439    %27 = V_AND_B32_e64 %5, %3, implicit $exec
440    $vcc = V_CMPX_GT_F32_e64 1, 23, 1, killed %27, 1, implicit-def $exec, implicit $exec
441
442
443    %100 = V_MOV_B32_e32 $vcc_lo, implicit $exec
444
445    FLAT_STORE_DWORD %0, %100, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4)
446    $sgpr30_sgpr31 = COPY %2
447    S_SETPC_B64_return $sgpr30_sgpr31
448