1 ; RUN: not llc < %s -mtriple=amdgcn -mcpu=bonaire -verify-machineinstrs | FileCheck --check-prefix=GCN %s
2 ; RUN: not llc < %s -mtriple=amdgcn -mcpu=tonga -verify-machineinstrs | FileCheck --check-prefix=GCN --check-prefix=VI %s
4 ; RUN: not llc < %s -mtriple=amdgcn -mcpu=bonaire -verify-machineinstrs 2>&1 | FileCheck --check-prefix=NOGCN --check-prefix=NOSI %s
5 ; RUN: not llc < %s -mtriple=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 define i32 @inline_A_constraint_H2() {
101 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i16 bitcast (half 1.0 to i16))
105 ; NOSI: error: invalid operand for inline asm constraint 'A'
106 ; VI-LABEL: {{^}}inline_A_constraint_H3:
107 define i32 @inline_A_constraint_H3() {
108 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i16 bitcast (half -1.0 to i16))
112 ; NOSI: error: invalid operand for inline asm constraint 'A'
113 ; VI-LABEL: {{^}}inline_A_constraint_H4:
114 define i32 @inline_A_constraint_H4() {
115 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(half 0xH3118)
119 ; NOSI: error: invalid operand for inline asm constraint 'A'
120 ; VI-LABEL: {{^}}inline_A_constraint_H5:
121 define i32 @inline_A_constraint_H5() {
122 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i16 bitcast (half 0xH3118 to i16))
126 ; NOSI: error: invalid operand for inline asm constraint 'A'
127 ; VI-LABEL: {{^}}inline_A_constraint_H6:
128 define i32 @inline_A_constraint_H6() {
129 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(half -0.5)
133 ; NOGCN: error: invalid operand for inline asm constraint 'A'
134 define i32 @inline_A_constraint_H7() {
135 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i16 bitcast (half 0xH3119 to i16))
139 ; NOGCN: error: invalid operand for inline asm constraint 'A'
140 define i32 @inline_A_constraint_H8() {
141 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i16 bitcast (half 0xH3117 to i16))
145 ; NOGCN: error: invalid operand for inline asm constraint 'A'
146 define i32 @inline_A_constraint_H9() {
147 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i16 65)
151 ;==============================================================================
152 ; 'A' constraint, 32-bit operand
153 ;==============================================================================
155 ; GCN-LABEL: {{^}}inline_A_constraint_F0:
156 ; GCN: v_mov_b32 {{v[0-9]+}}, -16
157 define i32 @inline_A_constraint_F0() {
158 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i32 -16)
162 ; GCN-LABEL: {{^}}inline_A_constraint_F1:
163 ; GCN: v_mov_b32 {{v[0-9]+}}, 1
164 define i32 @inline_A_constraint_F1() {
165 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i32 1)
169 ; GCN-LABEL: {{^}}inline_A_constraint_F2:
170 ; GCN: v_mov_b32 {{v[0-9]+}}, 0xbf000000
171 define i32 @inline_A_constraint_F2() {
172 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i32 bitcast (float -0.5 to i32))
176 ; GCN-LABEL: {{^}}inline_A_constraint_F3:
177 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x40000000
178 define i32 @inline_A_constraint_F3() {
179 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i32 bitcast (float 2.0 to i32))
183 ; GCN-LABEL: {{^}}inline_A_constraint_F4:
184 ; GCN: v_mov_b32 {{v[0-9]+}}, 0xc0800000
185 define i32 @inline_A_constraint_F4() {
186 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(float -4.0)
190 ; NOSI: error: invalid operand for inline asm constraint 'A'
191 ; VI-LABEL: {{^}}inline_A_constraint_F5:
192 ; VI: v_mov_b32 {{v[0-9]+}}, 0x3e22f983
193 define i32 @inline_A_constraint_F5() {
194 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i32 1042479491)
198 ; GCN-LABEL: {{^}}inline_A_constraint_F6:
199 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x3f000000
200 define i32 @inline_A_constraint_F6() {
201 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(float 0.5)
205 ; NOGCN: error: invalid operand for inline asm constraint 'A'
206 define i32 @inline_A_constraint_F7() {
207 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i32 1042479490)
211 ; NOGCN: error: invalid operand for inline asm constraint 'A'
212 define i32 @inline_A_constraint_F8() {
213 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i32 -17)
217 ;==============================================================================
218 ; 'A' constraint, 64-bit operand
219 ;==============================================================================
221 ; GCN-LABEL: {{^}}inline_A_constraint_D0:
222 ; GCN: v_mov_b32 {{v[0-9]+}}, -16
223 define i32 @inline_A_constraint_D0() {
224 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i64 -16)
228 ; GCN-LABEL: {{^}}inline_A_constraint_D1:
229 ; GCN: v_cvt_f32_f64 {{v[0-9]+}}, 0xc000000000000000
230 define i32 @inline_A_constraint_D1() {
231 %v0 = tail call i32 asm "v_cvt_f32_f64 $0, $1", "=v,A"(i64 bitcast (double -2.0 to i64))
235 ; GCN-LABEL: {{^}}inline_A_constraint_D2:
236 ; GCN: v_cvt_f32_f64 {{v[0-9]+}}, 0x3fe0000000000000
237 define i32 @inline_A_constraint_D2() {
238 %v0 = tail call i32 asm "v_cvt_f32_f64 $0, $1", "=v,A"(double 0.5)
242 ; NOSI: error: invalid operand for inline asm constraint 'A'
243 ; VI-LABEL: {{^}}inline_A_constraint_D3:
244 ; VI: v_cvt_f32_f64 {{v[0-9]+}}, 0x3fc45f306dc9c882
245 define i32 @inline_A_constraint_D3() {
246 %v0 = tail call i32 asm "v_cvt_f32_f64 $0, $1", "=v,A"(double 0.15915494309189532)
250 ; NOSI: error: invalid operand for inline asm constraint 'A'
251 ; VI-LABEL: {{^}}inline_A_constraint_D4:
252 ; VI: v_cvt_f32_f64 {{v[0-9]+}}, 0x3fc45f306dc9c882
253 define i32 @inline_A_constraint_D4() {
254 %v0 = tail call i32 asm "v_cvt_f32_f64 $0, $1", "=v,A"(i64 bitcast (double 0.15915494309189532 to i64))
258 ; GCN-LABEL: {{^}}inline_A_constraint_D5:
259 ; GCN: v_cvt_f32_f64 {{v[0-9]+}}, 0xc000000000000000
260 define i32 @inline_A_constraint_D5() {
261 %v0 = tail call i32 asm "v_cvt_f32_f64 $0, $1", "=v,A"(double -2.0)
265 ; NOGCN: error: invalid operand for inline asm constraint 'A'
266 define i32 @inline_A_constraint_D8() {
267 %v0 = tail call i32 asm "v_cvt_f32_f64 $0, $1", "=v,A"(double 1.1)
271 ; NOGCN: error: invalid operand for inline asm constraint 'A'
272 define i32 @inline_A_constraint_D9() {
273 %v0 = tail call i32 asm "v_cvt_f32_f64 $0, $1", "=v,A"(i64 bitcast (double 0.1 to i64))
277 ;==============================================================================
278 ; 'A' constraint, v2x16 operand
279 ;==============================================================================
281 ; NOSI: error: invalid operand for inline asm constraint 'A'
282 ; VI-LABEL: {{^}}inline_A_constraint_V0:
283 ; VI: v_mov_b32 {{v[0-9]+}}, -4
284 define i32 @inline_A_constraint_V0() {
285 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(<2 x i16> <i16 -4, i16 -4>)
289 ; NOSI: error: invalid operand for inline asm constraint 'A'
290 ; VI-LABEL: {{^}}inline_A_constraint_V1:
291 define i32 @inline_A_constraint_V1() {
292 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(<2 x half> <half -0.5, half -0.5>)
296 ; NOGCN: error: invalid operand for inline asm constraint 'A'
297 define i32 @inline_A_constraint_V2() {
298 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(<2 x i16> <i16 -4, i16 undef>)
302 ; NOGCN: error: invalid operand for inline asm constraint 'A'
303 define i32 @inline_A_constraint_V3() {
304 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(<2 x half> <half undef, half -0.5>)
308 ; NOGCN: error: invalid operand for inline asm constraint 'A'
309 define i32 @inline_A_constraint_V4() {
310 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(<2 x i16> <i16 1, i16 2>)
314 ; NOGCN: error: invalid operand for inline asm constraint 'A'
315 define i32 @inline_A_constraint_V5() {
316 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(<4 x i16> <i16 0, i16 0, i16 0, i16 0>)
320 ; NOGCN: error: invalid operand for inline asm constraint 'A'
321 define i32 @inline_A_constraint_V6() {
322 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(<2 x i32> <i32 0, i32 0>)
326 ;==============================================================================
327 ; 'A' constraint, type errors
328 ;==============================================================================
330 ; NOGCN: error: invalid operand for inline asm constraint 'A'
331 define i32 @inline_A_constraint_E1(i32 %x) {
332 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i32 %x)
336 ; NOGCN: error: invalid operand for inline asm constraint 'A'
337 define i32 @inline_A_constraint_E2() {
338 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i128 100000000000000000000)
342 ;==============================================================================
343 ; 'I' constraint, 16-bit operand
344 ;==============================================================================
346 ; NOSI: error: invalid operand for inline asm constraint 'I'
347 ; VI-LABEL: {{^}}inline_I_constraint_H0:
348 ; VI: v_mov_b32 {{v[0-9]+}}, 64
349 define i32 @inline_I_constraint_H0() {
350 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(i16 64)
354 ; NOSI: error: invalid operand for inline asm constraint 'I'
355 ; VI-LABEL: {{^}}inline_I_constraint_H1:
356 ; VI: v_mov_b32 {{v[0-9]+}}, -16
357 define i32 @inline_I_constraint_H1() {
358 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(half bitcast (i16 -16 to half))
362 ; NOGCN: error: invalid operand for inline asm constraint 'I'
363 define i32 @inline_I_constraint_H6() {
364 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(half 1.0)
368 ; NOGCN: error: invalid operand for inline asm constraint 'I'
369 define i32 @inline_I_constraint_H7() {
370 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(i16 bitcast (half -1.0 to i16))
374 ; NOGCN: error: invalid operand for inline asm constraint 'I'
375 define i32 @inline_I_constraint_H8() {
376 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(i16 -17)
380 ; NOGCN: error: invalid operand for inline asm constraint 'I'
381 define i32 @inline_I_constraint_H9() {
382 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(i16 65)
386 ;==============================================================================
387 ; 'I' constraint, 32-bit operand
388 ;==============================================================================
390 ; GCN-LABEL: {{^}}inline_I_constraint_F0:
391 ; GCN: v_mov_b32 {{v[0-9]+}}, -16
392 define i32 @inline_I_constraint_F0() {
393 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(i32 -16)
397 ; GCN-LABEL: {{^}}inline_I_constraint_F1:
398 ; GCN: v_mov_b32 {{v[0-9]+}}, -1
399 define i32 @inline_I_constraint_F1() {
400 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(float bitcast (i32 -1 to float))
404 ; NOGCN: error: invalid operand for inline asm constraint 'I'
405 define i32 @inline_I_constraint_F8() {
406 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(float -4.0)
410 ; NOGCN: error: invalid operand for inline asm constraint 'I'
411 define i32 @inline_I_constraint_F9() {
412 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(i32 -17)
416 ;==============================================================================
417 ; 'I' constraint, 64-bit operand
418 ;==============================================================================
420 ; GCN-LABEL: {{^}}inline_I_constraint_D0:
421 ; GCN: v_mov_b32 {{v[0-9]+}}, -16
422 define i32 @inline_I_constraint_D0() {
423 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(i64 -16)
427 ; NOGCN: error: invalid operand for inline asm constraint 'I'
428 define i32 @inline_I_constraint_D8() {
429 %v0 = tail call i32 asm "v_cvt_f32_f64 $0, $1", "=v,I"(double 0.5)
433 ; NOGCN: error: invalid operand for inline asm constraint 'I'
434 define i32 @inline_I_constraint_D9() {
435 %v0 = tail call i32 asm "v_cvt_f32_f64 $0, $1", "=v,I"(i64 65)
439 ;==============================================================================
440 ; 'I' constraint, v2x16 operand
441 ;==============================================================================
443 ; NOSI: error: invalid operand for inline asm constraint 'I'
444 ; VI-LABEL: {{^}}inline_I_constraint_V0:
445 ; VI: v_mov_b32 {{v[0-9]+}}, -4
446 define i32 @inline_I_constraint_V0() {
447 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(<2 x i16> <i16 -4, i16 -4>)
451 ; NOGCN: error: invalid operand for inline asm constraint 'I'
452 define i32 @inline_I_constraint_V1() {
453 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(<2 x half> <half -0.5, half -0.5>)
457 ; NOGCN: error: invalid operand for inline asm constraint 'I'
458 define i32 @inline_I_constraint_V2() {
459 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(<2 x i16> <i16 -4, i16 undef>)
463 ; NOGCN: error: invalid operand for inline asm constraint 'I'
464 define i32 @inline_I_constraint_V3() {
465 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(<2 x i16> <i16 1, i16 2>)
469 ; NOGCN: error: invalid operand for inline asm constraint 'I'
470 define i32 @inline_I_constraint_V4() {
471 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(<4 x i16> <i16 0, i16 0, i16 0, i16 0>)
475 ; NOGCN: error: invalid operand for inline asm constraint 'I'
476 define i32 @inline_I_constraint_V5() {
477 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(<2 x i32> <i32 0, i32 0>)
481 ;==============================================================================
482 ; 'I' constraint, type errors
483 ;==============================================================================
485 ; NOGCN: error: invalid operand for inline asm constraint 'I'
486 define i32 @inline_I_constraint_E1(i32 %x) {
487 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(i32 %x)
491 ; NOGCN: error: invalid operand for inline asm constraint 'I'
492 define i32 @inline_I_constraint_E2() {
493 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,I"(i128 100000000000000000000)
497 ;==============================================================================
498 ; 'J' constraint, 16-bit operand
499 ;==============================================================================
501 ; NOSI: error: invalid operand for inline asm constraint 'J'
502 ; VI-LABEL: {{^}}inline_J_constraint_H0:
503 ; VI: v_mov_b32 {{v[0-9]+}}, -1
504 define i32 @inline_J_constraint_H0() {
505 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(i16 65535)
509 ; NOSI: error: invalid operand for inline asm constraint 'J'
510 ; VI-LABEL: {{^}}inline_J_constraint_H1:
511 ; VI: v_mov_b32 {{v[0-9]+}}, 0x7fff
512 define i32 @inline_J_constraint_H1() {
513 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(i16 32767)
517 ; NOSI: error: invalid operand for inline asm constraint 'J'
518 ; VI-LABEL: {{^}}inline_J_constraint_H2:
519 ; VI: v_mov_b32 {{v[0-9]+}}, 0x8000
520 define i32 @inline_J_constraint_H2() {
521 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(i16 -32768)
525 ; NOSI: error: invalid operand for inline asm constraint 'J'
526 ; VI-LABEL: {{^}}inline_J_constraint_H3:
527 ; VI: v_mov_b32 {{v[0-9]+}}, 0x4800
528 define i32 @inline_J_constraint_H3() {
529 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(half 8.0)
533 ; NOSI: error: invalid operand for inline asm constraint 'J'
534 ; VI-LABEL: {{^}}inline_J_constraint_H4:
535 ; VI: v_mov_b32 {{v[0-9]+}}, -16
536 define i32 @inline_J_constraint_H4() {
537 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(half bitcast (i16 -16 to half))
541 ;==============================================================================
542 ; 'J' constraint, 32-bit operand
543 ;==============================================================================
545 ; GCN-LABEL: {{^}}inline_J_constraint_F0:
546 ; GCN: v_mov_b32 {{v[0-9]+}}, -1
547 define i32 @inline_J_constraint_F0() {
548 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(i32 -1)
552 ; GCN-LABEL: {{^}}inline_J_constraint_F1:
553 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x7fff
554 define i32 @inline_J_constraint_F1() {
555 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(i32 32767)
559 ; GCN-LABEL: {{^}}inline_J_constraint_F2:
560 ; GCN: v_mov_b32 {{v[0-9]+}}, 0xffff8000
561 define i32 @inline_J_constraint_F2() {
562 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(i32 -32768)
566 ; NOGCN: error: invalid operand for inline asm constraint 'J'
567 define i32 @inline_J_constraint_F6() {
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_F7() {
574 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(i32 -32769)
578 ; NOGCN: error: invalid operand for inline asm constraint 'J'
579 define i32 @inline_J_constraint_F8() {
580 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(float -4.0)
584 ;==============================================================================
585 ; 'J' constraint, 64-bit operand
586 ;==============================================================================
588 ; GCN-LABEL: {{^}}inline_J_constraint_D0:
589 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x7fff
590 define i32 @inline_J_constraint_D0() {
591 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(i64 32767)
595 ; GCN-LABEL: {{^}}inline_J_constraint_D1:
596 ; GCN: v_mov_b32 {{v[0-9]+}}, 0xffffffffffff8000
597 define i32 @inline_J_constraint_D1() {
598 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(i64 -32768)
602 ; NOGCN: error: invalid operand for inline asm constraint 'J'
603 define i32 @inline_J_constraint_D8() {
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_D9() {
610 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(i64 -32769)
614 ;==============================================================================
615 ; 'J' constraint, v2x16 operand
616 ;==============================================================================
618 ; NOSI: error: invalid operand for inline asm constraint 'J'
619 ; VI-LABEL: {{^}}inline_J_constraint_V0:
620 ; VI: v_mov_b32 {{v[0-9]+}}, -4
621 define i32 @inline_J_constraint_V0() {
622 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(<2 x i16> <i16 -4, i16 -4>)
626 ; NOSI: error: invalid operand for inline asm constraint 'J'
627 ; VI-LABEL: {{^}}inline_J_constraint_V1:
628 ; VI: v_mov_b32 {{v[0-9]+}}, 0x7fff
629 define i32 @inline_J_constraint_V1() {
630 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(<2 x i16> <i16 32767, i16 32767>)
634 ; NOSI: error: invalid operand for inline asm constraint 'J'
635 ; VI-LABEL: {{^}}inline_J_constraint_V2:
636 ; VI: v_mov_b32 {{v[0-9]+}}, 0x8000
637 define i32 @inline_J_constraint_V2() {
638 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(<2 x i16> <i16 -32768, i16 -32768>)
642 ; NOSI: error: invalid operand for inline asm constraint 'J'
643 ; VI-LABEL: {{^}}inline_J_constraint_V3:
644 ; VI: v_mov_b32 {{v[0-9]+}}, 0x4c00
645 define i32 @inline_J_constraint_V3() {
646 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(<2 x half> <half 16.0, half 16.0>)
650 ;==============================================================================
651 ; 'J' constraint, type errors
652 ;==============================================================================
654 ; NOGCN: error: invalid operand for inline asm constraint 'J'
655 define i32 @inline_J_constraint_E1(i32 %x) {
656 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(i32 %x)
660 ; NOGCN: error: invalid operand for inline asm constraint 'J'
661 define i32 @inline_J_constraint_E2() {
662 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,J"(i128 100000000000000000000)
666 ;==============================================================================
667 ; 'B' constraint, 16-bit operand
668 ;==============================================================================
670 ; NOSI: error: invalid operand for inline asm constraint 'B'
671 ; VI-LABEL: {{^}}inline_B_constraint_H0:
672 ; VI: v_mov_b32 {{v[0-9]+}}, 0x7fff
673 define i32 @inline_B_constraint_H0() {
674 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(i16 32767)
678 ; NOSI: error: invalid operand for inline asm constraint 'B'
679 ; VI-LABEL: {{^}}inline_B_constraint_H1:
680 ; VI: v_mov_b32 {{v[0-9]+}}, -1
681 define i32 @inline_B_constraint_H1() {
682 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(i16 65535)
686 ; NOSI: error: invalid operand for inline asm constraint 'B'
687 ; VI-LABEL: {{^}}inline_B_constraint_H3:
688 ; VI: v_mov_b32 {{v[0-9]+}}, 0x8000
689 define i32 @inline_B_constraint_H3() {
690 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(i16 -32768)
694 ; NOSI: error: invalid operand for inline asm constraint 'B'
695 ; VI-LABEL: {{^}}inline_B_constraint_H4:
696 ; VI: v_mov_b32 {{v[0-9]+}}, 0x4a80
697 define i32 @inline_B_constraint_H4() {
698 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(half 13.0)
702 ;==============================================================================
703 ; 'B' constraint, 32-bit operand
704 ;==============================================================================
706 ; GCN-LABEL: {{^}}inline_B_constraint_F0:
707 ; GCN: v_mov_b32 {{v[0-9]+}}, -1
708 define i32 @inline_B_constraint_F0() {
709 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(i32 4294967295)
713 ; GCN-LABEL: {{^}}inline_B_constraint_F1:
714 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x80000000
715 define i32 @inline_B_constraint_F1() {
716 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(i32 2147483648)
720 ; GCN-LABEL: {{^}}inline_B_constraint_F2:
721 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x42000000
722 define i32 @inline_B_constraint_F2() {
723 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(float 32.0)
727 ;==============================================================================
728 ; 'B' constraint, 64-bit operand
729 ;==============================================================================
731 ; GCN-LABEL: {{^}}inline_B_constraint_D0:
732 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x7fffffff
733 define i32 @inline_B_constraint_D0() {
734 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(i64 2147483647)
738 ; GCN-LABEL: {{^}}inline_B_constraint_D1:
739 ; GCN: v_mov_b32 {{v[0-9]+}}, -1
740 define i32 @inline_B_constraint_D1() {
741 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(i64 -1)
745 ; GCN-LABEL: {{^}}inline_B_constraint_D2:
746 ; GCN: v_mov_b32 {{v[0-9]+}}, 0xffffffff80000000
747 define i32 @inline_B_constraint_D2() {
748 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(i64 -2147483648)
752 ; NOGCN: error: invalid operand for inline asm constraint 'B'
753 define i32 @inline_B_constraint_D7() {
754 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(i64 -2147483649)
758 ; NOGCN: error: invalid operand for inline asm constraint 'B'
759 define i32 @inline_B_constraint_D8() {
760 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(i64 4294967295)
764 ; NOGCN: error: invalid operand for inline asm constraint 'B'
765 define i32 @inline_B_constraint_D9() {
766 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(i64 2147483648)
770 ;==============================================================================
771 ; 'B' constraint, v2x16 operand
772 ;==============================================================================
774 ; NOSI: error: invalid operand for inline asm constraint 'B'
775 ; VI-LABEL: {{^}}inline_B_constraint_V0:
776 ; VI: v_mov_b32 {{v[0-9]+}}, 0x7fff
777 define i32 @inline_B_constraint_V0() {
778 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(<2 x i16> <i16 32767, i16 32767>)
782 ; NOSI: error: invalid operand for inline asm constraint 'B'
783 ; VI-LABEL: {{^}}inline_B_constraint_V1:
784 ; VI: v_mov_b32 {{v[0-9]+}}, -1
785 define i32 @inline_B_constraint_V1() {
786 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(<2 x i16> <i16 -1, i16 -1>)
790 ; NOSI: error: invalid operand for inline asm constraint 'B'
791 ; VI-LABEL: {{^}}inline_B_constraint_V2:
792 ; VI: v_mov_b32 {{v[0-9]+}}, 0x8000
793 define i32 @inline_B_constraint_V2() {
794 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,B"(<2 x i16> <i16 -32768, i16 -32768>)
798 ;==============================================================================
799 ; 'C' constraint, 16-bit operand
800 ;==============================================================================
802 ; NOSI: error: invalid operand for inline asm constraint 'C'
803 ; VI-LABEL: {{^}}inline_C_constraint_H0:
804 ; VI: v_mov_b32 {{v[0-9]+}}, 0x7fff
805 define i32 @inline_C_constraint_H0() {
806 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(i16 32767)
810 ; NOSI: error: invalid operand for inline asm constraint 'C'
811 ; VI-LABEL: {{^}}inline_C_constraint_H1:
812 ; VI: v_mov_b32 {{v[0-9]+}}, -1
813 define i32 @inline_C_constraint_H1() {
814 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(i16 65535)
818 ; NOSI: error: invalid operand for inline asm constraint 'C'
819 ; VI-LABEL: {{^}}inline_C_constraint_H3:
820 ; VI: v_mov_b32 {{v[0-9]+}}, 0x8000
821 define i32 @inline_C_constraint_H3() {
822 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(i16 -32768)
826 ; NOSI: error: invalid operand for inline asm constraint 'C'
827 ; VI-LABEL: {{^}}inline_C_constraint_H4:
828 ; VI: v_mov_b32 {{v[0-9]+}}, 0x4a80
829 define i32 @inline_C_constraint_H4() {
830 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(half 13.0)
834 ;==============================================================================
835 ; 'C' constraint, 32-bit operand
836 ;==============================================================================
838 ; GCN-LABEL: {{^}}inline_C_constraint_F0:
839 ; GCN: v_mov_b32 {{v[0-9]+}}, -1
840 define i32 @inline_C_constraint_F0() {
841 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(i32 4294967295)
845 ; GCN-LABEL: {{^}}inline_C_constraint_F1:
846 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x80000000
847 define i32 @inline_C_constraint_F1() {
848 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(i32 2147483648)
852 ; GCN-LABEL: {{^}}inline_C_constraint_F2:
853 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x7fffffff
854 define i32 @inline_C_constraint_F2() {
855 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(i32 2147483647)
859 ; GCN-LABEL: {{^}}inline_C_constraint_F3:
860 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x42000000
861 define i32 @inline_C_constraint_F3() {
862 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(float 32.0)
866 ; GCN-LABEL: {{^}}inline_C_constraint_F4:
867 ; GCN: v_mov_b32 {{v[0-9]+}}, -16
868 define i32 @inline_C_constraint_F4() {
869 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(i32 -16)
873 ; GCN-LABEL: {{^}}inline_C_constraint_F5:
874 ; GCN: v_mov_b32 {{v[0-9]+}}, 0xffffffef
875 define i32 @inline_C_constraint_F5() {
876 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(i32 -17)
880 ;==============================================================================
881 ; 'C' constraint, 64-bit operand
882 ;==============================================================================
884 ; GCN-LABEL: {{^}}inline_C_constraint_D0:
885 ; GCN: v_mov_b32 {{v[0-9]+}}, 0xffffffff
886 define i32 @inline_C_constraint_D0() {
887 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(i64 4294967295)
891 ; GCN-LABEL: {{^}}inline_C_constraint_D1:
892 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x80000000
893 define i32 @inline_C_constraint_D1() {
894 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(i64 2147483648)
898 ; GCN-LABEL: {{^}}inline_C_constraint_D2:
899 ; GCN: v_mov_b32 {{v[0-9]+}}, -16
900 define i32 @inline_C_constraint_D2() {
901 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(i64 -16)
905 ; NOGCN: error: invalid operand for inline asm constraint 'C'
906 define i32 @inline_C_constraint_D8() {
907 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(i64 -17)
911 ; NOGCN: error: invalid operand for inline asm constraint 'C'
912 define i32 @inline_C_constraint_D9() {
913 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(i64 4294967296)
917 ;==============================================================================
918 ; 'C' constraint, v2x16 operand
919 ;==============================================================================
921 ; NOSI: error: invalid operand for inline asm constraint 'C'
922 ; VI-LABEL: {{^}}inline_C_constraint_V0:
923 ; VI: v_mov_b32 {{v[0-9]+}}, 0x7fff
924 define i32 @inline_C_constraint_V0() {
925 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(<2 x i16> <i16 32767, i16 32767>)
929 ; NOSI: error: invalid operand for inline asm constraint 'C'
930 ; VI-LABEL: {{^}}inline_C_constraint_V1:
931 ; VI: v_mov_b32 {{v[0-9]+}}, -1
932 define i32 @inline_C_constraint_V1() {
933 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(<2 x i16> <i16 -1, i16 -1>)
937 ; NOSI: error: invalid operand for inline asm constraint 'C'
938 ; VI-LABEL: {{^}}inline_C_constraint_V2:
939 ; VI: v_mov_b32 {{v[0-9]+}}, 0x8000
940 define i32 @inline_C_constraint_V2() {
941 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,C"(<2 x i16> <i16 -32768, i16 -32768>)
945 ;==============================================================================
946 ; 'DA' constraint, 16-bit operand
947 ;==============================================================================
949 ; NOSI: error: invalid operand for inline asm constraint 'DA'
950 ; VI-LABEL: {{^}}inline_DA_constraint_H0:
951 ; VI: v_mov_b32 {{v[0-9]+}}, 64
952 define i32 @inline_DA_constraint_H0() {
953 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i16 64)
957 ; NOSI: error: invalid operand for inline asm constraint 'DA'
958 ; VI-LABEL: {{^}}inline_DA_constraint_H1:
959 ; VI: v_mov_b32 {{v[0-9]+}}, -16
960 define i32 @inline_DA_constraint_H1() {
961 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i16 -16)
965 ; NOSI: error: invalid operand for inline asm constraint 'DA'
966 ; VI-LABEL: {{^}}inline_DA_constraint_H2:
967 define i32 @inline_DA_constraint_H2() {
968 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i16 bitcast (half 1.0 to i16))
972 ; NOSI: error: invalid operand for inline asm constraint 'DA'
973 ; VI-LABEL: {{^}}inline_DA_constraint_H3:
974 define i32 @inline_DA_constraint_H3() {
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_H4:
981 define i32 @inline_DA_constraint_H4() {
982 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(half 0xH3118)
986 ; NOSI: error: invalid operand for inline asm constraint 'DA'
987 ; VI-LABEL: {{^}}inline_DA_constraint_H5:
988 define i32 @inline_DA_constraint_H5() {
989 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i16 bitcast (half 0xH3118 to i16))
993 ; NOSI: error: invalid operand for inline asm constraint 'DA'
994 ; VI-LABEL: {{^}}inline_DA_constraint_H6:
995 define i32 @inline_DA_constraint_H6() {
996 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(half -0.5)
1000 ; NOGCN: error: invalid operand for inline asm constraint 'DA'
1001 define i32 @inline_DA_constraint_H7() {
1002 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i16 bitcast (half 0xH3119 to i16))
1006 ; NOGCN: error: invalid operand for inline asm constraint 'DA'
1007 define i32 @inline_DA_constraint_H8() {
1008 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i16 -17)
1012 ; NOGCN: error: invalid operand for inline asm constraint 'DA'
1013 define i32 @inline_DA_constraint_H9() {
1014 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i16 65)
1018 ;==============================================================================
1019 ; 'DA' constraint, 32-bit operand
1020 ;==============================================================================
1022 ; GCN-LABEL: {{^}}inline_DA_constraint_F0:
1023 ; GCN: v_mov_b32 {{v[0-9]+}}, -16
1024 define i32 @inline_DA_constraint_F0() {
1025 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i32 -16)
1029 ; GCN-LABEL: {{^}}inline_DA_constraint_F1:
1030 ; GCN: v_mov_b32 {{v[0-9]+}}, 1
1031 define i32 @inline_DA_constraint_F1() {
1032 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i32 1)
1036 ; GCN-LABEL: {{^}}inline_DA_constraint_F2:
1037 ; GCN: v_mov_b32 {{v[0-9]+}}, 0xbf000000
1038 define i32 @inline_DA_constraint_F2() {
1039 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i32 bitcast (float -0.5 to i32))
1043 ; GCN-LABEL: {{^}}inline_DA_constraint_F3:
1044 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x40000000
1045 define i32 @inline_DA_constraint_F3() {
1046 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i32 bitcast (float 2.0 to i32))
1050 ; GCN-LABEL: {{^}}inline_DA_constraint_F4:
1051 ; GCN: v_mov_b32 {{v[0-9]+}}, 0xc0800000
1052 define i32 @inline_DA_constraint_F4() {
1053 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(float -4.0)
1057 ; NOSI: error: invalid operand for inline asm constraint 'DA'
1058 ; VI-LABEL: {{^}}inline_DA_constraint_F5:
1059 ; VI: v_mov_b32 {{v[0-9]+}}, 0x3e22f983
1060 define i32 @inline_DA_constraint_F5() {
1061 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i32 1042479491)
1065 ; GCN-LABEL: {{^}}inline_DA_constraint_F6:
1066 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x3f000000
1067 define i32 @inline_DA_constraint_F6() {
1068 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(float 0.5)
1072 ; NOGCN: error: invalid operand for inline asm constraint 'DA'
1073 define i32 @inline_DA_constraint_F7() {
1074 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i32 65)
1078 ; NOGCN: error: invalid operand for inline asm constraint 'DA'
1079 define i32 @inline_DA_constraint_F8() {
1080 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i32 -17)
1084 ;==============================================================================
1085 ; 'DA' constraint, 64-bit operand
1086 ;==============================================================================
1088 ; GCN-LABEL: {{^}}inline_DA_constraint_D0:
1089 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x40fffffff0
1090 define i32 @inline_DA_constraint_D0() {
1091 %v0 = tail call i32 asm "v_mov_b32 $0, $1 >> 32", "=v,^DA"(i64 bitcast (double 0x40fffffff0 to i64))
1095 ; GCN-LABEL: {{^}}inline_DA_constraint_D1:
1096 ; GCN: v_mov_b32 {{v[0-9]+}}, 0xfffffff000000040
1097 define i32 @inline_DA_constraint_D1() {
1098 %v0 = tail call i32 asm "v_mov_b32 $0, $1 >> 32", "=v,^DA"(i64 bitcast (double 0xfffffff000000040 to i64))
1102 ; GCN-LABEL: {{^}}inline_DA_constraint_D2:
1103 ; GCN: v_mov_b32 {{v[0-9]+}}, -1
1104 define i32 @inline_DA_constraint_D2() {
1105 %v0 = tail call i32 asm "v_mov_b32 $0, $1 >> 32", "=v,^DA"(i64 -1)
1109 ; GCN-LABEL: {{^}}inline_DA_constraint_D3:
1110 ; GCN: v_mov_b32 {{v[0-9]+}}, 0xbf000000c0800000
1111 define i32 @inline_DA_constraint_D3() {
1112 %v0 = tail call i32 asm "v_mov_b32 $0, $1 >> 32", "=v,^DA"(i64 bitcast (double 0xbf000000c0800000 to i64))
1116 ; NOSI: error: invalid operand for inline asm constraint 'DA'
1117 ; VI-LABEL: {{^}}inline_DA_constraint_D4:
1118 ; VI: v_mov_b32 {{v[0-9]+}}, 0x3e22f9833e22f983
1119 define i32 @inline_DA_constraint_D4() {
1120 %v0 = tail call i32 asm "v_mov_b32 $0, $1 >> 32", "=v,^DA"(i64 bitcast (double 0x3e22f9833e22f983 to i64))
1124 ; NOGCN: error: invalid operand for inline asm constraint 'DA'
1125 define i32 @inline_DA_constraint_D5() {
1126 %v0 = tail call i32 asm "v_mov_b32 $0, $1 >> 32", "=v,^DA"(i64 bitcast (double 0x0000004000000041 to i64))
1130 ; NOGCN: error: invalid operand for inline asm constraint 'DA'
1131 define i32 @inline_DA_constraint_D8() {
1132 %v0 = tail call i32 asm "v_mov_b32 $0, $1 >> 32", "=v,^DA"(i64 bitcast (double 0x0000004100000040 to i64))
1136 ; NOGCN: error: invalid operand for inline asm constraint 'DA'
1137 define i32 @inline_DA_constraint_D9() {
1138 %v0 = tail call i32 asm "v_mov_b32 $0, $1 >> 32", "=v,^DA"(double 100.0)
1142 ;==============================================================================
1143 ; 'DA' constraint, v2x16 operand
1144 ;==============================================================================
1146 ; NOSI: error: invalid operand for inline asm constraint 'DA'
1147 ; VI-LABEL: {{^}}inline_DA_constraint_V0:
1148 ; VI: v_mov_b32 {{v[0-9]+}}, -4
1149 define i32 @inline_DA_constraint_V0() {
1150 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(<2 x i16> <i16 -4, i16 -4>)
1154 ; NOSI: error: invalid operand for inline asm constraint 'DA'
1155 ; VI-LABEL: {{^}}inline_DA_constraint_V1:
1156 define i32 @inline_DA_constraint_V1() {
1157 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(<2 x half> <half -0.5, half -0.5>)
1161 ; NOGCN: error: invalid operand for inline asm constraint 'DA'
1162 define i32 @inline_DA_constraint_V2() {
1163 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(<2 x i16> <i16 -4, i16 undef>)
1167 ; NOGCN: error: invalid operand for inline asm constraint 'DA'
1168 define i32 @inline_DA_constraint_V6() {
1169 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(<2 x i32> <i32 0, i32 0>)
1173 ;==============================================================================
1174 ; 'DA' constraint, type errors
1175 ;==============================================================================
1177 ; NOGCN: error: invalid operand for inline asm constraint 'DA'
1178 define i32 @inline_DA_constraint_E1(i32 %x) {
1179 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i32 %x)
1183 ; NOGCN: error: invalid operand for inline asm constraint 'DA'
1184 define i32 @inline_DA_constraint_E2() {
1185 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DA"(i128 100000000000000000000)
1189 ;==============================================================================
1190 ; 'DB' constraint, 16-bit operand
1191 ;==============================================================================
1193 ; NOSI: error: invalid operand for inline asm constraint 'DB'
1194 ; VI-LABEL: {{^}}inline_DB_constraint_H0:
1195 ; VI: v_mov_b32 {{v[0-9]+}}, 0x7fff
1196 define i32 @inline_DB_constraint_H0() {
1197 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DB"(i16 32767)
1201 ; NOSI: error: invalid operand for inline asm constraint 'DB'
1202 ; VI-LABEL: {{^}}inline_DB_constraint_H1:
1203 ; VI: v_mov_b32 {{v[0-9]+}}, -1
1204 define i32 @inline_DB_constraint_H1() {
1205 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DB"(i16 65535)
1209 ; NOSI: error: invalid operand for inline asm constraint 'DB'
1210 ; VI-LABEL: {{^}}inline_DB_constraint_H2:
1211 ; VI: v_mov_b32 {{v[0-9]+}}, 0x4a80
1212 define i32 @inline_DB_constraint_H2() {
1213 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DB"(half 13.0)
1217 ;==============================================================================
1218 ; 'DB' constraint, 32-bit operand
1219 ;==============================================================================
1221 ; GCN-LABEL: {{^}}inline_DB_constraint_F0:
1222 ; GCN: v_mov_b32 {{v[0-9]+}}, -1
1223 define i32 @inline_DB_constraint_F0() {
1224 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DB"(i32 4294967295)
1228 ; GCN-LABEL: {{^}}inline_DB_constraint_F1:
1229 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x80000000
1230 define i32 @inline_DB_constraint_F1() {
1231 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DB"(i32 2147483648)
1235 ; GCN-LABEL: {{^}}inline_DB_constraint_F2:
1236 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x42000000
1237 define i32 @inline_DB_constraint_F2() {
1238 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DB"(float 32.0)
1242 ;==============================================================================
1243 ; 'DB' constraint, 64-bit operand
1244 ;==============================================================================
1246 ; GCN-LABEL: {{^}}inline_DB_constraint_D0:
1247 ; GCN: v_mov_b32 {{v[0-9]+}}, -1
1248 define i32 @inline_DB_constraint_D0() {
1249 %v0 = tail call i32 asm "v_mov_b32 $0, $1 >> 32", "=v,^DB"(i64 -1)
1253 ; GCN-LABEL: {{^}}inline_DB_constraint_D1:
1254 ; GCN: v_mov_b32 {{v[0-9]+}}, 0x1234567890abcdef
1255 define i32 @inline_DB_constraint_D1() {
1256 %v0 = tail call i32 asm "v_mov_b32 $0, $1 >> 32", "=v,^DB"(i64 bitcast (double 0x1234567890abcdef to i64))
1260 ;==============================================================================
1261 ; 'DB' constraint, v2x16 operand
1262 ;==============================================================================
1264 ; NOSI: error: invalid operand for inline asm constraint 'DB'
1265 ; VI-LABEL: {{^}}inline_DB_constraint_V0:
1266 ; VI: v_mov_b32 {{v[0-9]+}}, 0x7fff
1267 define i32 @inline_DB_constraint_V0() {
1268 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DB"(<2 x i16> <i16 32767, i16 32767>)
1272 ; NOSI: error: invalid operand for inline asm constraint 'DB'
1273 ; VI-LABEL: {{^}}inline_DB_constraint_V1:
1274 ; VI: v_mov_b32 {{v[0-9]+}}, -1
1275 define i32 @inline_DB_constraint_V1() {
1276 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DB"(<2 x i16> <i16 65535, i16 65535>)
1280 ; NOSI: error: invalid operand for inline asm constraint 'DB'
1281 ; VI-LABEL: {{^}}inline_DB_constraint_V2:
1282 ; VI: v_mov_b32 {{v[0-9]+}}, 0xd640
1283 define i32 @inline_DB_constraint_V2() {
1284 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DB"(<2 x half> <half -100.0, half -100.0>)
1288 ;==============================================================================
1289 ; 'DB' constraint, type errors
1290 ;==============================================================================
1292 ; NOGCN: error: invalid operand for inline asm constraint 'DB'
1293 define i32 @inline_DB_constraint_E1(i32 %x) {
1294 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DB"(i32 %x)
1298 ; NOGCN: error: invalid operand for inline asm constraint 'DB'
1299 define i32 @inline_DB_constraint_E2() {
1300 %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,^DB"(i128 100000000000000000000)