116 lines · plain
1; RUN: llc -mtriple=amdgcn -mcpu=tonga < %s | FileCheck -enable-var-scope -check-prefixes=GCN %s2; RUN: not llc -mtriple=amdgcn -mcpu=bonaire < %s 2>&1 | FileCheck -enable-var-scope -check-prefixes=INVALID %s3; RUN: not llc -mtriple=amdgcn -mcpu=tahiti < %s 2>&1 | FileCheck -enable-var-scope -check-prefixes=INVALID %s4 5; GCN-LABEL: {{^}}s_input_output_v8f166; GCN: s_mov_b32 s[0:3], -17; GCN: ; use s[0:3]8; INVALID: error: couldn't allocate output register for constraint 's'9; INVALID: error: couldn't allocate input reg for constraint 's'10define amdgpu_kernel void @s_input_output_v8f16() {11 %v = tail call <8 x half> asm sideeffect "s_mov_b32 $0, -1", "=s"()12 tail call void asm sideeffect "; use $0", "s"(<8 x half> %v)13 ret void14}15 16; GCN-LABEL: {{^}}s_input_output_v8i1617; GCN: s_mov_b32 s[0:3], -118; GCN: ; use s[0:3]19; INVALID: error: couldn't allocate output register for constraint 's'20; INVALID: error: couldn't allocate input reg for constraint 's'21define amdgpu_kernel void @s_input_output_v8i16() {22 %v = tail call <8 x i16> asm sideeffect "s_mov_b32 $0, -1", "=s"()23 tail call void asm sideeffect "; use $0", "s"(<8 x i16> %v)24 ret void25}26 27; GCN-LABEL: {{^}}v_input_output_v8f1628; GCN: v_mov_b32 v[0:3], -129; GCN: ; use v[0:3]30; INVALID: error: couldn't allocate output register for constraint 'v'31; INVALID: error: couldn't allocate input reg for constraint 'v'32define amdgpu_kernel void @v_input_output_v8f16() {33 %v = tail call <8 x half> asm sideeffect "v_mov_b32 $0, -1", "=v"()34 tail call void asm sideeffect "; use $0", "v"(<8 x half> %v)35 ret void36}37 38; GCN-LABEL: {{^}}v_input_output_v8i1639; GCN: v_mov_b32 v[0:3], -140; GCN: ; use v[0:3]41; INVALID: error: couldn't allocate output register for constraint 'v'42; INVALID: error: couldn't allocate input reg for constraint 'v'43define amdgpu_kernel void @v_input_output_v8i16() {44 %v = tail call <8 x i16> asm sideeffect "v_mov_b32 $0, -1", "=v"()45 tail call void asm sideeffect "; use $0", "v"(<8 x i16> %v)46 ret void47}48 49; GCN-LABEL: {{^}}s_input_output_v16f1650; GCN: s_mov_b32 s[0:7], -151; GCN: ; use s[0:7]52; INVALID: error: couldn't allocate output register for constraint 's'53; INVALID: error: couldn't allocate input reg for constraint 's'54define amdgpu_kernel void @s_input_output_v16f16() {55 %v = tail call <16 x half> asm sideeffect "s_mov_b32 $0, -1", "=s"()56 tail call void asm sideeffect "; use $0", "s"(<16 x half> %v)57 ret void58}59 60; GCN-LABEL: {{^}}s_input_output_v16i1661; GCN: s_mov_b32 s[0:7], -162; GCN: ; use s[0:7]63; INVALID: error: couldn't allocate output register for constraint 's'64; INVALID: error: couldn't allocate input reg for constraint 's'65define amdgpu_kernel void @s_input_output_v16i16() {66 %v = tail call <16 x i16> asm sideeffect "s_mov_b32 $0, -1", "=s"()67 tail call void asm sideeffect "; use $0", "s"(<16 x i16> %v)68 ret void69}70 71; GCN-LABEL: {{^}}v_input_output_v16f1672; GCN: v_mov_b32 v[0:7], -173; GCN: ; use v[0:7]74; INVALID: error: couldn't allocate output register for constraint 'v'75; INVALID: error: couldn't allocate input reg for constraint 'v'76define amdgpu_kernel void @v_input_output_v16f16() {77 %v = tail call <16 x half> asm sideeffect "v_mov_b32 $0, -1", "=v"()78 tail call void asm sideeffect "; use $0", "v"(<16 x half> %v)79 ret void80}81 82; GCN-LABEL: {{^}}v_input_output_v16i1683; GCN: v_mov_b32 v[0:7], -184; GCN: ; use v[0:7]85; INVALID: error: couldn't allocate output register for constraint 'v'86; INVALID: error: couldn't allocate input reg for constraint 'v'87define amdgpu_kernel void @v_input_output_v16i16() {88 %v = tail call <16 x i16> asm sideeffect "v_mov_b32 $0, -1", "=v"()89 tail call void asm sideeffect "; use $0", "v"(<16 x i16> %v)90 ret void91}92 93; GCN-LABEL: {{^}}v_input_output_v32f1694; GCN: v_mov_b32 v[0:15], -195; GCN: ; use v[0:15]96; INVALID: error: couldn't allocate output register for constraint 'v'97; INVALID: error: couldn't allocate input reg for constraint 'v'98define amdgpu_kernel void @v_input_output_v32f16() {99 %v = tail call <32 x half> asm sideeffect "v_mov_b32 $0, -1", "=v"()100 tail call void asm sideeffect "; use $0", "v"(<32 x half> %v)101 ret void102}103 104; GCN-LABEL: {{^}}v_input_output_v32i16105; GCN: v_mov_b32 v[0:15], -1106; GCN: ; use v[0:15]107; INVALID: error: couldn't allocate output register for constraint 'v'108; INVALID: error: couldn't allocate input reg for constraint 'v'109define amdgpu_kernel void @v_input_output_v32i16() {110 %v = tail call <32 x i16> asm sideeffect "v_mov_b32 $0, -1", "=v"()111 tail call void asm sideeffect "; use $0", "v"(<32 x i16> %v)112 ret void113}114 115attributes #0 = { nounwind }116