blob: 15e57fe6bffbc5e7115fd79730d5b90dbdb8fe72 [file] [log] [blame]
Matt Arsenault9e910142016-12-20 19:06:12 +00001; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=VI %s
2; RUN: not llc -march=amdgcn -mcpu=bonaire -verify-machineinstrs < %s 2>&1 | FileCheck -check-prefix=SICI %s
3; RUN: not llc -march=amdgcn -mcpu=tahiti -verify-machineinstrs < %s 2>&1 | FileCheck -check-prefix=SICI %s
4
5; GCN-LABEL: {{^}}s_input_output_i16:
6; SICI: error: couldn't allocate output register for constraint 's'
7; SICI: error: couldn't allocate input reg for constraint 's'
Matt Arsenault3dbeefa2017-03-21 21:39:51 +00008define amdgpu_kernel void @s_input_output_i16() #0 {
Matt Arsenault9e910142016-12-20 19:06:12 +00009 %v = tail call i16 asm sideeffect "s_mov_b32 $0, -1", "=s"()
10 tail call void asm sideeffect "; use $0", "s"(i16 %v) #0
11 ret void
12}
13
14; GCN-LABEL: {{^}}v_input_output_i16:
15; SICI: error: couldn't allocate output register for constraint 'v'
16; SICI: error: couldn't allocate input reg for constraint 'v'
Matt Arsenault3dbeefa2017-03-21 21:39:51 +000017define amdgpu_kernel void @v_input_output_i16() #0 {
Matt Arsenault9e910142016-12-20 19:06:12 +000018 %v = tail call i16 asm sideeffect "v_mov_b32 $0, -1", "=v"() #0
19 tail call void asm sideeffect "; use $0", "v"(i16 %v)
20 ret void
21}
22
23; GCN-LABEL: {{^}}s_input_output_f16:
24; SICI: error: couldn't allocate output register for constraint 's'
25; SICI: error: couldn't allocate input reg for constraint 's'
Matt Arsenault3dbeefa2017-03-21 21:39:51 +000026define amdgpu_kernel void @s_input_output_f16() #0 {
Matt Arsenault9e910142016-12-20 19:06:12 +000027 %v = tail call half asm sideeffect "s_mov_b32 $0, -1", "=s"() #0
28 tail call void asm sideeffect "; use $0", "s"(half %v)
29 ret void
30}
31
32; GCN-LABEL: {{^}}v_input_output_f16:
33; SICI: error: couldn't allocate output register for constraint 'v'
34; SICI: error: couldn't allocate input reg for constraint 'v'
Matt Arsenault3dbeefa2017-03-21 21:39:51 +000035define amdgpu_kernel void @v_input_output_f16() #0 {
Matt Arsenault9e910142016-12-20 19:06:12 +000036 %v = tail call half asm sideeffect "v_mov_b32 $0, -1", "=v"() #0
37 tail call void asm sideeffect "; use $0", "v"(half %v)
38 ret void
39}
40
41attributes #0 = { nounwind }