1 ; RUN: not llc -mtriple=amdgcn -mcpu=bonaire -verify-machineinstrs < %s 2>&1 | FileCheck -check-prefix=GCN -check-prefix=SICI %s
2 ; RUN: not llc -mtriple=amdgcn -mcpu=tonga -verify-machineinstrs < %s 2>&1 | FileCheck -check-prefix=GCN %s
3 ; RUN: not llc -mtriple=amdgcn -mcpu=tahiti -verify-machineinstrs < %s 2>&1 | FileCheck -check-prefix=GCN -check-prefix=SICI %s
5 ; GCN: error: couldn't allocate output register for constraint 's'
6 ; GCN: error: couldn't allocate input reg for constraint 's'
7 define amdgpu_kernel void @s_input_output_i8() {
8 %v = tail call i8 asm sideeffect "s_mov_b32 $0, -1", "=s"()
9 tail call void asm sideeffect "; use $0", "s"(i8 %v)
13 ; GCN: error: couldn't allocate output register for constraint 'v'
14 ; GCN: error: couldn't allocate input reg for constraint 'v'
15 define amdgpu_kernel void @v_input_output_i8() {
16 %v = tail call i8 asm sideeffect "v_mov_b32 $0, -1", "=v"()
17 tail call void asm sideeffect "; use $0", "v"(i8 %v)
21 ; SICI: error: couldn't allocate output register for constraint 's'
22 ; SICI: error: couldn't allocate input reg for constraint 's'
24 define amdgpu_kernel void @s_input_output_v2f16() {
25 %v = tail call <2 x half> asm sideeffect "s_mov_b32 $0, -1", "=s"()
26 tail call void asm sideeffect "; use $0", "s"(<2 x half> %v)
30 ; SICI: error: couldn't allocate output register for constraint 'v'
31 ; SICI: error: couldn't allocate input reg for constraint 'v'
33 define amdgpu_kernel void @v_input_output_v2f16() {
34 %v = tail call <2 x half> asm sideeffect "v_mov_b32 $0, -1", "=v"()
35 tail call void asm sideeffect "; use $0", "v"(<2 x half> %v)
39 ; SICI: error: couldn't allocate output register for constraint 's'
40 ; SICI: error: couldn't allocate input reg for constraint 's'
42 define amdgpu_kernel void @s_input_output_v2i16() {
43 %v = tail call <2 x i16> asm sideeffect "s_mov_b32 $0, -1", "=s"()
44 tail call void asm sideeffect "; use $0", "s"(<2 x i16> %v)
48 ; FIXME: Crash in codegen prepare
49 ; define amdgpu_kernel void @s_input_output_i3() {
50 ; %v = tail call i3 asm sideeffect "s_mov_b32 $0, -1", "=s"()
51 ; tail call void asm sideeffect "; use $0", "s"(i3 %v)