1 ; RUN: not llc < %s -march=amdgcn -mcpu=bonaire -verify-machineinstrs | FileCheck --check-prefix=GCN %s
2 ; RUN: not llc < %s -march=amdgcn -mcpu=tonga -verify-machineinstrs | FileCheck --check-prefix=GCN --check-prefix=VI %s
4 ; RUN: not llc < %s -march=amdgcn -mcpu=bonaire -verify-machineinstrs 2>&1 | FileCheck --check-prefix=NOGCN --check-prefix=NOSI %s
5 ; RUN: not llc < %s -march=amdgcn -mcpu=tonga -verify-machineinstrs 2>&1 | FileCheck --check-prefix=NOGCN %s
7 ; GCN-LABEL: {{^}}inline_reg_constraints:
8 ; GCN: flat_load_dword v{{[0-9]+}}, v[{{[0-9]+:[0-9]+}}]
9 ; GCN: flat_load_dwordx2 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}]
10 ; GCN: flat_load_dwordx2 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}]
11 ; GCN: flat_load_dwordx4 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}]
12 ; GCN: flat_load_dwordx4 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}]
13 ; GCN: s_load_dword s{{[0-9]+}}, s[{{[0-9]+:[0-9]+}}]
14 ; GCN: s_load_dwordx2 s[{{[0-9]+:[0-9]+}}], s[{{[0-9]+:[0-9]+}}]
15 ; GCN: s_load_dwordx2 s[{{[0-9]+:[0-9]+}}], s[{{[0-9]+:[0-9]+}}]
16 ; GCN: s_load_dwordx4 s[{{[0-9]+:[0-9]+}}], s[{{[0-9]+:[0-9]+}}]
17 ; GCN: s_load_dwordx4 s[{{[0-9]+:[0-9]+}}], s[{{[0-9]+:[0-9]+}}]
18 ; GCN: s_load_dwordx8 s[{{[0-9]+:[0-9]+}}], s[{{[0-9]+:[0-9]+}}]
20 define amdgpu_kernel void @inline_reg_constraints(ptr addrspace(1) %ptr) {
22 %v32 = tail call i32 asm sideeffect "flat_load_dword $0, $1", "=v,v"(ptr addrspace(1) %ptr)
23 %v2_32 = tail call <2 x i32> asm sideeffect "flat_load_dwordx2 $0, $1", "=v,v"(ptr addrspace(1) %ptr)
24 %v64 = tail call i64 asm sideeffect "flat_load_dwordx2 $0, $1", "=v,v"(ptr addrspace(1) %ptr)
25 %v4_32 = tail call <4 x i32> asm sideeffect "flat_load_dwordx4 $0, $1", "=v,v"(ptr addrspace(1) %ptr)
26 %v128 = tail call i128 asm sideeffect "flat_load_dwordx4 $0, $1", "=v,v"(ptr addrspace(1) %ptr)
27 %s32 = tail call i32 asm sideeffect "s_load_dword $0, $1", "=s,s"(ptr addrspace(1) %ptr)
28 %s32_2 = tail call <2 x i32> asm sideeffect "s_load_dwordx2 $0, $1", "=s,s"(ptr addrspace(1) %ptr)
29 %s64 = tail call i64 asm sideeffect "s_load_dwordx2 $0, $1", "=s,s"(ptr addrspace(1) %ptr)
30 %s4_32 = tail call <4 x i32> asm sideeffect "s_load_dwordx4 $0, $1", "=s,s"(ptr addrspace(1) %ptr)
31 %s128 = tail call i128 asm sideeffect "s_load_dwordx4 $0, $1", "=s,s"(ptr addrspace(1) %ptr)
32 %s256 = tail call <8 x i32> asm sideeffect "s_load_dwordx8 $0, $1", "=s,s"(ptr addrspace(1) %ptr)
36 ; GCN-LABEL: {{^}}inline_sreg_constraint_m0:
37 ; GCN: s_mov_b32 m0, -1
40 define amdgpu_kernel void @inline_sreg_constraint_m0() {
41 %m0 = tail call i32 asm sideeffect "s_mov_b32 m0, -1", "={m0}"()
42 tail call void asm sideeffect "; use $0", "s"(i32 %m0)
46 ; GCN-LABEL: {{^}}inline_sreg_constraint_imm_i32:
47 ; GCN: s_mov_b32 [[REG:s[0-9]+]], 32
49 define amdgpu_kernel void @inline_sreg_constraint_imm_i32() {
50 tail call void asm sideeffect "; use $0", "s"(i32 32)
54 ; GCN-LABEL: {{^}}inline_sreg_constraint_imm_f32:
55 ; GCN: s_mov_b32 [[REG:s[0-9]+]], 1.0
57 define amdgpu_kernel void @inline_sreg_constraint_imm_f32() {
58 tail call void asm sideeffect "; use $0", "s"(float 1.0)
62 ; GCN-LABEL: {{^}}inline_sreg_constraint_imm_i64:
63 ; GCN: s_mov_b64 [[REG:s\[[0-9:]+\]]], -4{{$}}
65 define amdgpu_kernel void @inline_sreg_constraint_imm_i64() {
66 tail call void asm sideeffect "; use $0", "s"(i64 -4)
70 ; GCN-LABEL: {{^}}inline_sreg_constraint_imm_f64:
71 ; GCN: s_mov_b64 [[REG:s\[[0-9:]+\]]], 1.0{{$}}
73 define amdgpu_kernel void @inline_sreg_constraint_imm_f64() {
74 tail call void asm sideeffect "; use $0", "s"(double 1.0)
78 ;==============================================================================
79 ; 'A' constraint, 16-bit operand
80 ;==============================================================================
82 ; NOSI: error: invalid operand for inline asm constraint 'A'
83 ; VI-LABEL: {{^}}inline_A_constraint_H0:
84 ; VI: v_mov_b32 {{v[0-9]+}}, 64
85 define i32 @inline_A_constraint_H0() {
86 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i16 64)
90 ; NOSI: error: invalid operand for inline asm constraint 'A'
91 ; VI-LABEL: {{^}}inline_A_constraint_H1:
92 ; VI: v_mov_b32 {{v[0-9]+}}, -16
93 define i32 @inline_A_constraint_H1() {
94 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i16 -16)
98 ; NOSI: error: invalid operand for inline asm constraint 'A'
99 ; VI-LABEL: {{^}}inline_A_constraint_H2:
100 ; VI: v_mov_b32 {{v[0-9]+}}, 0x3c00
101 define i32 @inline_A_constraint_H2() {
102 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i16 bitcast (half 1.0 to i16))
106 ; NOSI: error: invalid operand for inline asm constraint 'A'
107 ; VI-LABEL: {{^}}inline_A_constraint_H3:
108 ; VI: v_mov_b32 {{v[0-9]+}}, 0xbc00
109 define i32 @inline_A_constraint_H3() {
110 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i16 bitcast (half -1.0 to i16))
114 ; NOSI: error: invalid operand for inline asm constraint 'A'
115 ; VI-LABEL: {{^}}inline_A_constraint_H4:
116 ; VI: v_mov_b32 {{v[0-9]+}}, 0x3118
117 define i32 @inline_A_constraint_H4() {
118 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(half 0xH3118)
122 ; NOSI: error: invalid operand for inline asm constraint 'A'
123 ; VI-LABEL: {{^}}inline_A_constraint_H5:
124 ; VI: v_mov_b32 {{v[0-9]+}}, 0x3118
125 define i32 @inline_A_constraint_H5() {
126 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i16 bitcast (half 0xH3118 to i16))
130 ; NOSI: error: invalid operand for inline asm constraint 'A'
131 ; VI-LABEL: {{^}}inline_A_constraint_H6:
132 ; VI: v_mov_b32 {{v[0-9]+}}, 0xb800
133 define i32 @inline_A_constraint_H6() {
134 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(half -0.5)
138 ; NOGCN: error: invalid operand for inline asm constraint 'A'
139 define i32 @inline_A_constraint_H7() {
140 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i16 bitcast (half 0xH3119 to i16))
144 ; NOGCN: error: invalid operand for inline asm constraint 'A'
145 define i32 @inline_A_constraint_H8() {
146 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i16 bitcast (half 0xH3117 to i16))
150 ; NOGCN: error: invalid operand for inline asm constraint 'A'
151 define i32 @inline_A_constraint_H9() {
152 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i16 65)
156 ;==============================================================================
157 ; 'A' constraint, 32-bit operand
158 ;==============================================================================
160 ; GCN-LABEL: {{^}}inline_A_constraint_F0:
161 ; GCN: v_mov_b32 {{v[0-9]+}}, -16
162 define i32 @inline_A_constraint_F0() {
163 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i32 -16)
167 ; GCN-LABEL: {{^}}inline_A_constraint_F1:
168 ; GCN: v_mov_b32 {{v[0-9]+}}, 1
169 define i32 @inline_A_constraint_F1() {
170 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i32 1)
174 ; GCN-LABEL: {{^}}inline_A_constraint_F2:
175 ; GCN: v_mov_b32 {{v[0-9]+}}, 0xbf000000
176 define i32 @inline_A_constraint_F2() {
177 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i32 bitcast (float -0.5 to i32))
181 ; GCN-LABEL: {{^}}inline_A_constraint_F3:
182 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x40000000
183 define i32 @inline_A_constraint_F3() {
184 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i32 bitcast (float 2.0 to i32))
188 ; GCN-LABEL: {{^}}inline_A_constraint_F4:
189 ; GCN: v_mov_b32 {{v[0-9]+}}, 0xc0800000
190 define i32 @inline_A_constraint_F4() {
191 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(float -4.0)
195 ; NOSI: error: invalid operand for inline asm constraint 'A'
196 ; VI-LABEL: {{^}}inline_A_constraint_F5:
197 ; VI: v_mov_b32 {{v[0-9]+}}, 0x3e22f983
198 define i32 @inline_A_constraint_F5() {
199 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i32 1042479491)
203 ; GCN-LABEL: {{^}}inline_A_constraint_F6:
204 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x3f000000
205 define i32 @inline_A_constraint_F6() {
206 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(float 0.5)
210 ; NOGCN: error: invalid operand for inline asm constraint 'A'
211 define i32 @inline_A_constraint_F7() {
212 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i32 1042479490)
216 ; NOGCN: error: invalid operand for inline asm constraint 'A'
217 define i32 @inline_A_constraint_F8() {
218 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i32 -17)
222 ;==============================================================================
223 ; 'A' constraint, 64-bit operand
224 ;==============================================================================
226 ; GCN-LABEL: {{^}}inline_A_constraint_D0:
227 ; GCN: v_mov_b32 {{v[0-9]+}}, -16
228 define i32 @inline_A_constraint_D0() {
229 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i64 -16)
233 ; GCN-LABEL: {{^}}inline_A_constraint_D1:
234 ; GCN: v_cvt_f32_f64 {{v[0-9]+}}, 0xc000000000000000
235 define i32 @inline_A_constraint_D1() {
236 %v0 = tail call i32 asm "v_cvt_f32_f64 $0, $1", "=v,A"(i64 bitcast (double -2.0 to i64))
240 ; GCN-LABEL: {{^}}inline_A_constraint_D2:
241 ; GCN: v_cvt_f32_f64 {{v[0-9]+}}, 0x3fe0000000000000
242 define i32 @inline_A_constraint_D2() {
243 %v0 = tail call i32 asm "v_cvt_f32_f64 $0, $1", "=v,A"(double 0.5)
247 ; NOSI: error: invalid operand for inline asm constraint 'A'
248 ; VI-LABEL: {{^}}inline_A_constraint_D3:
249 ; VI: v_cvt_f32_f64 {{v[0-9]+}}, 0x3fc45f306dc9c882
250 define i32 @inline_A_constraint_D3() {
251 %v0 = tail call i32 asm "v_cvt_f32_f64 $0, $1", "=v,A"(double 0.15915494309189532)
255 ; NOSI: error: invalid operand for inline asm constraint 'A'
256 ; VI-LABEL: {{^}}inline_A_constraint_D4:
257 ; VI: v_cvt_f32_f64 {{v[0-9]+}}, 0x3fc45f306dc9c882
258 define i32 @inline_A_constraint_D4() {
259 %v0 = tail call i32 asm "v_cvt_f32_f64 $0, $1", "=v,A"(i64 bitcast (double 0.15915494309189532 to i64))
263 ; GCN-LABEL: {{^}}inline_A_constraint_D5:
264 ; GCN: v_cvt_f32_f64 {{v[0-9]+}}, 0xc000000000000000
265 define i32 @inline_A_constraint_D5() {
266 %v0 = tail call i32 asm "v_cvt_f32_f64 $0, $1", "=v,A"(double -2.0)
270 ; NOGCN: error: invalid operand for inline asm constraint 'A'
271 define i32 @inline_A_constraint_D8() {
272 %v0 = tail call i32 asm "v_cvt_f32_f64 $0, $1", "=v,A"(double 1.1)
276 ; NOGCN: error: invalid operand for inline asm constraint 'A'
277 define i32 @inline_A_constraint_D9() {
278 %v0 = tail call i32 asm "v_cvt_f32_f64 $0, $1", "=v,A"(i64 bitcast (double 0.1 to i64))
282 ;==============================================================================
283 ; 'A' constraint, v2x16 operand
284 ;==============================================================================
286 ; NOSI: error: invalid operand for inline asm constraint 'A'
287 ; VI-LABEL: {{^}}inline_A_constraint_V0:
288 ; VI: v_mov_b32 {{v[0-9]+}}, -4
289 define i32 @inline_A_constraint_V0() {
290 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(<2 x i16> <i16 -4, i16 -4>)
294 ; NOSI: error: invalid operand for inline asm constraint 'A'
295 ; VI-LABEL: {{^}}inline_A_constraint_V1:
296 ; VI: v_mov_b32 {{v[0-9]+}}, 0xb800
297 define i32 @inline_A_constraint_V1() {
298 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(<2 x half> <half -0.5, half -0.5>)
302 ; NOGCN: error: invalid operand for inline asm constraint 'A'
303 define i32 @inline_A_constraint_V2() {
304 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(<2 x i16> <i16 -4, i16 undef>)
308 ; NOGCN: error: invalid operand for inline asm constraint 'A'
309 define i32 @inline_A_constraint_V3() {
310 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(<2 x half> <half undef, half -0.5>)
314 ; NOGCN: error: invalid operand for inline asm constraint 'A'
315 define i32 @inline_A_constraint_V4() {
316 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(<2 x i16> <i16 1, i16 2>)
320 ; NOGCN: error: invalid operand for inline asm constraint 'A'
321 define i32 @inline_A_constraint_V5() {
322 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(<4 x i16> <i16 0, i16 0, i16 0, i16 0>)
326 ; NOGCN: error: invalid operand for inline asm constraint 'A'
327 define i32 @inline_A_constraint_V6() {
328 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(<2 x i32> <i32 0, i32 0>)
332 ;==============================================================================
333 ; 'A' constraint, type errors
334 ;==============================================================================
336 ; NOGCN: error: invalid operand for inline asm constraint 'A'
337 define i32 @inline_A_constraint_E1(i32 %x) {
338 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i32 %x)
342 ; NOGCN: error: invalid operand for inline asm constraint 'A'
343 define i32 @inline_A_constraint_E2() {
344 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i128 100000000000000000000)
348 ;==============================================================================
349 ; 'I' constraint, 16-bit operand
350 ;==============================================================================
352 ; NOSI: error: invalid operand for inline asm constraint 'I'
353 ; VI-LABEL: {{^}}inline_I_constraint_H0:
354 ; VI: v_mov_b32 {{v[0-9]+}}, 64
355 define i32 @inline_I_constraint_H0() {
356 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(i16 64)
360 ; NOSI: error: invalid operand for inline asm constraint 'I'
361 ; VI-LABEL: {{^}}inline_I_constraint_H1:
362 ; VI: v_mov_b32 {{v[0-9]+}}, -16
363 define i32 @inline_I_constraint_H1() {
364 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(half bitcast (i16 -16 to half))
368 ; NOGCN: error: invalid operand for inline asm constraint 'I'
369 define i32 @inline_I_constraint_H6() {
370 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(half 1.0)
374 ; NOGCN: error: invalid operand for inline asm constraint 'I'
375 define i32 @inline_I_constraint_H7() {
376 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(i16 bitcast (half -1.0 to i16))
380 ; NOGCN: error: invalid operand for inline asm constraint 'I'
381 define i32 @inline_I_constraint_H8() {
382 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(i16 -17)
386 ; NOGCN: error: invalid operand for inline asm constraint 'I'
387 define i32 @inline_I_constraint_H9() {
388 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(i16 65)
392 ;==============================================================================
393 ; 'I' constraint, 32-bit operand
394 ;==============================================================================
396 ; GCN-LABEL: {{^}}inline_I_constraint_F0:
397 ; GCN: v_mov_b32 {{v[0-9]+}}, -16
398 define i32 @inline_I_constraint_F0() {
399 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(i32 -16)
403 ; GCN-LABEL: {{^}}inline_I_constraint_F1:
404 ; GCN: v_mov_b32 {{v[0-9]+}}, -1
405 define i32 @inline_I_constraint_F1() {
406 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(float bitcast (i32 -1 to float))
410 ; NOGCN: error: invalid operand for inline asm constraint 'I'
411 define i32 @inline_I_constraint_F8() {
412 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(float -4.0)
416 ; NOGCN: error: invalid operand for inline asm constraint 'I'
417 define i32 @inline_I_constraint_F9() {
418 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(i32 -17)
422 ;==============================================================================
423 ; 'I' constraint, 64-bit operand
424 ;==============================================================================
426 ; GCN-LABEL: {{^}}inline_I_constraint_D0:
427 ; GCN: v_mov_b32 {{v[0-9]+}}, -16
428 define i32 @inline_I_constraint_D0() {
429 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(i64 -16)
433 ; NOGCN: error: invalid operand for inline asm constraint 'I'
434 define i32 @inline_I_constraint_D8() {
435 %v0 = tail call i32 asm "v_cvt_f32_f64 $0, $1", "=v,I"(double 0.5)
439 ; NOGCN: error: invalid operand for inline asm constraint 'I'
440 define i32 @inline_I_constraint_D9() {
441 %v0 = tail call i32 asm "v_cvt_f32_f64 $0, $1", "=v,I"(i64 65)
445 ;==============================================================================
446 ; 'I' constraint, v2x16 operand
447 ;==============================================================================
449 ; NOSI: error: invalid operand for inline asm constraint 'I'
450 ; VI-LABEL: {{^}}inline_I_constraint_V0:
451 ; VI: v_mov_b32 {{v[0-9]+}}, -4
452 define i32 @inline_I_constraint_V0() {
453 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(<2 x i16> <i16 -4, i16 -4>)
457 ; NOGCN: error: invalid operand for inline asm constraint 'I'
458 define i32 @inline_I_constraint_V1() {
459 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(<2 x half> <half -0.5, half -0.5>)
463 ; NOGCN: error: invalid operand for inline asm constraint 'I'
464 define i32 @inline_I_constraint_V2() {
465 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(<2 x i16> <i16 -4, i16 undef>)
469 ; NOGCN: error: invalid operand for inline asm constraint 'I'
470 define i32 @inline_I_constraint_V3() {
471 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(<2 x i16> <i16 1, i16 2>)
475 ; NOGCN: error: invalid operand for inline asm constraint 'I'
476 define i32 @inline_I_constraint_V4() {
477 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(<4 x i16> <i16 0, i16 0, i16 0, i16 0>)
481 ; NOGCN: error: invalid operand for inline asm constraint 'I'
482 define i32 @inline_I_constraint_V5() {
483 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(<2 x i32> <i32 0, i32 0>)
487 ;==============================================================================
488 ; 'I' constraint, type errors
489 ;==============================================================================
491 ; NOGCN: error: invalid operand for inline asm constraint 'I'
492 define i32 @inline_I_constraint_E1(i32 %x) {
493 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(i32 %x)
497 ; NOGCN: error: invalid operand for inline asm constraint 'I'
498 define i32 @inline_I_constraint_E2() {
499 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(i128 100000000000000000000)
503 ;==============================================================================
504 ; 'J' constraint, 16-bit operand
505 ;==============================================================================
507 ; NOSI: error: invalid operand for inline asm constraint 'J'
508 ; VI-LABEL: {{^}}inline_J_constraint_H0:
509 ; VI: v_mov_b32 {{v[0-9]+}}, -1
510 define i32 @inline_J_constraint_H0() {
511 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(i16 65535)
515 ; NOSI: error: invalid operand for inline asm constraint 'J'
516 ; VI-LABEL: {{^}}inline_J_constraint_H1:
517 ; VI: v_mov_b32 {{v[0-9]+}}, 0x7fff
518 define i32 @inline_J_constraint_H1() {
519 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(i16 32767)
523 ; NOSI: error: invalid operand for inline asm constraint 'J'
524 ; VI-LABEL: {{^}}inline_J_constraint_H2:
525 ; VI: v_mov_b32 {{v[0-9]+}}, 0x8000
526 define i32 @inline_J_constraint_H2() {
527 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(i16 -32768)
531 ; NOSI: error: invalid operand for inline asm constraint 'J'
532 ; VI-LABEL: {{^}}inline_J_constraint_H3:
533 ; VI: v_mov_b32 {{v[0-9]+}}, 0x4800
534 define i32 @inline_J_constraint_H3() {
535 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(half 8.0)
539 ; NOSI: error: invalid operand for inline asm constraint 'J'
540 ; VI-LABEL: {{^}}inline_J_constraint_H4:
541 ; VI: v_mov_b32 {{v[0-9]+}}, -16
542 define i32 @inline_J_constraint_H4() {
543 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(half bitcast (i16 -16 to half))
547 ;==============================================================================
548 ; 'J' constraint, 32-bit operand
549 ;==============================================================================
551 ; GCN-LABEL: {{^}}inline_J_constraint_F0:
552 ; GCN: v_mov_b32 {{v[0-9]+}}, -1
553 define i32 @inline_J_constraint_F0() {
554 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(i32 -1)
558 ; GCN-LABEL: {{^}}inline_J_constraint_F1:
559 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x7fff
560 define i32 @inline_J_constraint_F1() {
561 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(i32 32767)
565 ; GCN-LABEL: {{^}}inline_J_constraint_F2:
566 ; GCN: v_mov_b32 {{v[0-9]+}}, 0xffff8000
567 define i32 @inline_J_constraint_F2() {
568 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(i32 -32768)
572 ; NOGCN: error: invalid operand for inline asm constraint 'J'
573 define i32 @inline_J_constraint_F6() {
574 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(i32 32768)
578 ; NOGCN: error: invalid operand for inline asm constraint 'J'
579 define i32 @inline_J_constraint_F7() {
580 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(i32 -32769)
584 ; NOGCN: error: invalid operand for inline asm constraint 'J'
585 define i32 @inline_J_constraint_F8() {
586 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(float -4.0)
590 ;==============================================================================
591 ; 'J' constraint, 64-bit operand
592 ;==============================================================================
594 ; GCN-LABEL: {{^}}inline_J_constraint_D0:
595 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x7fff
596 define i32 @inline_J_constraint_D0() {
597 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(i64 32767)
601 ; GCN-LABEL: {{^}}inline_J_constraint_D1:
602 ; GCN: v_mov_b32 {{v[0-9]+}}, 0xffffffffffff8000
603 define i32 @inline_J_constraint_D1() {
604 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(i64 -32768)
608 ; NOGCN: error: invalid operand for inline asm constraint 'J'
609 define i32 @inline_J_constraint_D8() {
610 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(i64 32768)
614 ; NOGCN: error: invalid operand for inline asm constraint 'J'
615 define i32 @inline_J_constraint_D9() {
616 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(i64 -32769)
620 ;==============================================================================
621 ; 'J' constraint, v2x16 operand
622 ;==============================================================================
624 ; NOSI: error: invalid operand for inline asm constraint 'J'
625 ; VI-LABEL: {{^}}inline_J_constraint_V0:
626 ; VI: v_mov_b32 {{v[0-9]+}}, -4
627 define i32 @inline_J_constraint_V0() {
628 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(<2 x i16> <i16 -4, i16 -4>)
632 ; NOSI: error: invalid operand for inline asm constraint 'J'
633 ; VI-LABEL: {{^}}inline_J_constraint_V1:
634 ; VI: v_mov_b32 {{v[0-9]+}}, 0x7fff
635 define i32 @inline_J_constraint_V1() {
636 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(<2 x i16> <i16 32767, i16 32767>)
640 ; NOSI: error: invalid operand for inline asm constraint 'J'
641 ; VI-LABEL: {{^}}inline_J_constraint_V2:
642 ; VI: v_mov_b32 {{v[0-9]+}}, 0x8000
643 define i32 @inline_J_constraint_V2() {
644 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(<2 x i16> <i16 -32768, i16 -32768>)
648 ; NOSI: error: invalid operand for inline asm constraint 'J'
649 ; VI-LABEL: {{^}}inline_J_constraint_V3:
650 ; VI: v_mov_b32 {{v[0-9]+}}, 0x4c00
651 define i32 @inline_J_constraint_V3() {
652 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(<2 x half> <half 16.0, half 16.0>)
656 ;==============================================================================
657 ; 'J' constraint, type errors
658 ;==============================================================================
660 ; NOGCN: error: invalid operand for inline asm constraint 'J'
661 define i32 @inline_J_constraint_E1(i32 %x) {
662 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(i32 %x)
666 ; NOGCN: error: invalid operand for inline asm constraint 'J'
667 define i32 @inline_J_constraint_E2() {
668 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(i128 100000000000000000000)
672 ;==============================================================================
673 ; 'B' constraint, 16-bit operand
674 ;==============================================================================
676 ; NOSI: error: invalid operand for inline asm constraint 'B'
677 ; VI-LABEL: {{^}}inline_B_constraint_H0:
678 ; VI: v_mov_b32 {{v[0-9]+}}, 0x7fff
679 define i32 @inline_B_constraint_H0() {
680 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(i16 32767)
684 ; NOSI: error: invalid operand for inline asm constraint 'B'
685 ; VI-LABEL: {{^}}inline_B_constraint_H1:
686 ; VI: v_mov_b32 {{v[0-9]+}}, -1
687 define i32 @inline_B_constraint_H1() {
688 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(i16 65535)
692 ; NOSI: error: invalid operand for inline asm constraint 'B'
693 ; VI-LABEL: {{^}}inline_B_constraint_H3:
694 ; VI: v_mov_b32 {{v[0-9]+}}, 0x8000
695 define i32 @inline_B_constraint_H3() {
696 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(i16 -32768)
700 ; NOSI: error: invalid operand for inline asm constraint 'B'
701 ; VI-LABEL: {{^}}inline_B_constraint_H4:
702 ; VI: v_mov_b32 {{v[0-9]+}}, 0x4a80
703 define i32 @inline_B_constraint_H4() {
704 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(half 13.0)
708 ;==============================================================================
709 ; 'B' constraint, 32-bit operand
710 ;==============================================================================
712 ; GCN-LABEL: {{^}}inline_B_constraint_F0:
713 ; GCN: v_mov_b32 {{v[0-9]+}}, -1
714 define i32 @inline_B_constraint_F0() {
715 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(i32 4294967295)
719 ; GCN-LABEL: {{^}}inline_B_constraint_F1:
720 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x80000000
721 define i32 @inline_B_constraint_F1() {
722 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(i32 2147483648)
726 ; GCN-LABEL: {{^}}inline_B_constraint_F2:
727 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x42000000
728 define i32 @inline_B_constraint_F2() {
729 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(float 32.0)
733 ;==============================================================================
734 ; 'B' constraint, 64-bit operand
735 ;==============================================================================
737 ; GCN-LABEL: {{^}}inline_B_constraint_D0:
738 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x7fffffff
739 define i32 @inline_B_constraint_D0() {
740 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(i64 2147483647)
744 ; GCN-LABEL: {{^}}inline_B_constraint_D1:
745 ; GCN: v_mov_b32 {{v[0-9]+}}, -1
746 define i32 @inline_B_constraint_D1() {
747 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(i64 -1)
751 ; GCN-LABEL: {{^}}inline_B_constraint_D2:
752 ; GCN: v_mov_b32 {{v[0-9]+}}, 0xffffffff80000000
753 define i32 @inline_B_constraint_D2() {
754 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(i64 -2147483648)
758 ; NOGCN: error: invalid operand for inline asm constraint 'B'
759 define i32 @inline_B_constraint_D7() {
760 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(i64 -2147483649)
764 ; NOGCN: error: invalid operand for inline asm constraint 'B'
765 define i32 @inline_B_constraint_D8() {
766 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(i64 4294967295)
770 ; NOGCN: error: invalid operand for inline asm constraint 'B'
771 define i32 @inline_B_constraint_D9() {
772 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(i64 2147483648)
776 ;==============================================================================
777 ; 'B' constraint, v2x16 operand
778 ;==============================================================================
780 ; NOSI: error: invalid operand for inline asm constraint 'B'
781 ; VI-LABEL: {{^}}inline_B_constraint_V0:
782 ; VI: v_mov_b32 {{v[0-9]+}}, 0x7fff
783 define i32 @inline_B_constraint_V0() {
784 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(<2 x i16> <i16 32767, i16 32767>)
788 ; NOSI: error: invalid operand for inline asm constraint 'B'
789 ; VI-LABEL: {{^}}inline_B_constraint_V1:
790 ; VI: v_mov_b32 {{v[0-9]+}}, -1
791 define i32 @inline_B_constraint_V1() {
792 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(<2 x i16> <i16 -1, i16 -1>)
796 ; NOSI: error: invalid operand for inline asm constraint 'B'
797 ; VI-LABEL: {{^}}inline_B_constraint_V2:
798 ; VI: v_mov_b32 {{v[0-9]+}}, 0x8000
799 define i32 @inline_B_constraint_V2() {
800 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(<2 x i16> <i16 -32768, i16 -32768>)
804 ;==============================================================================
805 ; 'C' constraint, 16-bit operand
806 ;==============================================================================
808 ; NOSI: error: invalid operand for inline asm constraint 'C'
809 ; VI-LABEL: {{^}}inline_C_constraint_H0:
810 ; VI: v_mov_b32 {{v[0-9]+}}, 0x7fff
811 define i32 @inline_C_constraint_H0() {
812 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(i16 32767)
816 ; NOSI: error: invalid operand for inline asm constraint 'C'
817 ; VI-LABEL: {{^}}inline_C_constraint_H1:
818 ; VI: v_mov_b32 {{v[0-9]+}}, -1
819 define i32 @inline_C_constraint_H1() {
820 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(i16 65535)
824 ; NOSI: error: invalid operand for inline asm constraint 'C'
825 ; VI-LABEL: {{^}}inline_C_constraint_H3:
826 ; VI: v_mov_b32 {{v[0-9]+}}, 0x8000
827 define i32 @inline_C_constraint_H3() {
828 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(i16 -32768)
832 ; NOSI: error: invalid operand for inline asm constraint 'C'
833 ; VI-LABEL: {{^}}inline_C_constraint_H4:
834 ; VI: v_mov_b32 {{v[0-9]+}}, 0x4a80
835 define i32 @inline_C_constraint_H4() {
836 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(half 13.0)
840 ;==============================================================================
841 ; 'C' constraint, 32-bit operand
842 ;==============================================================================
844 ; GCN-LABEL: {{^}}inline_C_constraint_F0:
845 ; GCN: v_mov_b32 {{v[0-9]+}}, -1
846 define i32 @inline_C_constraint_F0() {
847 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(i32 4294967295)
851 ; GCN-LABEL: {{^}}inline_C_constraint_F1:
852 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x80000000
853 define i32 @inline_C_constraint_F1() {
854 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(i32 2147483648)
858 ; GCN-LABEL: {{^}}inline_C_constraint_F2:
859 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x7fffffff
860 define i32 @inline_C_constraint_F2() {
861 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(i32 2147483647)
865 ; GCN-LABEL: {{^}}inline_C_constraint_F3:
866 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x42000000
867 define i32 @inline_C_constraint_F3() {
868 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(float 32.0)
872 ; GCN-LABEL: {{^}}inline_C_constraint_F4:
873 ; GCN: v_mov_b32 {{v[0-9]+}}, -16
874 define i32 @inline_C_constraint_F4() {
875 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(i32 -16)
879 ; GCN-LABEL: {{^}}inline_C_constraint_F5:
880 ; GCN: v_mov_b32 {{v[0-9]+}}, 0xffffffef
881 define i32 @inline_C_constraint_F5() {
882 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(i32 -17)
886 ;==============================================================================
887 ; 'C' constraint, 64-bit operand
888 ;==============================================================================
890 ; GCN-LABEL: {{^}}inline_C_constraint_D0:
891 ; GCN: v_mov_b32 {{v[0-9]+}}, 0xffffffff
892 define i32 @inline_C_constraint_D0() {
893 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(i64 4294967295)
897 ; GCN-LABEL: {{^}}inline_C_constraint_D1:
898 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x80000000
899 define i32 @inline_C_constraint_D1() {
900 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(i64 2147483648)
904 ; GCN-LABEL: {{^}}inline_C_constraint_D2:
905 ; GCN: v_mov_b32 {{v[0-9]+}}, -16
906 define i32 @inline_C_constraint_D2() {
907 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(i64 -16)
911 ; NOGCN: error: invalid operand for inline asm constraint 'C'
912 define i32 @inline_C_constraint_D8() {
913 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(i64 -17)
917 ; NOGCN: error: invalid operand for inline asm constraint 'C'
918 define i32 @inline_C_constraint_D9() {
919 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(i64 4294967296)
923 ;==============================================================================
924 ; 'C' constraint, v2x16 operand
925 ;==============================================================================
927 ; NOSI: error: invalid operand for inline asm constraint 'C'
928 ; VI-LABEL: {{^}}inline_C_constraint_V0:
929 ; VI: v_mov_b32 {{v[0-9]+}}, 0x7fff
930 define i32 @inline_C_constraint_V0() {
931 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(<2 x i16> <i16 32767, i16 32767>)
935 ; NOSI: error: invalid operand for inline asm constraint 'C'
936 ; VI-LABEL: {{^}}inline_C_constraint_V1:
937 ; VI: v_mov_b32 {{v[0-9]+}}, -1
938 define i32 @inline_C_constraint_V1() {
939 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(<2 x i16> <i16 -1, i16 -1>)
943 ; NOSI: error: invalid operand for inline asm constraint 'C'
944 ; VI-LABEL: {{^}}inline_C_constraint_V2:
945 ; VI: v_mov_b32 {{v[0-9]+}}, 0x8000
946 define i32 @inline_C_constraint_V2() {
947 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(<2 x i16> <i16 -32768, i16 -32768>)
951 ;==============================================================================
952 ; 'DA' constraint, 16-bit operand
953 ;==============================================================================
955 ; NOSI: error: invalid operand for inline asm constraint 'DA'
956 ; VI-LABEL: {{^}}inline_DA_constraint_H0:
957 ; VI: v_mov_b32 {{v[0-9]+}}, 64
958 define i32 @inline_DA_constraint_H0() {
959 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i16 64)
963 ; NOSI: error: invalid operand for inline asm constraint 'DA'
964 ; VI-LABEL: {{^}}inline_DA_constraint_H1:
965 ; VI: v_mov_b32 {{v[0-9]+}}, -16
966 define i32 @inline_DA_constraint_H1() {
967 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i16 -16)
971 ; NOSI: error: invalid operand for inline asm constraint 'DA'
972 ; VI-LABEL: {{^}}inline_DA_constraint_H2:
973 ; VI: v_mov_b32 {{v[0-9]+}}, 0x3c00
974 define i32 @inline_DA_constraint_H2() {
975 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i16 bitcast (half 1.0 to i16))
979 ; NOSI: error: invalid operand for inline asm constraint 'DA'
980 ; VI-LABEL: {{^}}inline_DA_constraint_H3:
981 ; VI: v_mov_b32 {{v[0-9]+}}, 0xbc00
982 define i32 @inline_DA_constraint_H3() {
983 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i16 bitcast (half -1.0 to i16))
987 ; NOSI: error: invalid operand for inline asm constraint 'DA'
988 ; VI-LABEL: {{^}}inline_DA_constraint_H4:
989 ; VI: v_mov_b32 {{v[0-9]+}}, 0x3118
990 define i32 @inline_DA_constraint_H4() {
991 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(half 0xH3118)
995 ; NOSI: error: invalid operand for inline asm constraint 'DA'
996 ; VI-LABEL: {{^}}inline_DA_constraint_H5:
997 ; VI: v_mov_b32 {{v[0-9]+}}, 0x3118
998 define i32 @inline_DA_constraint_H5() {
999 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i16 bitcast (half 0xH3118 to i16))
1003 ; NOSI: error: invalid operand for inline asm constraint 'DA'
1004 ; VI-LABEL: {{^}}inline_DA_constraint_H6:
1005 ; VI: v_mov_b32 {{v[0-9]+}}, 0xb800
1006 define i32 @inline_DA_constraint_H6() {
1007 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(half -0.5)
1011 ; NOGCN: error: invalid operand for inline asm constraint 'DA'
1012 define i32 @inline_DA_constraint_H7() {
1013 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i16 bitcast (half 0xH3119 to i16))
1017 ; NOGCN: error: invalid operand for inline asm constraint 'DA'
1018 define i32 @inline_DA_constraint_H8() {
1019 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i16 -17)
1023 ; NOGCN: error: invalid operand for inline asm constraint 'DA'
1024 define i32 @inline_DA_constraint_H9() {
1025 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i16 65)
1029 ;==============================================================================
1030 ; 'DA' constraint, 32-bit operand
1031 ;==============================================================================
1033 ; GCN-LABEL: {{^}}inline_DA_constraint_F0:
1034 ; GCN: v_mov_b32 {{v[0-9]+}}, -16
1035 define i32 @inline_DA_constraint_F0() {
1036 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i32 -16)
1040 ; GCN-LABEL: {{^}}inline_DA_constraint_F1:
1041 ; GCN: v_mov_b32 {{v[0-9]+}}, 1
1042 define i32 @inline_DA_constraint_F1() {
1043 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i32 1)
1047 ; GCN-LABEL: {{^}}inline_DA_constraint_F2:
1048 ; GCN: v_mov_b32 {{v[0-9]+}}, 0xbf000000
1049 define i32 @inline_DA_constraint_F2() {
1050 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i32 bitcast (float -0.5 to i32))
1054 ; GCN-LABEL: {{^}}inline_DA_constraint_F3:
1055 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x40000000
1056 define i32 @inline_DA_constraint_F3() {
1057 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i32 bitcast (float 2.0 to i32))
1061 ; GCN-LABEL: {{^}}inline_DA_constraint_F4:
1062 ; GCN: v_mov_b32 {{v[0-9]+}}, 0xc0800000
1063 define i32 @inline_DA_constraint_F4() {
1064 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(float -4.0)
1068 ; NOSI: error: invalid operand for inline asm constraint 'DA'
1069 ; VI-LABEL: {{^}}inline_DA_constraint_F5:
1070 ; VI: v_mov_b32 {{v[0-9]+}}, 0x3e22f983
1071 define i32 @inline_DA_constraint_F5() {
1072 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i32 1042479491)
1076 ; GCN-LABEL: {{^}}inline_DA_constraint_F6:
1077 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x3f000000
1078 define i32 @inline_DA_constraint_F6() {
1079 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(float 0.5)
1083 ; NOGCN: error: invalid operand for inline asm constraint 'DA'
1084 define i32 @inline_DA_constraint_F7() {
1085 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i32 65)
1089 ; NOGCN: error: invalid operand for inline asm constraint 'DA'
1090 define i32 @inline_DA_constraint_F8() {
1091 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i32 -17)
1095 ;==============================================================================
1096 ; 'DA' constraint, 64-bit operand
1097 ;==============================================================================
1099 ; GCN-LABEL: {{^}}inline_DA_constraint_D0:
1100 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x40fffffff0
1101 define i32 @inline_DA_constraint_D0() {
1102 %v0 = tail call i32 asm "v_mov_b32 $0, $1 >> 32", "=v,^DA"(i64 bitcast (double 0x40fffffff0 to i64))
1106 ; GCN-LABEL: {{^}}inline_DA_constraint_D1:
1107 ; GCN: v_mov_b32 {{v[0-9]+}}, 0xfffffff000000040
1108 define i32 @inline_DA_constraint_D1() {
1109 %v0 = tail call i32 asm "v_mov_b32 $0, $1 >> 32", "=v,^DA"(i64 bitcast (double 0xfffffff000000040 to i64))
1113 ; GCN-LABEL: {{^}}inline_DA_constraint_D2:
1114 ; GCN: v_mov_b32 {{v[0-9]+}}, -1
1115 define i32 @inline_DA_constraint_D2() {
1116 %v0 = tail call i32 asm "v_mov_b32 $0, $1 >> 32", "=v,^DA"(i64 -1)
1120 ; GCN-LABEL: {{^}}inline_DA_constraint_D3:
1121 ; GCN: v_mov_b32 {{v[0-9]+}}, 0xbf000000c0800000
1122 define i32 @inline_DA_constraint_D3() {
1123 %v0 = tail call i32 asm "v_mov_b32 $0, $1 >> 32", "=v,^DA"(i64 bitcast (double 0xbf000000c0800000 to i64))
1127 ; NOSI: error: invalid operand for inline asm constraint 'DA'
1128 ; VI-LABEL: {{^}}inline_DA_constraint_D4:
1129 ; VI: v_mov_b32 {{v[0-9]+}}, 0x3e22f9833e22f983
1130 define i32 @inline_DA_constraint_D4() {
1131 %v0 = tail call i32 asm "v_mov_b32 $0, $1 >> 32", "=v,^DA"(i64 bitcast (double 0x3e22f9833e22f983 to i64))
1135 ; NOGCN: error: invalid operand for inline asm constraint 'DA'
1136 define i32 @inline_DA_constraint_D5() {
1137 %v0 = tail call i32 asm "v_mov_b32 $0, $1 >> 32", "=v,^DA"(i64 bitcast (double 0x0000004000000041 to i64))
1141 ; NOGCN: error: invalid operand for inline asm constraint 'DA'
1142 define i32 @inline_DA_constraint_D8() {
1143 %v0 = tail call i32 asm "v_mov_b32 $0, $1 >> 32", "=v,^DA"(i64 bitcast (double 0x0000004100000040 to i64))
1147 ; NOGCN: error: invalid operand for inline asm constraint 'DA'
1148 define i32 @inline_DA_constraint_D9() {
1149 %v0 = tail call i32 asm "v_mov_b32 $0, $1 >> 32", "=v,^DA"(double 100.0)
1153 ;==============================================================================
1154 ; 'DA' constraint, v2x16 operand
1155 ;==============================================================================
1157 ; NOSI: error: invalid operand for inline asm constraint 'DA'
1158 ; VI-LABEL: {{^}}inline_DA_constraint_V0:
1159 ; VI: v_mov_b32 {{v[0-9]+}}, -4
1160 define i32 @inline_DA_constraint_V0() {
1161 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(<2 x i16> <i16 -4, i16 -4>)
1165 ; NOSI: error: invalid operand for inline asm constraint 'DA'
1166 ; VI-LABEL: {{^}}inline_DA_constraint_V1:
1167 ; VI: v_mov_b32 {{v[0-9]+}}, 0xb800
1168 define i32 @inline_DA_constraint_V1() {
1169 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(<2 x half> <half -0.5, half -0.5>)
1173 ; NOGCN: error: invalid operand for inline asm constraint 'DA'
1174 define i32 @inline_DA_constraint_V2() {
1175 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(<2 x i16> <i16 -4, i16 undef>)
1179 ; NOGCN: error: invalid operand for inline asm constraint 'DA'
1180 define i32 @inline_DA_constraint_V6() {
1181 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(<2 x i32> <i32 0, i32 0>)
1185 ;==============================================================================
1186 ; 'DA' constraint, type errors
1187 ;==============================================================================
1189 ; NOGCN: error: invalid operand for inline asm constraint 'DA'
1190 define i32 @inline_DA_constraint_E1(i32 %x) {
1191 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i32 %x)
1195 ; NOGCN: error: invalid operand for inline asm constraint 'DA'
1196 define i32 @inline_DA_constraint_E2() {
1197 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i128 100000000000000000000)
1201 ;==============================================================================
1202 ; 'DB' constraint, 16-bit operand
1203 ;==============================================================================
1205 ; NOSI: error: invalid operand for inline asm constraint 'DB'
1206 ; VI-LABEL: {{^}}inline_DB_constraint_H0:
1207 ; VI: v_mov_b32 {{v[0-9]+}}, 0x7fff
1208 define i32 @inline_DB_constraint_H0() {
1209 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DB"(i16 32767)
1213 ; NOSI: error: invalid operand for inline asm constraint 'DB'
1214 ; VI-LABEL: {{^}}inline_DB_constraint_H1:
1215 ; VI: v_mov_b32 {{v[0-9]+}}, -1
1216 define i32 @inline_DB_constraint_H1() {
1217 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DB"(i16 65535)
1221 ; NOSI: error: invalid operand for inline asm constraint 'DB'
1222 ; VI-LABEL: {{^}}inline_DB_constraint_H2:
1223 ; VI: v_mov_b32 {{v[0-9]+}}, 0x4a80
1224 define i32 @inline_DB_constraint_H2() {
1225 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DB"(half 13.0)
1229 ;==============================================================================
1230 ; 'DB' constraint, 32-bit operand
1231 ;==============================================================================
1233 ; GCN-LABEL: {{^}}inline_DB_constraint_F0:
1234 ; GCN: v_mov_b32 {{v[0-9]+}}, -1
1235 define i32 @inline_DB_constraint_F0() {
1236 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DB"(i32 4294967295)
1240 ; GCN-LABEL: {{^}}inline_DB_constraint_F1:
1241 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x80000000
1242 define i32 @inline_DB_constraint_F1() {
1243 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DB"(i32 2147483648)
1247 ; GCN-LABEL: {{^}}inline_DB_constraint_F2:
1248 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x42000000
1249 define i32 @inline_DB_constraint_F2() {
1250 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DB"(float 32.0)
1254 ;==============================================================================
1255 ; 'DB' constraint, 64-bit operand
1256 ;==============================================================================
1258 ; GCN-LABEL: {{^}}inline_DB_constraint_D0:
1259 ; GCN: v_mov_b32 {{v[0-9]+}}, -1
1260 define i32 @inline_DB_constraint_D0() {
1261 %v0 = tail call i32 asm "v_mov_b32 $0, $1 >> 32", "=v,^DB"(i64 -1)
1265 ; GCN-LABEL: {{^}}inline_DB_constraint_D1:
1266 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x1234567890abcdef
1267 define i32 @inline_DB_constraint_D1() {
1268 %v0 = tail call i32 asm "v_mov_b32 $0, $1 >> 32", "=v,^DB"(i64 bitcast (double 0x1234567890abcdef to i64))
1272 ;==============================================================================
1273 ; 'DB' constraint, v2x16 operand
1274 ;==============================================================================
1276 ; NOSI: error: invalid operand for inline asm constraint 'DB'
1277 ; VI-LABEL: {{^}}inline_DB_constraint_V0:
1278 ; VI: v_mov_b32 {{v[0-9]+}}, 0x7fff
1279 define i32 @inline_DB_constraint_V0() {
1280 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DB"(<2 x i16> <i16 32767, i16 32767>)
1284 ; NOSI: error: invalid operand for inline asm constraint 'DB'
1285 ; VI-LABEL: {{^}}inline_DB_constraint_V1:
1286 ; VI: v_mov_b32 {{v[0-9]+}}, -1
1287 define i32 @inline_DB_constraint_V1() {
1288 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DB"(<2 x i16> <i16 65535, i16 65535>)
1292 ; NOSI: error: invalid operand for inline asm constraint 'DB'
1293 ; VI-LABEL: {{^}}inline_DB_constraint_V2:
1294 ; VI: v_mov_b32 {{v[0-9]+}}, 0xd640
1295 define i32 @inline_DB_constraint_V2() {
1296 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DB"(<2 x half> <half -100.0, half -100.0>)
1300 ;==============================================================================
1301 ; 'DB' constraint, type errors
1302 ;==============================================================================
1304 ; NOGCN: error: invalid operand for inline asm constraint 'DB'
1305 define i32 @inline_DB_constraint_E1(i32 %x) {
1306 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DB"(i32 %x)
1310 ; NOGCN: error: invalid operand for inline asm constraint 'DB'
1311 define i32 @inline_DB_constraint_E2() {
1312 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DB"(i128 100000000000000000000)