1// RUN: not llvm-mc -arch=amdgcn -mcpu=tahiti -show-encoding %s | FileCheck -check-prefix=GCN -check-prefix=SICI %s
2// RUN: not llvm-mc -arch=amdgcn -mcpu=kaveri -show-encoding %s | FileCheck -check-prefix=GCN -check-prefix=SICI %s
3// RUN: not llvm-mc -arch=amdgcn -mcpu=tonga -show-encoding %s | FileCheck -check-prefix=GCN -check-prefix=VI -check-prefix=GFX89 %s
4// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx900 -show-encoding %s | FileCheck -check-prefix=GCN -check-prefix=GFX89 -check-prefix=GFX9 %s
5// RUN: not llvm-mc -arch=amdgcn -mcpu=tahiti %s 2>&1 | FileCheck -check-prefix=NOSICI -check-prefix=NOSICIVI %s
6// RUN: not llvm-mc -arch=amdgcn -mcpu=bonaire %s 2>&1 | FileCheck -check-prefix=NOSICI -check-prefix=NOSICIVI %s
7// RUN: not llvm-mc -arch=amdgcn -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=NOSICI -check-prefix=NOSICIVI %s
8// RUN: not llvm-mc -arch=amdgcn -mcpu=tonga %s 2>&1 | FileCheck -check-prefix=NOSICIVI -check-prefix=NOVI %s
9// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx900 %s 2>&1 | FileCheck -check-prefix=NOGFX9 %s
10
11s_dcache_wb
12// GFX89: s_dcache_wb  ; encoding: [0x00,0x00,0x84,0xc0,0x00,0x00,0x00,0x00]
13// NOSICI: error: instruction not supported on this GPU
14
15s_dcache_wb_vol
16// GFX89: s_dcache_wb_vol ; encoding: [0x00,0x00,0x8c,0xc0,0x00,0x00,0x00,0x00]
17// NOSICI: error: instruction not supported on this GPU
18
19s_atc_probe 0x7, s[4:5], s0
20// GFX89:  s_atc_probe 7, s[4:5], s0 ; encoding: [0xc2,0x01,0x98,0xc0,0x00,0x00,0x00,0x00]
21// NOSICI: error: instruction not supported on this GPU
22
23s_atc_probe 0x0, s[4:5], 0x0
24// GFX89:  s_atc_probe 0, s[4:5], 0x0 ; encoding: [0x02,0x00,0x9a,0xc0,0x00,0x00,0x00,0x00]
25// NOSICI: error: instruction not supported on this GPU
26
27s_atc_probe_buffer 0x1, s[8:11], s0
28// GFX89:  s_atc_probe_buffer 1, s[8:11], s0 ; encoding: [0x44,0x00,0x9c,0xc0,0x00,0x00,0x00,0x00]
29// NOSICI: error: instruction not supported on this GPU
30
31s_atc_probe_buffer 0x0, s[8:11], s101
32// GFX89:  s_atc_probe_buffer 0, s[8:11], s101 ; encoding: [0x04,0x00,0x9c,0xc0,0x65,0x00,0x00,0x00]
33// NOSICI: error: instruction not supported on this GPU
34
35s_memrealtime s[4:5]
36// GFX89: s_memrealtime s[4:5] ; encoding: [0x00,0x01,0x94,0xc0,0x00,0x00,0x00,0x00]
37// NOSICI: error: instruction not supported on this GPU
38
39s_memrealtime tba
40// VI: s_memrealtime tba ; encoding: [0x00,0x1b,0x94,0xc0,0x00,0x00,0x00,0x00]
41// NOSICI: error: instruction not supported on this GPU
42// NOGFX9: error: not a valid operand.
43
44s_memrealtime tma
45// VI: s_memrealtime tma ; encoding: [0x80,0x1b,0x94,0xc0,0x00,0x00,0x00,0x00]
46// NOSICI: error: instruction not supported on this GPU
47// NOGFX9: error: not a valid operand.
48
49s_memrealtime ttmp[0:1]
50// VI:   s_memrealtime ttmp[0:1] ; encoding: [0x00,0x1c,0x94,0xc0,0x00,0x00,0x00,0x00]
51// GFX9: s_memrealtime ttmp[0:1] ; encoding: [0x00,0x1b,0x94,0xc0,0x00,0x00,0x00,0x00]
52// NOSICI: error: instruction not supported on this GPU
53
54// FIXME: Should error about instruction on GPU
55s_store_dword s1, s[2:3], 0xfc
56// GFX89: s_store_dword s1, s[2:3], 0xfc  ; encoding: [0x41,0x00,0x42,0xc0,0xfc,0x00,0x00,0x00]
57// NOSICI: error: instruction not supported on this GPU
58
59s_store_dword s1, s[2:3], 0xfc glc
60// GFX89: s_store_dword s1, s[2:3], 0xfc glc ; encoding: [0x41,0x00,0x43,0xc0,0xfc,0x00,0x00,0x00]
61// NOSICI: error: invalid operand for instruction
62
63s_store_dword s1, s[2:3], s4
64// GFX89: s_store_dword s1, s[2:3], s4 ; encoding: [0x41,0x00,0x40,0xc0,0x04,0x00,0x00,0x00]
65// NOSICI: error: instruction not supported on this GPU
66
67s_store_dword s1, s[2:3], s4 glc
68// GFX89: s_store_dword s1, s[2:3], s4 glc ; encoding: [0x41,0x00,0x41,0xc0,0x04,0x00,0x00,0x00]
69// NOSICI: error: invalid operand for instruction
70
71s_store_dword tba_lo, s[2:3], s4
72// VI: s_store_dword tba_lo, s[2:3], s4 ; encoding: [0x01,0x1b,0x40,0xc0,0x04,0x00,0x00,0x00]
73// NOSICI: error: instruction not supported on this GPU
74// NOGFX9: error: not a valid operand.
75
76s_store_dword tba_hi, s[2:3], s4
77// VI: s_store_dword tba_hi, s[2:3], s4 ; encoding: [0x41,0x1b,0x40,0xc0,0x04,0x00,0x00,0x00]
78// NOSICI: error: instruction not supported on this GPU
79// NOGFX9: error: not a valid operand.
80
81s_store_dword tma_lo, s[2:3], s4
82// VI: s_store_dword tma_lo, s[2:3], s4 ; encoding: [0x81,0x1b,0x40,0xc0,0x04,0x00,0x00,0x00]
83// NOSICI: error: instruction not supported on this GPU
84// NOGFX9: error: not a valid operand.
85
86s_store_dword tma_hi, s[2:3], s4
87// VI: s_store_dword tma_hi, s[2:3], s4 ; encoding: [0xc1,0x1b,0x40,0xc0,0x04,0x00,0x00,0x00]
88// NOSICI: error: instruction not supported on this GPU
89// NOGFX9: error: not a valid operand.
90
91// FIXME: Should error on SI instead of silently ignoring glc
92s_load_dword s1, s[2:3], 0xfc glc
93// GFX89: s_load_dword s1, s[2:3], 0xfc glc ; encoding: [0x41,0x00,0x03,0xc0,0xfc,0x00,0x00,0x00]
94
95s_load_dword s1, s[2:3], s4 glc
96// GFX89: s_load_dword s1, s[2:3], s4 glc ; encoding: [0x41,0x00,0x01,0xc0,0x04,0x00,0x00,0x00]
97
98s_buffer_store_dword s10, s[92:95], m0
99// GFX89: s_buffer_store_dword s10, s[92:95], m0 ; encoding: [0xae,0x02,0x60,0xc0,0x7c,0x00,0x00,0x00]
100// NOSICI: error: instruction not supported on this GPU
101
102s_buffer_store_dword tba_lo, s[92:95], m0
103// VI: s_buffer_store_dword tba_lo, s[92:95], m0 ; encoding: [0x2e,0x1b,0x60,0xc0,0x7c,0x00,0x00,0x00]
104// NOSICI: error: instruction not supported on this GPU
105// NOGFX9: error: not a valid operand.
106
107s_buffer_store_dword tba_hi, s[92:95], m0
108// VI: s_buffer_store_dword tba_hi, s[92:95], m0 ; encoding: [0x6e,0x1b,0x60,0xc0,0x7c,0x00,0x00,0x00]
109// NOSICI: error: instruction not supported on this GPU
110// NOGFX9: error: not a valid operand.
111
112s_buffer_store_dword tma_lo, s[92:95], m0
113// VI: s_buffer_store_dword tma_lo, s[92:95], m0 ; encoding: [0xae,0x1b,0x60,0xc0,0x7c,0x00,0x00,0x00]
114// NOSICI: error: instruction not supported on this GPU
115// NOGFX9: error: not a valid operand.
116
117s_buffer_store_dword tma_hi, s[92:95], m0
118// VI: s_buffer_store_dword tma_hi, s[92:95], m0 ; encoding: [0xee,0x1b,0x60,0xc0,0x7c,0x00,0x00,0x00]
119// NOSICI: error: instruction not supported on this GPU
120// NOGFX9: error: not a valid operand.
121
122s_buffer_store_dword ttmp0, s[92:95], m0
123// VI:   s_buffer_store_dword ttmp0, s[92:95], m0 ; encoding: [0x2e,0x1c,0x60,0xc0,0x7c,0x00,0x00,0x00]
124// GFX9: s_buffer_store_dword ttmp0, s[92:95], m0 ; encoding: [0x2e,0x1b,0x60,0xc0,0x7c,0x00,0x00,0x00]
125// NOSICI: error: instruction not supported on this GPU
126
127s_buffer_store_dwordx2 s[10:11], s[92:95], m0
128// GFX89: s_buffer_store_dwordx2 s[10:11], s[92:95], m0 ; encoding: [0xae,0x02,0x64,0xc0,0x7c,0x00,0x00,0x00]
129// NOSICI: error: instruction not supported on this GPU
130
131s_buffer_store_dwordx4 s[8:11], s[92:95], m0 glc
132// GFX89: s_buffer_store_dwordx4 s[8:11], s[92:95], m0 glc ; encoding: [0x2e,0x02,0x69,0xc0,0x7c,0x00,0x00,0x00]
133// NOSICI: error: invalid operand for instruction
134
135s_buffer_store_dwordx2 tba, s[92:95], m0 glc
136// VI: s_buffer_store_dwordx2 tba, s[92:95], m0 glc ; encoding: [0x2e,0x1b,0x65,0xc0,0x7c,0x00,0x00,0x00]
137// NOSICI: error: invalid operand for instruction
138// NOGFX9: error: not a valid operand.
139
140s_buffer_load_dword s10, s[92:95], m0
141// GFX89: s_buffer_load_dword s10, s[92:95], m0 ; encoding: [0xae,0x02,0x20,0xc0,0x7c,0x00,0x00,0x00]
142// SICI: s_buffer_load_dword s10, s[92:95], m0 ; encoding: [0x7c,0x5c,0x05,0xc2]
143
144s_buffer_load_dword tba_lo, s[92:95], m0
145// VI: s_buffer_load_dword tba_lo, s[92:95], m0 ; encoding: [0x2e,0x1b,0x20,0xc0,0x7c,0x00,0x00,0x00]
146// SICI: s_buffer_load_dword tba_lo, s[92:95], m0 ; encoding: [0x7c,0x5c,0x36,0xc2]
147// NOGFX9: error: not a valid operand.
148
149s_buffer_load_dword tba_hi, s[92:95], m0
150// VI: s_buffer_load_dword tba_hi, s[92:95], m0 ; encoding: [0x6e,0x1b,0x20,0xc0,0x7c,0x00,0x00,0x00]
151// SICI: s_buffer_load_dword tba_hi, s[92:95], m0 ; encoding: [0x7c,0xdc,0x36,0xc2]
152// NOGFX9: error: not a valid operand.
153
154s_buffer_load_dword tma_lo, s[92:95], m0
155// VI: s_buffer_load_dword tma_lo, s[92:95], m0 ; encoding: [0xae,0x1b,0x20,0xc0,0x7c,0x00,0x00,0x00]
156// SICI: s_buffer_load_dword tma_lo, s[92:95], m0 ; encoding: [0x7c,0x5c,0x37,0xc2]
157// NOGFX9: error: not a valid operand.
158
159s_buffer_load_dword tma_hi, s[92:95], m0
160// VI: s_buffer_load_dword tma_hi, s[92:95], m0 ; encoding: [0xee,0x1b,0x20,0xc0,0x7c,0x00,0x00,0x00]
161// SICI: s_buffer_load_dword tma_hi, s[92:95], m0 ; encoding: [0x7c,0xdc,0x37,0xc2]
162// NOGFX9: error: not a valid operand.
163
164s_buffer_load_dword ttmp0, s[92:95], m0
165// VI:   s_buffer_load_dword ttmp0, s[92:95], m0 ; encoding: [0x2e,0x1c,0x20,0xc0,0x7c,0x00,0x00,0x00]
166// GFX9: s_buffer_load_dword ttmp0, s[92:95], m0 ; encoding: [0x2e,0x1b,0x20,0xc0,0x7c,0x00,0x00,0x00]
167// SICI: s_buffer_load_dword ttmp0, s[92:95], m0 ; encoding: [0x7c,0x5c,0x38,0xc2]
168
169s_buffer_load_dwordx2 s[10:11], s[92:95], m0
170// GFX89: s_buffer_load_dwordx2 s[10:11], s[92:95], m0 ; encoding: [0xae,0x02,0x24,0xc0,0x7c,0x00,0x00,0x00]
171// SICI: s_buffer_load_dwordx2 s[10:11], s[92:95], m0 ; encoding: [0x7c,0x5c,0x45,0xc2]
172
173s_buffer_load_dwordx2 tba, s[92:95], m0
174// VI:   s_buffer_load_dwordx2 tba, s[92:95], m0 ; encoding: [0x2e,0x1b,0x24,0xc0,0x7c,0x00,0x00,0x00]
175// SICI: s_buffer_load_dwordx2 tba, s[92:95], m0 ; encoding: [0x7c,0x5c,0x76,0xc2]
176// NOGFX9: error: not a valid operand.
177
178s_buffer_load_dwordx2 tma, s[92:95], m0
179// VI: s_buffer_load_dwordx2 tma, s[92:95], m0 ; encoding: [0xae,0x1b,0x24,0xc0,0x7c,0x00,0x00,0x00]
180// SICI: s_buffer_load_dwordx2 tma, s[92:95], m0 ; encoding: [0x7c,0x5c,0x77,0xc2]
181// NOGFX9: error: not a valid operand.
182
183s_buffer_load_dwordx2 ttmp[0:1], s[92:95], m0
184// VI:   s_buffer_load_dwordx2 ttmp[0:1], s[92:95], m0 ; encoding: [0x2e,0x1c,0x24,0xc0,0x7c,0x00,0x00,0x00]
185// GFX9: s_buffer_load_dwordx2 ttmp[0:1], s[92:95], m0 ; encoding: [0x2e,0x1b,0x24,0xc0,0x7c,0x00,0x00,0x00]
186// SICI: s_buffer_load_dwordx2 ttmp[0:1], s[92:95], m0 ; encoding: [0x7c,0x5c,0x78,0xc2]
187
188// FIXME: Should error on SI instead of silently ignoring glc
189s_buffer_load_dwordx4 s[8:11], s[92:95], m0 glc
190// GFX89: s_buffer_load_dwordx4 s[8:11], s[92:95], m0 glc ; encoding: [0x2e,0x02,0x29,0xc0,0x7c,0x00,0x00,0x00]
191
192//===----------------------------------------------------------------------===//
193// s_scratch instructions
194//===----------------------------------------------------------------------===//
195
196s_scratch_load_dword s5, s[2:3], s101
197// GFX9: s_scratch_load_dword s5, s[2:3], s101 ; encoding: [0x41,0x01,0x14,0xc0,0x65,0x00,0x00,0x00]
198// NOSICIVI: error: instruction not supported on this GPU
199
200s_scratch_load_dword s5, s[2:3], s0 glc
201// GFX9: s_scratch_load_dword s5, s[2:3], s0 glc ; encoding: [0x41,0x01,0x15,0xc0,0x00,0x00,0x00,0x00]
202// NOSICIVI: error
203
204s_scratch_load_dwordx2 s[100:101], s[2:3], s0
205// GFX9: s_scratch_load_dwordx2 s[100:101], s[2:3], s0 ; encoding: [0x01,0x19,0x18,0xc0,0x00,0x00,0x00,0x00]
206// NOSICIVI: error: instruction not supported on this GPU
207
208s_scratch_load_dwordx2 s[10:11], s[2:3], 0x1 glc
209// GFX9: s_scratch_load_dwordx2 s[10:11], s[2:3], 0x1 glc ; encoding: [0x81,0x02,0x1b,0xc0,0x01,0x00,0x00,0x00]
210// NOSICIVI: error
211
212s_scratch_load_dwordx4 s[20:23], s[4:5], s0
213// GFX9: s_scratch_load_dwordx4 s[20:23], s[4:5], s0 ; encoding: [0x02,0x05,0x1c,0xc0,0x00,0x00,0x00,0x00]
214// NOSICIVI: error: instruction not supported on this GPU
215
216s_scratch_store_dword s101, s[4:5], s0
217// GFX9: s_scratch_store_dword s101, s[4:5], s0 ; encoding: [0x42,0x19,0x54,0xc0,0x00,0x00,0x00,0x00]
218// NOSICIVI: error: instruction not supported on this GPU
219
220s_scratch_store_dword s1, s[4:5], 0x123 glc
221// GFX9: s_scratch_store_dword s1, s[4:5], 0x123 glc ; encoding: [0x42,0x00,0x57,0xc0,0x23,0x01,0x00,0x00]
222// NOSICIVI: error
223
224s_scratch_store_dwordx2 s[2:3], s[4:5], s101 glc
225// GFX9: s_scratch_store_dwordx2 s[2:3], s[4:5], s101 glc ; encoding: [0x82,0x00,0x59,0xc0,0x65,0x00,0x00,0x00]
226// NOSICIVI: error
227
228s_scratch_store_dwordx4 s[4:7], s[4:5], s0 glc
229// GFX9: s_scratch_store_dwordx4 s[4:7], s[4:5], s0 glc ; encoding: [0x02,0x01,0x5d,0xc0,0x00,0x00,0x00,0x00]
230// NOSICIVI: error
231
232//===----------------------------------------------------------------------===//
233// s_dcache_discard instructions
234//===----------------------------------------------------------------------===//
235
236s_dcache_discard s[2:3], s0
237// GFX9:     s_dcache_discard s[2:3], s0 ; encoding: [0x01,0x00,0xa0,0xc0,0x00,0x00,0x00,0x00]
238// NOSICIVI: error: instruction not supported on this GPU
239
240s_dcache_discard s[2:3], 0x0
241// GFX9:     s_dcache_discard s[2:3], 0x0 ; encoding: [0x01,0x00,0xa2,0xc0,0x00,0x00,0x00,0x00]
242// NOSICIVI: error: instruction not supported on this GPU
243
244s_dcache_discard_x2 s[2:3], s101
245// GFX9:     s_dcache_discard_x2 s[2:3], s101 ; encoding: [0x01,0x00,0xa4,0xc0,0x65,0x00,0x00,0x00]
246// NOSICIVI: error: instruction not supported on this GPU
247
248s_dcache_discard_x2 s[2:3], 0x0
249// GFX9:     s_dcache_discard_x2 s[2:3], 0x0 ; encoding: [0x01,0x00,0xa6,0xc0,0x00,0x00,0x00,0x00]
250// NOSICIVI: error: instruction not supported on this GPU
251
252//===----------------------------------------------------------------------===//
253// s_atomic instructions
254//===----------------------------------------------------------------------===//
255
256s_atomic_add s5, s[2:3], s101
257// GFX9:     s_atomic_add s5, s[2:3], s101 ; encoding: [0x41,0x01,0x08,0xc2,0x65,0x00,0x00,0x00]
258// NOSICIVI: error:
259
260s_atomic_add s5, s[2:3], 0x0
261// GFX9:     s_atomic_add s5, s[2:3], 0x0 ; encoding: [0x41,0x01,0x0a,0xc2,0x00,0x00,0x00,0x00]
262// NOSICIVI: error:
263
264s_atomic_add s5, s[2:3], s0 glc
265// GFX9:     s_atomic_add s5, s[2:3], s0 glc ; encoding: [0x41,0x01,0x09,0xc2,0x00,0x00,0x00,0x00]
266// NOSICIVI: error:
267
268s_atomic_add_x2 s[10:11], s[2:3], s101
269// GFX9:     s_atomic_add_x2 s[10:11], s[2:3], s101 ; encoding: [0x81,0x02,0x88,0xc2,0x65,0x00,0x00,0x00]
270// NOSICIVI: error:
271
272s_atomic_and s5, s[2:3], s101
273// GFX9:     s_atomic_and s5, s[2:3], s101 ; encoding: [0x41,0x01,0x20,0xc2,0x65,0x00,0x00,0x00]
274// NOSICIVI: error:
275
276s_atomic_and_x2 s[10:11], s[2:3], 0x0
277// GFX9:     s_atomic_and_x2 s[10:11], s[2:3], 0x0 ; encoding: [0x81,0x02,0xa2,0xc2,0x00,0x00,0x00,0x00]
278// NOSICIVI: error:
279
280s_atomic_cmpswap s[10:11], s[2:3], s101
281// GFX9:     s_atomic_cmpswap s[10:11], s[2:3], s101 ; encoding: [0x81,0x02,0x04,0xc2,0x65,0x00,0x00,0x00]
282// NOSICIVI: error:
283
284s_atomic_cmpswap s[10:11], s[2:3], 0x0
285// GFX9:     s_atomic_cmpswap s[10:11], s[2:3], 0x0 ; encoding: [0x81,0x02,0x06,0xc2,0x00,0x00,0x00,0x00]
286// NOSICIVI: error:
287
288s_atomic_cmpswap s[10:11], s[2:3], s0 glc
289// GFX9:     s_atomic_cmpswap s[10:11], s[2:3], s0 glc ; encoding: [0x81,0x02,0x05,0xc2,0x00,0x00,0x00,0x00]
290// NOSICIVI: error:
291
292s_atomic_cmpswap_x2 s[20:23], s[2:3], s101
293// GFX9:     s_atomic_cmpswap_x2 s[20:23], s[2:3], s101 ; encoding: [0x01,0x05,0x84,0xc2,0x65,0x00,0x00,0x00]
294// NOSICIVI: error:
295
296s_atomic_cmpswap_x2 s[20:23], s[2:3], 0x0
297// GFX9:     s_atomic_cmpswap_x2 s[20:23], s[2:3], 0x0 ; encoding: [0x01,0x05,0x86,0xc2,0x00,0x00,0x00,0x00]
298// NOSICIVI: error:
299
300s_atomic_cmpswap_x2 s[20:23], s[2:3], s0 glc
301// GFX9:     s_atomic_cmpswap_x2 s[20:23], s[2:3], s0 glc ; encoding: [0x01,0x05,0x85,0xc2,0x00,0x00,0x00,0x00]
302// NOSICIVI: error:
303
304s_atomic_dec s5, s[2:3], s0 glc
305// GFX9:     s_atomic_dec s5, s[2:3], s0 glc ; encoding: [0x41,0x01,0x31,0xc2,0x00,0x00,0x00,0x00]
306// NOSICIVI: error:
307
308s_atomic_dec_x2 s[10:11], s[2:3], s101
309// GFX9:     s_atomic_dec_x2 s[10:11], s[2:3], s101 ; encoding: [0x81,0x02,0xb0,0xc2,0x65,0x00,0x00,0x00]
310// NOSICIVI: error:
311
312s_atomic_inc s5, s[2:3], s0 glc
313// GFX9:     s_atomic_inc s5, s[2:3], s0 glc ; encoding: [0x41,0x01,0x2d,0xc2,0x00,0x00,0x00,0x00]
314// NOSICIVI: error:
315
316s_atomic_inc_x2 s[10:11], s[2:3], s101
317// GFX9:     s_atomic_inc_x2 s[10:11], s[2:3], s101 ; encoding: [0x81,0x02,0xac,0xc2,0x65,0x00,0x00,0x00]
318// NOSICIVI: error:
319
320s_atomic_or s5, s[2:3], 0x0
321// GFX9:     s_atomic_or s5, s[2:3], 0x0 ; encoding: [0x41,0x01,0x26,0xc2,0x00,0x00,0x00,0x00]
322// NOSICIVI: error:
323
324s_atomic_or_x2 s[10:11], s[2:3], s0 glc
325// GFX9:     s_atomic_or_x2 s[10:11], s[2:3], s0 glc ; encoding: [0x81,0x02,0xa5,0xc2,0x00,0x00,0x00,0x00]
326// NOSICIVI: error:
327
328s_atomic_smax s5, s[2:3], s101
329// GFX9:     s_atomic_smax s5, s[2:3], s101 ; encoding: [0x41,0x01,0x18,0xc2,0x65,0x00,0x00,0x00]
330// NOSICIVI: error:
331
332s_atomic_smax_x2 s[10:11], s[2:3], s0 glc
333// GFX9:     s_atomic_smax_x2 s[10:11], s[2:3], s0 glc ; encoding: [0x81,0x02,0x99,0xc2,0x00,0x00,0x00,0x00]
334// NOSICIVI: error:
335
336s_atomic_smin s5, s[2:3], s101
337// GFX9:     s_atomic_smin s5, s[2:3], s101 ; encoding: [0x41,0x01,0x10,0xc2,0x65,0x00,0x00,0x00]
338// NOSICIVI: error:
339
340s_atomic_smin_x2 s[10:11], s[2:3], s0 glc
341// GFX9:     s_atomic_smin_x2 s[10:11], s[2:3], s0 glc ; encoding: [0x81,0x02,0x91,0xc2,0x00,0x00,0x00,0x00]
342// NOSICIVI: error:
343
344s_atomic_sub s5, s[2:3], s101
345// GFX9:     s_atomic_sub s5, s[2:3], s101 ; encoding: [0x41,0x01,0x0c,0xc2,0x65,0x00,0x00,0x00]
346// NOSICIVI: error:
347
348s_atomic_sub_x2 s[10:11], s[2:3], s0 glc
349// GFX9:     s_atomic_sub_x2 s[10:11], s[2:3], s0 glc ; encoding: [0x81,0x02,0x8d,0xc2,0x00,0x00,0x00,0x00]
350// NOSICIVI: error:
351
352s_atomic_swap s5, s[2:3], s101
353// GFX9:     s_atomic_swap s5, s[2:3], s101 ; encoding: [0x41,0x01,0x00,0xc2,0x65,0x00,0x00,0x00]
354// NOSICIVI: error:
355
356s_atomic_swap_x2 s[10:11], s[2:3], s0 glc
357// GFX9:     s_atomic_swap_x2 s[10:11], s[2:3], s0 glc ; encoding: [0x81,0x02,0x81,0xc2,0x00,0x00,0x00,0x00]
358// NOSICIVI: error:
359
360s_atomic_umax s5, s[2:3], s0 glc
361// GFX9:     s_atomic_umax s5, s[2:3], s0 glc ; encoding: [0x41,0x01,0x1d,0xc2,0x00,0x00,0x00,0x00]
362// NOSICIVI: error:
363
364s_atomic_umax_x2 s[10:11], s[2:3], s101
365// GFX9:     s_atomic_umax_x2 s[10:11], s[2:3], s101 ; encoding: [0x81,0x02,0x9c,0xc2,0x65,0x00,0x00,0x00]
366// NOSICIVI: error:
367
368s_atomic_umin s5, s[2:3], s101
369// GFX9:     s_atomic_umin s5, s[2:3], s101 ; encoding: [0x41,0x01,0x14,0xc2,0x65,0x00,0x00,0x00]
370// NOSICIVI: error:
371
372s_atomic_umin_x2 s[10:11], s[2:3], s0 glc
373// GFX9:     s_atomic_umin_x2 s[10:11], s[2:3], s0 glc ; encoding: [0x81,0x02,0x95,0xc2,0x00,0x00,0x00,0x00]
374// NOSICIVI: error:
375
376s_atomic_xor s5, s[2:3], s101
377// GFX9:     s_atomic_xor s5, s[2:3], s101 ; encoding: [0x41,0x01,0x28,0xc2,0x65,0x00,0x00,0x00]
378// NOSICIVI: error:
379
380s_atomic_xor_x2 s[10:11], s[2:3], s0 glc
381// GFX9:     s_atomic_xor_x2 s[10:11], s[2:3], s0 glc ; encoding: [0x81,0x02,0xa9,0xc2,0x00,0x00,0x00,0x00]
382// NOSICIVI: error:
383
384//===----------------------------------------------------------------------===//
385// s_buffer_atomic instructions
386//===----------------------------------------------------------------------===//
387
388s_buffer_atomic_add s5, s[4:7], s101
389// GFX9:     s_buffer_atomic_add s5, s[4:7], s101 ; encoding: [0x42,0x01,0x08,0xc1,0x65,0x00,0x00,0x00]
390// NOSICIVI: error:
391
392s_buffer_atomic_add s5, s[4:7], 0x0
393// GFX9:     s_buffer_atomic_add s5, s[4:7], 0x0 ; encoding: [0x42,0x01,0x0a,0xc1,0x00,0x00,0x00,0x00]
394// NOSICIVI: error:
395
396s_buffer_atomic_add s5, s[4:7], s0 glc
397// GFX9:     s_buffer_atomic_add s5, s[4:7], s0 glc ; encoding: [0x42,0x01,0x09,0xc1,0x00,0x00,0x00,0x00]
398// NOSICIVI: error:
399
400s_buffer_atomic_add_x2 s[10:11], s[4:7], s0
401// GFX9:     s_buffer_atomic_add_x2 s[10:11], s[4:7], s0 ; encoding: [0x82,0x02,0x88,0xc1,0x00,0x00,0x00,0x00]
402// NOSICIVI: error:
403
404s_buffer_atomic_and s101, s[4:7], s0
405// GFX9:     s_buffer_atomic_and s101, s[4:7], s0 ; encoding: [0x42,0x19,0x20,0xc1,0x00,0x00,0x00,0x00]
406// NOSICIVI: error:
407
408s_buffer_atomic_and_x2 s[10:11], s[8:11], s0
409// GFX9:     s_buffer_atomic_and_x2 s[10:11], s[8:11], s0 ; encoding: [0x84,0x02,0xa0,0xc1,0x00,0x00,0x00,0x00]
410// NOSICIVI: error:
411
412s_buffer_atomic_cmpswap s[10:11], s[4:7], s0
413// GFX9:     s_buffer_atomic_cmpswap s[10:11], s[4:7], s0 ; encoding: [0x82,0x02,0x04,0xc1,0x00,0x00,0x00,0x00]
414// NOSICIVI: error:
415
416s_buffer_atomic_cmpswap s[10:11], s[4:7], 0x0
417// GFX9:     s_buffer_atomic_cmpswap s[10:11], s[4:7], 0x0 ; encoding: [0x82,0x02,0x06,0xc1,0x00,0x00,0x00,0x00]
418// NOSICIVI: error:
419
420s_buffer_atomic_cmpswap s[10:11], s[4:7], s0 glc
421// GFX9:     s_buffer_atomic_cmpswap s[10:11], s[4:7], s0 glc ; encoding: [0x82,0x02,0x05,0xc1,0x00,0x00,0x00,0x00]
422// NOSICIVI: error:
423
424s_buffer_atomic_cmpswap_x2 s[20:23], s[4:7], s101
425// GFX9:     s_buffer_atomic_cmpswap_x2 s[20:23], s[4:7], s101 ; encoding: [0x02,0x05,0x84,0xc1,0x65,0x00,0x00,0x00]
426// NOSICIVI: error:
427
428s_buffer_atomic_cmpswap_x2 s[20:23], s[4:7], 0x0
429// GFX9:     s_buffer_atomic_cmpswap_x2 s[20:23], s[4:7], 0x0 ; encoding: [0x02,0x05,0x86,0xc1,0x00,0x00,0x00,0x00]
430// NOSICIVI: error:
431
432s_buffer_atomic_cmpswap_x2 s[20:23], s[4:7], s0 glc
433// GFX9:     s_buffer_atomic_cmpswap_x2 s[20:23], s[4:7], s0 glc ; encoding: [0x02,0x05,0x85,0xc1,0x00,0x00,0x00,0x00]
434// NOSICIVI: error:
435
436s_buffer_atomic_dec s5, s[4:7], s0
437// GFX9:     s_buffer_atomic_dec s5, s[4:7], s0 ; encoding: [0x42,0x01,0x30,0xc1,0x00,0x00,0x00,0x00]
438// NOSICIVI: error:
439
440s_buffer_atomic_dec_x2 s[10:11], s[4:7], s0 glc
441// GFX9:     s_buffer_atomic_dec_x2 s[10:11], s[4:7], s0 glc ; encoding: [0x82,0x02,0xb1,0xc1,0x00,0x00,0x00,0x00]
442// NOSICIVI: error:
443
444s_buffer_atomic_inc s101, s[4:7], s0
445// GFX9:     s_buffer_atomic_inc s101, s[4:7], s0 ; encoding: [0x42,0x19,0x2c,0xc1,0x00,0x00,0x00,0x00]
446// NOSICIVI: error:
447
448s_buffer_atomic_inc_x2 s[10:11], s[4:7], 0x0
449// GFX9:     s_buffer_atomic_inc_x2 s[10:11], s[4:7], 0x0 ; encoding: [0x82,0x02,0xae,0xc1,0x00,0x00,0x00,0x00]
450// NOSICIVI: error:
451
452s_buffer_atomic_or s5, s[8:11], s0
453// GFX9:     s_buffer_atomic_or s5, s[8:11], s0 ; encoding: [0x44,0x01,0x24,0xc1,0x00,0x00,0x00,0x00]
454// NOSICIVI: error:
455
456s_buffer_atomic_or_x2 s[10:11], s[96:99], s0
457// GFX9:     s_buffer_atomic_or_x2 s[10:11], s[96:99], s0 ; encoding: [0xb0,0x02,0xa4,0xc1,0x00,0x00,0x00,0x00]
458// NOSICIVI: error:
459
460s_buffer_atomic_smax s5, s[4:7], s101
461// GFX9:     s_buffer_atomic_smax s5, s[4:7], s101 ; encoding: [0x42,0x01,0x18,0xc1,0x65,0x00,0x00,0x00]
462// NOSICIVI: error:
463
464s_buffer_atomic_smax_x2 s[100:101], s[4:7], s0
465// GFX9:     s_buffer_atomic_smax_x2 s[100:101], s[4:7], s0 ; encoding: [0x02,0x19,0x98,0xc1,0x00,0x00,0x00,0x00]
466// NOSICIVI: error:
467
468s_buffer_atomic_smin s5, s[4:7], 0x0
469// GFX9:     s_buffer_atomic_smin s5, s[4:7], 0x0 ; encoding: [0x42,0x01,0x12,0xc1,0x00,0x00,0x00,0x00]
470// NOSICIVI: error:
471
472s_buffer_atomic_smin_x2 s[12:13], s[4:7], s0
473// GFX9:     s_buffer_atomic_smin_x2 s[12:13], s[4:7], s0 ; encoding: [0x02,0x03,0x90,0xc1,0x00,0x00,0x00,0x00]
474// NOSICIVI: error:
475
476s_buffer_atomic_sub s5, s[4:7], s0 glc
477// GFX9:     s_buffer_atomic_sub s5, s[4:7], s0 glc ; encoding: [0x42,0x01,0x0d,0xc1,0x00,0x00,0x00,0x00]
478// NOSICIVI: error:
479
480s_buffer_atomic_sub_x2 s[10:11], s[4:7], s0
481// GFX9:     s_buffer_atomic_sub_x2 s[10:11], s[4:7], s0 ; encoding: [0x82,0x02,0x8c,0xc1,0x00,0x00,0x00,0x00]
482// NOSICIVI: error:
483
484s_buffer_atomic_swap s5, s[4:7], s0
485// GFX9:     s_buffer_atomic_swap s5, s[4:7], s0 ; encoding: [0x42,0x01,0x00,0xc1,0x00,0x00,0x00,0x00]
486// NOSICIVI: error:
487
488s_buffer_atomic_swap_x2 s[10:11], s[4:7], s0 glc
489// GFX9:     s_buffer_atomic_swap_x2 s[10:11], s[4:7], s0 glc ; encoding: [0x82,0x02,0x81,0xc1,0x00,0x00,0x00,0x00]
490// NOSICIVI: error:
491
492s_buffer_atomic_umax s5, s[4:7], s0
493// GFX9:     s_buffer_atomic_umax s5, s[4:7], s0 ; encoding: [0x42,0x01,0x1c,0xc1,0x00,0x00,0x00,0x00]
494// NOSICIVI: error:
495
496s_buffer_atomic_umax_x2 s[10:11], s[4:7], s0 glc
497// GFX9:     s_buffer_atomic_umax_x2 s[10:11], s[4:7], s0 glc ; encoding: [0x82,0x02,0x9d,0xc1,0x00,0x00,0x00,0x00]
498// NOSICIVI: error:
499
500s_buffer_atomic_umin s5, s[4:7], s0
501// GFX9:     s_buffer_atomic_umin s5, s[4:7], s0 ; encoding: [0x42,0x01,0x14,0xc1,0x00,0x00,0x00,0x00]
502// NOSICIVI: error:
503
504s_buffer_atomic_umin_x2 s[10:11], s[4:7], s0 glc
505// GFX9:     s_buffer_atomic_umin_x2 s[10:11], s[4:7], s0 glc ; encoding: [0x82,0x02,0x95,0xc1,0x00,0x00,0x00,0x00]
506// NOSICIVI: error:
507
508s_buffer_atomic_xor s5, s[4:7], s0
509// GFX9:     s_buffer_atomic_xor s5, s[4:7], s0 ; encoding: [0x42,0x01,0x28,0xc1,0x00,0x00,0x00,0x00]
510// NOSICIVI: error:
511
512s_buffer_atomic_xor_x2 s[10:11], s[4:7], s0 glc
513// GFX9:     s_buffer_atomic_xor_x2 s[10:11], s[4:7], s0 glc ; encoding: [0x82,0x02,0xa9,0xc1,0x00,0x00,0x00,0x00]
514// NOSICIVI: error:
515