66 lines · plain
1; RUN: not llc -mtriple=amdgcn -verify-machineinstrs=0 < %s 2>&1 | FileCheck -check-prefix=ERR %s2; RUN: not llc -mtriple=amdgcn -verify-machineinstrs=0 < %s 2>&1 | FileCheck -check-prefix=GCN %s3 4; ERR: error: <unknown>:0:0: in function illegal_vgpr_to_sgpr_copy_i32 void (): illegal VGPR to SGPR copy5; GCN: ; illegal copy v1 to s96 7define amdgpu_kernel void @illegal_vgpr_to_sgpr_copy_i32() #0 {8 %vgpr = call i32 asm sideeffect "; def $0", "=${v1}"()9 call void asm sideeffect "; use $0", "${s9}"(i32 %vgpr)10 ret void11}12 13; ERR: error: <unknown>:0:0: in function illegal_vgpr_to_sgpr_copy_v2i32 void (): illegal VGPR to SGPR copy14; GCN: ; illegal copy v[0:1] to s[10:11]15define amdgpu_kernel void @illegal_vgpr_to_sgpr_copy_v2i32() #0 {16 %vgpr = call <2 x i32> asm sideeffect "; def $0", "=${v[0:1]}"()17 call void asm sideeffect "; use $0", "${s[10:11]}"(<2 x i32> %vgpr)18 ret void19}20 21; ERR: error: <unknown>:0:0: in function illegal_vgpr_to_sgpr_copy_v4i32 void (): illegal VGPR to SGPR copy22; GCN: ; illegal copy v[0:3] to s[8:11]23define amdgpu_kernel void @illegal_vgpr_to_sgpr_copy_v4i32() #0 {24 %vgpr = call <4 x i32> asm sideeffect "; def $0", "=${v[0:3]}"()25 call void asm sideeffect "; use $0", "${s[8:11]}"(<4 x i32> %vgpr)26 ret void27}28 29; ERR: error: <unknown>:0:0: in function illegal_vgpr_to_sgpr_copy_v8i32 void (): illegal VGPR to SGPR copy30; GCN: ; illegal copy v[0:7] to s[8:15]31define amdgpu_kernel void @illegal_vgpr_to_sgpr_copy_v8i32() #0 {32 %vgpr = call <8 x i32> asm sideeffect "; def $0", "=${v[0:7]}"()33 call void asm sideeffect "; use $0", "${s[8:15]}"(<8 x i32> %vgpr)34 ret void35}36 37; ERR: error: <unknown>:0:0: in function illegal_vgpr_to_sgpr_copy_v16i32 void (): illegal VGPR to SGPR copy38; GCN: ; illegal copy v[0:15] to s[16:31]39define amdgpu_kernel void @illegal_vgpr_to_sgpr_copy_v16i32() #0 {40 %vgpr = call <16 x i32> asm sideeffect "; def $0", "=${v[0:15]}"()41 call void asm sideeffect "; use $0", "${s[16:31]}"(<16 x i32> %vgpr)42 ret void43}44 45; ERR: error: <unknown>:0:0: in function illegal_agpr_to_sgpr_copy_i32 void (): illegal VGPR to SGPR copy46; GCN: v_accvgpr_read_b32 [[COPY1:v[0-9]+]], a147; GCN: ; illegal copy [[COPY1]] to s948define amdgpu_kernel void @illegal_agpr_to_sgpr_copy_i32() #1 {49 %agpr = call i32 asm sideeffect "; def $0", "=${a1}"()50 call void asm sideeffect "; use $0", "${s9}"(i32 %agpr)51 ret void52}53 54; ERR: error: <unknown>:0:0: in function illegal_agpr_to_sgpr_copy_v2i32 void (): illegal VGPR to SGPR copy55; GCN-DAG: v_accvgpr_read_b32 v[[COPY1L:[0-9]+]], a056; GCN-DAG: v_accvgpr_read_b32 v[[COPY1H:[0-9]+]], a157; GCN: ; illegal copy v[[[COPY1L]]:[[COPY1H]]] to s[10:11]58define amdgpu_kernel void @illegal_agpr_to_sgpr_copy_v2i32() #1 {59 %vgpr = call <2 x i32> asm sideeffect "; def $0", "=${a[0:1]}"()60 call void asm sideeffect "; use $0", "${s[10:11]}"(<2 x i32> %vgpr)61 ret void62}63 64attributes #0 = { nounwind }65attributes #1 = { nounwind "target-cpu"="gfx908" }66