Revert 239644.
[oota-llvm.git] / test / MC / R600 / vop1.s
1 // RUN: not llvm-mc -arch=amdgcn -show-encoding %s | FileCheck %s --check-prefix=GCN --check-prefix=SI --check-prefix=SICI
2 // RUN: not llvm-mc -arch=amdgcn -mcpu=SI -show-encoding %s | FileCheck %s --check-prefix=GCN --check-prefix=SI --check-prefix=SICI
3 // RUN: not llvm-mc -arch=amdgcn -mcpu=bonaire -show-encoding %s | FileCheck %s --check-prefix=GCN --check-prefix=SICI --check-prefix=CIVI
4 // RUN: not llvm-mc -arch=amdgcn -mcpu=tonga -show-encoding %s | FileCheck %s --check-prefix=GCN --check-prefix=CIVI --check-prefix=VI
5
6 // RUN: not llvm-mc -arch=amdgcn -show-encoding %s 2>&1 | FileCheck %s --check-prefix=NOSI --check-prefix=NOSICI
7 // RUN: not llvm-mc -arch=amdgcn -mcpu=SI -show-encoding %s 2>&1 | FileCheck %s --check-prefix=NOSI --check-prefix=NOSICI
8 // RUN: not llvm-mc -arch=amdgcn -mcpu=bonaire -show-encoding %s 2>&1 | FileCheck %s --check-prefix=NOSICI
9 // RUN: not llvm-mc -arch=amdgcn -mcpu=tonga -show-encoding %s 2>&1 | FileCheck %s -check-prefix=NOVI
10
11
12 // GCN: v_nop ; encoding: [0x00,0x00,0x00,0x7e]
13 v_nop
14
15 // GCN: v_mov_b32_e32 v1, v2 ; encoding: [0x02,0x03,0x02,0x7e]
16 v_mov_b32 v1, v2
17
18 // GCN: v_readfirstlane_b32 s1, v2 ; encoding: [0x02,0x05,0x02,0x7e]
19 v_readfirstlane_b32 s1, v2
20
21 // GCN: v_cvt_i32_f64_e32 v1, v[2:3] ; encoding: [0x02,0x07,0x02,0x7e]
22 v_cvt_i32_f64 v1, v[2:3]
23
24 // GCN: v_cvt_f64_i32_e32 v[1:2], v2 ; encoding: [0x02,0x09,0x02,0x7e]
25 v_cvt_f64_i32 v[1:2], v2
26
27 // GCN: v_cvt_f32_i32_e32 v1, v2 ; encoding: [0x02,0x0b,0x02,0x7e]
28 v_cvt_f32_i32 v1, v2
29
30 // GCN: v_cvt_f32_u32_e32 v1, v2 ; encoding: [0x02,0x0d,0x02,0x7e]
31 v_cvt_f32_u32 v1, v2
32
33 // GCN: v_cvt_u32_f32_e32 v1, v2 ; encoding: [0x02,0x0f,0x02,0x7e
34 v_cvt_u32_f32 v1, v2
35
36 // GCN: v_cvt_i32_f32_e32 v1, v2 ; encoding: [0x02,0x11,0x02,0x7e]
37 v_cvt_i32_f32 v1, v2
38
39 // SICI: v_mov_fed_b32_e32 v1, v2 ; encoding: [0x02,0x13,0x02,0x7e]
40 // NOVI: error: instruction not supported on this GPU
41 v_mov_fed_b32 v1, v2
42
43 // GCN: v_cvt_f16_f32_e32 v1, v2 ; encoding: [0x02,0x15,0x02,0x7e]
44 v_cvt_f16_f32 v1, v2
45
46 // GCN: v_cvt_f32_f16_e32 v1, v2 ; encoding: [0x02,0x17,0x02,0x7e]
47 v_cvt_f32_f16 v1, v2
48
49 // GCN: v_cvt_rpi_i32_f32_e32 v1, v2 ; encoding: [0x02,0x19,0x02,0x7e]
50 v_cvt_rpi_i32_f32 v1, v2
51
52 // GCN: v_cvt_flr_i32_f32_e32 v1, v2 ; encoding: [0x02,0x1b,0x02,0x7e]
53 v_cvt_flr_i32_f32 v1, v2
54
55 // GCN: v_cvt_off_f32_i4_e32 v1, v2 ; encoding: [0x02,0x1d,0x02,0x7e]
56 v_cvt_off_f32_i4_e32 v1, v2
57
58 // GCN: v_cvt_f32_f64_e32 v1, v[2:3] ; encoding: [0x02,0x1f,0x02,0x7e]
59 v_cvt_f32_f64 v1, v[2:3]
60
61 // GCN: v_cvt_f64_f32_e32 v[1:2], v2 ; encoding: [0x02,0x21,0x02,0x7e]
62 v_cvt_f64_f32 v[1:2], v2
63
64 // GCN: v_cvt_f32_ubyte0_e32 v1, v2 ; encoding: [0x02,0x23,0x02,0x7e]
65 v_cvt_f32_ubyte0 v1, v2
66
67 // GCN: v_cvt_f32_ubyte1_e32 v1, v2 ; encoding: [0x02,0x25,0x02,0x7e]
68 v_cvt_f32_ubyte1_e32 v1, v2
69
70 // GCN: v_cvt_f32_ubyte2_e32 v1, v2 ; encoding: [0x02,0x27,0x02,0x7e]
71 v_cvt_f32_ubyte2 v1, v2
72
73 // GCN: v_cvt_f32_ubyte3_e32 v1, v2 ; encoding: [0x02,0x29,0x02,0x7e]
74 v_cvt_f32_ubyte3 v1, v2
75
76 // GCN: v_cvt_u32_f64_e32 v1, v[2:3] ; encoding: [0x02,0x2b,0x02,0x7e]
77 v_cvt_u32_f64 v1, v[2:3]
78
79 // GCN: v_cvt_f64_u32_e32 v[1:2], v2 ; encoding: [0x02,0x2d,0x02,0x7e]
80 v_cvt_f64_u32 v[1:2], v2
81
82 // NOSI: error: instruction not supported on this GPU
83 // NOSI: v_trunc_f64_e32 v[1:2], v[2:3]
84 // CIVI: v_trunc_f64_e32 v[1:2], v[2:3] ; encoding: [0x02,0x2f,0x02,0x7e]
85 v_trunc_f64_e32 v[1:2], v[2:3]
86
87 // NOSI: error: instruction not supported on this GPU
88 // NOSI: v_ceil_f64_e32 v[1:2], v[2:3]
89 // CIVI: v_ceil_f64_e32 v[1:2], v[2:3] ; encoding: [0x02,0x31,0x02,0x7e]
90 v_ceil_f64_e32 v[1:2], v[2:3]
91
92 // NOSI: error: instruction not supported on this GPU
93 // NOSI: v_rndne_f64_e32 v[1:2], v[2:3]
94 // CIVI: v_rndne_f64_e32 v[1:2], v[2:3] ; encoding: [0x02,0x33,0x02,0x7e]
95 v_rndne_f64_e32 v[1:2], v[2:3]
96
97 // NOSI: error: instruction not supported on this GPU
98 // NOSI: v_floor_f64_e32 v[1:2], v[2:3]
99 // CIVI: v_floor_f64_e32 v[1:2], v[2:3] ; encoding: [0x02,0x35,0x02,0x7e]
100 v_floor_f64_e32 v[1:2], v[2:3]
101
102 // SICI: v_fract_f32_e32 v1, v2 ; encoding: [0x02,0x41,0x02,0x7e]
103 // VI:   v_fract_f32_e32 v1, v2 ; encoding: [0x02,0x37,0x02,0x7e]
104 v_fract_f32 v1, v2
105
106 // SICI: v_trunc_f32_e32 v1, v2 ; encoding: [0x02,0x43,0x02,0x7e]
107 // VI:   v_trunc_f32_e32 v1, v2 ; encoding: [0x02,0x39,0x02,0x7e]
108 v_trunc_f32 v1, v2
109
110 // SICI: v_ceil_f32_e32 v1, v2 ; encoding: [0x02,0x45,0x02,0x7e]
111 // VI:   v_ceil_f32_e32 v1, v2 ; encoding: [0x02,0x3b,0x02,0x7e]
112 v_ceil_f32 v1, v2
113
114 // SICI: v_rndne_f32_e32 v1, v2 ; encoding: [0x02,0x47,0x02,0x7e]
115 // VI:   v_rndne_f32_e32 v1, v2 ; encoding: [0x02,0x3d,0x02,0x7e]
116 v_rndne_f32 v1, v2
117
118 // SICI: v_floor_f32_e32 v1, v2 ; encoding: [0x02,0x49,0x02,0x7e]
119 // VI:   v_floor_f32_e32 v1, v2 ; encoding: [0x02,0x3f,0x02,0x7e]
120 v_floor_f32_e32 v1, v2
121
122 // SICI: v_exp_f32_e32 v1, v2 ; encoding: [0x02,0x4b,0x02,0x7e]
123 // VI:   v_exp_f32_e32 v1, v2 ; encoding: [0x02,0x41,0x02,0x7e]
124 v_exp_f32 v1, v2
125
126 // SICI: v_log_clamp_f32_e32 v1, v2 ; encoding: [0x02,0x4d,0x02,0x7e]
127 // NOVI: error: instruction not supported on this GPU
128 // NOVI: v_log_clamp_f32 v1, v2
129 v_log_clamp_f32 v1, v2
130
131 // SICI: v_log_f32_e32 v1, v2 ; encoding: [0x02,0x4f,0x02,0x7e]
132 // VI:   v_log_f32_e32 v1, v2 ; encoding: [0x02,0x43,0x02,0x7e]
133 v_log_f32 v1, v2
134
135 // SICI: v_rcp_clamp_f32_e32 v1, v2 ; encoding: [0x02,0x51,0x02,0x7e]
136 // NOVI: error: instruction not supported on this GPU
137 // NOVI: v_rcp_clamp_f32 v1, v2
138 v_rcp_clamp_f32 v1, v2
139
140 // SICI: v_rcp_legacy_f32_e32 v1, v2 ; encoding: [0x02,0x53,0x02,0x7e]
141 // NOVI: error: instruction not supported on this GPU
142 // NOVI: v_rcp_legacy_f32 v1, v2
143 v_rcp_legacy_f32 v1, v2
144
145 // SICI: v_rcp_f32_e32 v1, v2 ; encoding: [0x02,0x55,0x02,0x7e]
146 // VI:   v_rcp_f32_e32 v1, v2 ; encoding: [0x02,0x45,0x02,0x7e]
147 v_rcp_f32 v1, v2
148
149 // SICI: v_rcp_iflag_f32_e32 v1, v2 ; encoding: [0x02,0x57,0x02,0x7e]
150 // VI:   v_rcp_iflag_f32_e32 v1, v2 ; encoding: [0x02,0x47,0x02,0x7e]
151 v_rcp_iflag_f32 v1, v2
152
153 // SICI: v_rsq_clamp_f32_e32 v1, v2 ; encoding: [0x02,0x59,0x02,0x7e]
154 // NOVI: error: instruction not supported on this GPU
155 // NOVI: v_rsq_clamp_f32 v1, v2
156 v_rsq_clamp_f32 v1, v2
157
158 // SICI: v_rsq_legacy_f32_e32 v1, v2 ; encoding: [0x02,0x5b,0x02,0x7e]
159 // NOVI: error: instruction not supported on this GPU
160 // NOVI: v_rsq_legacy_f32 v1, v2
161 v_rsq_legacy_f32 v1, v2
162
163 // SICI: v_rsq_f32_e32 v1, v2 ; encoding: [0x02,0x5d,0x02,0x7e]
164 // VI:   v_rsq_f32_e32 v1, v2 ; encoding: [0x02,0x49,0x02,0x7e]
165 v_rsq_f32_e32 v1, v2
166
167 // SICI: v_rcp_f64_e32 v[1:2], v[2:3] ; encoding: [0x02,0x5f,0x02,0x7e]
168 // VI:   v_rcp_f64_e32 v[1:2], v[2:3] ; encoding: [0x02,0x4b,0x02,0x7e]
169 v_rcp_f64 v[1:2], v[2:3]
170
171 // SICI: v_rcp_clamp_f64_e32 v[1:2], v[2:3] ; encoding: [0x02,0x61,0x02,0x7e]
172 // NOVI: error: instruction not supported on this GPU
173 // NOVI: v_rcp_clamp_f64 v[1:2], v[2:3]
174 v_rcp_clamp_f64 v[1:2], v[2:3]
175
176 // SICI: v_rsq_f64_e32 v[1:2], v[2:3] ; encoding: [0x02,0x63,0x02,0x7e]
177 // VI:   v_rsq_f64_e32 v[1:2], v[2:3] ; encoding: [0x02,0x4d,0x02,0x7e]
178 v_rsq_f64 v[1:2], v[2:3]
179
180 // SICI: v_rsq_clamp_f64_e32 v[1:2], v[2:3] ; encoding: [0x02,0x65,0x02,0x7e]
181 // NOVI: error: instruction not supported on this GPU
182 // NOVI: v_rsq_clamp_f64 v[1:2], v[2:3]
183 v_rsq_clamp_f64 v[1:2], v[2:3]
184
185 // SICI: v_sqrt_f32_e32 v1, v2 ; encoding: [0x02,0x67,0x02,0x7e]
186 // VI:   v_sqrt_f32_e32 v1, v2 ; encoding: [0x02,0x4f,0x02,0x7e]
187 v_sqrt_f32 v1, v2
188
189 // SICI: v_sqrt_f64_e32 v[1:2], v[2:3] ; encoding: [0x02,0x69,0x02,0x7e]
190 // VI:   v_sqrt_f64_e32 v[1:2], v[2:3] ; encoding: [0x02,0x51,0x02,0x7e]
191 v_sqrt_f64 v[1:2], v[2:3]
192
193 // SICI: v_sin_f32_e32 v1, v2 ; encoding: [0x02,0x6b,0x02,0x7e]
194 // VI:   v_sin_f32_e32 v1, v2 ; encoding: [0x02,0x53,0x02,0x7e]
195 v_sin_f32 v1, v2
196
197 // SICI: v_cos_f32_e32 v1, v2 ; encoding: [0x02,0x6d,0x02,0x7e]
198 // VI:   v_cos_f32_e32 v1, v2 ; encoding: [0x02,0x55,0x02,0x7e]
199 v_cos_f32 v1, v2
200
201 // SICI: v_not_b32_e32 v1, v2 ; encoding: [0x02,0x6f,0x02,0x7e]
202 // VI:   v_not_b32_e32 v1, v2 ; encoding: [0x02,0x57,0x02,0x7e]
203 v_not_b32 v1, v2
204
205 // SICI: v_bfrev_b32_e32 v1, v2 ; encoding: [0x02,0x71,0x02,0x7e]
206 // VI:   v_bfrev_b32_e32 v1, v2 ; encoding: [0x02,0x59,0x02,0x7e]
207 v_bfrev_b32 v1, v2
208
209 // SICI: v_ffbh_u32_e32 v1, v2 ; encoding: [0x02,0x73,0x02,0x7e]
210 // VI:   v_ffbh_u32_e32 v1, v2 ; encoding: [0x02,0x5b,0x02,0x7e]
211 v_ffbh_u32 v1, v2
212
213 // SICI: v_ffbl_b32_e32 v1, v2 ; encoding: [0x02,0x75,0x02,0x7e]
214 // VI:   v_ffbl_b32_e32 v1, v2 ; encoding: [0x02,0x5d,0x02,0x7e]
215 v_ffbl_b32 v1, v2
216
217 // SICI: v_ffbh_i32_e32 v1, v2 ; encoding: [0x02,0x77,0x02,0x7e]
218 // VI:   v_ffbh_i32_e32 v1, v2 ; encoding: [0x02,0x5f,0x02,0x7e]
219 v_ffbh_i32_e32 v1, v2
220
221 // SICI: v_frexp_exp_i32_f64_e32 v1, v[2:3] ; encoding: [0x02,0x79,0x02,0x7e]
222 // VI:   v_frexp_exp_i32_f64_e32 v1, v[2:3] ; encoding: [0x02,0x61,0x02,0x7e]
223 v_frexp_exp_i32_f64 v1, v[2:3]
224
225 // SICI: v_frexp_mant_f64_e32 v[1:2], v[2:3] ; encoding: [0x02,0x7b,0x02,0x7e]
226 // VI;   v_frexp_mant_f64_e32 v[1:2], v[2:3] ; encoding: [0x02,0x63,0x02,0x7e]
227 v_frexp_mant_f64 v[1:2], v[2:3]
228
229 // SICI: v_fract_f64_e32 v[1:2], v[2:3] ; encoding: [0x02,0x7d,0x02,0x7e]
230 // VI:   v_fract_f64_e32 v[1:2], v[2:3] ; encoding: [0x02,0x65,0x02,0x7e]
231 v_fract_f64 v[1:2], v[2:3]
232
233 // SICI: v_frexp_exp_i32_f32_e32 v1, v2 ; encoding: [0x02,0x7f,0x02,0x7e]
234 // VI:   v_frexp_exp_i32_f32_e32 v1, v2 ; encoding: [0x02,0x67,0x02,0x7e]
235 v_frexp_exp_i32_f32 v1, v2
236
237 // SICI: v_frexp_mant_f32_e32 v1, v2 ; encoding: [0x02,0x81,0x02,0x7e]
238 // VI:   v_frexp_mant_f32_e32 v1, v2 ; encoding: [0x02,0x69,0x02,0x7e]
239 v_frexp_mant_f32 v1, v2
240
241 // SICI: v_clrexcp ; encoding: [0x00,0x82,0x00,0x7e]
242 // VI:   v_clrexcp ; encoding: [0x00,0x6a,0x00,0x7e]
243 v_clrexcp
244
245 // SICI: v_movreld_b32_e32 v1, v2 ; encoding: [0x02,0x85,0x02,0x7e]
246 // VI:   v_movreld_b32_e32 v1, v2 ; encoding: [0x02,0x6d,0x02,0x7e]
247 v_movreld_b32 v1, v2
248
249 // SICI: v_movrels_b32_e32 v1, v2 ; encoding: [0x02,0x87,0x02,0x7e]
250 // VI:   v_movrels_b32_e32 v1, v2 ; encoding: [0x02,0x6f,0x02,0x7e]
251 v_movrels_b32 v1, v2
252
253 // SICI: v_movrelsd_b32_e32 v1, v2 ; encoding: [0x02,0x89,0x02,0x7e]
254 // VI:   v_movrelsd_b32_e32 v1, v2 ; encoding: [0x02,0x71,0x02,0x7e]
255 v_movrelsd_b32 v1, v2
256
257 // NOSI: error: instruction not supported on this GPU
258 // NOSI: v_log_legacy_f32 v1, v2
259 // CI: v_log_legacy_f32_e32 v1, v2 ; encoding: [0x02,0x8b,0x02,0x7e]
260 // VI: v_log_legacy_f32_e32 v1, v2 ; encoding: [0x02,0x99,0x02,0x7e]
261 v_log_legacy_f32 v1, v2
262
263 // NOSI: error: instruction not supported on this GPU
264 // NOSI: v_exp_legacy_f32 v1, v2
265 // CI: v_exp_legacy_f32_e32 v1, v2 ; encoding: [0x02,0x8d,0x02,0x7e]
266 // VI: v_exp_legacy_f32_e32 v1, v2 ; encoding: [0x02,0x97,0x02,0x7e]
267 v_exp_legacy_f32 v1, v2
268
269 // NOSICI: error: instruction not supported on this GPU
270 // NOSICI: v_cvt_f16_u16 v1, v2
271 // VI: v_cvt_f16_u16_e32 v1, v2 ; encoding: [0x02,0x73,0x02,0x7e]
272 v_cvt_f16_u16 v1, v2
273
274 // NOSICI: error: instruction not supported on this GPU
275 // NOSICI: v_cvt_f16_i16 v1, v2
276 // VI: v_cvt_f16_i16_e32 v1, v2 ; encoding: [0x02,0x75,0x02,0x7e]
277 v_cvt_f16_i16 v1, v2
278
279 // NOSICI: error: instruction not supported on this GPU
280 // NOSICI: v_cvt_u16_f16 v1, v2
281 // VI: v_cvt_u16_f16_e32 v1, v2 ; encoding: [0x02,0x77,0x02,0x7e]
282 v_cvt_u16_f16 v1, v2
283
284 // NOSICI: error: instruction not supported on this GPU
285 // NOSICI: v_cvt_i16_f16 v1, v2
286 // VI: v_cvt_i16_f16_e32 v1, v2 ; encoding: [0x02,0x79,0x02,0x7e]
287 v_cvt_i16_f16 v1, v2
288
289 // NOSICI: error: instruction not supported on this GPU
290 // NOSICI: v_rcp_f16 v1, v2
291 // VI: v_rcp_f16_e32 v1, v2 ; encoding: [0x02,0x7b,0x02,0x7e]
292 v_rcp_f16 v1, v2
293
294 // NOSICI: error: instruction not supported on this GPU
295 // NOSICI: v_sqrt_f16 v1, v2
296 // VI: v_sqrt_f16_e32 v1, v2 ; encoding: [0x02,0x7d,0x02,0x7e]
297 v_sqrt_f16 v1, v2
298
299 // NOSICI: error: instruction not supported on this GPU
300 // NOSICI: v_rsq_f16 v1, v2
301 // VI: v_rsq_f16_e32 v1, v2 ; encoding: [0x02,0x7f,0x02,0x7e]
302 v_rsq_f16 v1, v2
303
304 // NOSICI: error: instruction not supported on this GPU
305 // NOSICI: v_log_f16 v1, v2
306 // VI: v_log_f16_e32 v1, v2 ; encoding: [0x02,0x81,0x02,0x7e]
307 v_log_f16 v1, v2
308
309 // NOSICI: error: instruction not supported on this GPU
310 // NOSICI: v_exp_f16 v1, v2
311 // VI: v_exp_f16_e32 v1, v2 ; encoding: [0x02,0x83,0x02,0x7e]
312 v_exp_f16 v1, v2
313
314 // NOSICI: error: instruction not supported on this GPU
315 // NOSICI: v_frexp_mant_f16 v1, v2
316 // VI: v_frexp_mant_f16_e32 v1, v2 ; encoding: [0x02,0x85,0x02,0x7e]
317 v_frexp_mant_f16 v1, v2
318
319 // NOSICI: error: instruction not supported on this GPU
320 // NOSICI: v_frexp_exp_i16_f16 v1, v2
321 // VI: v_frexp_exp_i16_f16_e32 v1, v2 ; encoding: [0x02,0x87,0x02,0x7e]
322 v_frexp_exp_i16_f16 v1, v2
323
324 // NOSICI: error: instruction not supported on this GPU
325 // NOSICI: v_floor_f16 v1, v2
326 // VI: v_floor_f16_e32 v1, v2 ; encoding: [0x02,0x89,0x02,0x7e]
327 v_floor_f16 v1, v2
328
329 // NOSICI: error: instruction not supported on this GPU
330 // NOSICI: v_ceil_f16 v1, v2
331 // VI: v_ceil_f16_e32 v1, v2 ; encoding: [0x02,0x8b,0x02,0x7e]
332 v_ceil_f16 v1, v2
333
334 // NOSICI: error: instruction not supported on this GPU
335 // NOSICI: v_trunc_f16 v1, v2
336 // VI: v_trunc_f16_e32 v1, v2 ; encoding: [0x02,0x8d,0x02,0x7e]
337 v_trunc_f16 v1, v2
338
339 // NOSICI: error: instruction not supported on this GPU
340 // NOSICI: v_rndne_f16 v1, v2
341 // VI: v_rndne_f16_e32 v1, v2 ; encoding: [0x02,0x8f,0x02,0x7e]
342 v_rndne_f16 v1, v2
343
344 // NOSICI: error: instruction not supported on this GPU
345 // NOSICI: v_fract_f16 v1, v2
346 // VI: v_fract_f16_e32 v1, v2 ; encoding: [0x02,0x91,0x02,0x7e]
347 v_fract_f16 v1, v2
348
349 // NOSICI: error: instruction not supported on this GPU
350 // NOSICI: v_sin_f16 v1, v2
351 // VI: v_sin_f16_e32 v1, v2 ; encoding: [0x02,0x93,0x02,0x7e]
352 v_sin_f16 v1, v2
353
354 // NOSICI: error: instruction not supported on this GPU
355 // NOSICI: v_cos_f16 v1, v2
356 // VI: v_cos_f16_e32 v1, v2 ; encoding: [0x02,0x95,0x02,0x7e]
357 v_cos_f16 v1, v2