1 # RUN: not llc -mtriple=amdgcn -mcpu=gfx802 -start-before postrapseudos -asm-verbose=0 -verify-machineinstrs %s -o - 2>&1 | FileCheck -check-prefixes=ERR,GFX8-ERR %s
2 # RUN: not llc -mtriple=amdgcn -mcpu=gfx802 -start-before postrapseudos -asm-verbose=0 -verify-machineinstrs %s -o - 2>&1 | FileCheck -check-prefix=GCN %s
3 # RUN: not llc -mtriple=amdgcn -mcpu=gfx900 -start-before postrapseudos -asm-verbose=0 -verify-machineinstrs %s -o - 2>&1 | FileCheck -check-prefix=ERR %s
4 # RUN: not llc -mtriple=amdgcn -mcpu=gfx900 -start-before postrapseudos -asm-verbose=0 -verify-machineinstrs %s -o - 2>&1 | FileCheck -check-prefixes=GCN,GFX9 %s
6 # Note: GFX8 did not allow SDWA SGPR sources. Therefor no HI16 subregs can be used there.
8 # GCN-LABEL: {{^}}lo_to_lo_illegal_vgpr_to_sgpr:
9 # GCN: ; illegal copy v0.l to s1.l
10 # ERR: error: <unknown>:0:0: in function lo_to_lo_illegal_vgpr_to_sgpr void (): illegal VGPR to SGPR copy
11 name: lo_to_lo_illegal_vgpr_to_sgpr
12 tracksRegLiveness: true
16 $sgpr1_lo16 = COPY $vgpr0_lo16
20 # GCN-LABEL: {{^}}lo_to_hi_sgpr_to_vgpr:
21 # GFX8: ; illegal copy s0.l to v1.h
22 # GFX9: v_mov_b32_sdwa v1, s0 dst_sel:WORD_1 dst_unused:UNUSED_PRESERVE src0_sel:WORD_0
23 # GFX8-ERR: error: <unknown>:0:0: in function lo_to_hi_sgpr_to_vgpr void (): Cannot use hi16 subreg on VI!
24 name: lo_to_hi_sgpr_to_vgpr
25 tracksRegLiveness: true
29 $vgpr1_hi16 = COPY killed $sgpr0_lo16
33 # GCN-LABEL: {{^}}lo_to_lo_illegal_agpr_to_sgpr:
34 # GCN: ; illegal copy a0.l to s1.l
35 # ERR: error: <unknown>:0:0: in function lo_to_lo_illegal_agpr_to_sgpr void (): illegal VGPR to SGPR copy
36 name: lo_to_lo_illegal_agpr_to_sgpr
37 tracksRegLiveness: true
41 $sgpr1_lo16 = COPY $agpr0_lo16
45 # GCN-LABEL: {{^}}lo_to_hi_vgpr_to_agpr:
46 # GCN: ; illegal copy v0.h to a1.l
47 # ERR: error: <unknown>:0:0: in function lo_to_hi_vgpr_to_agpr void (): Cannot use hi16 subreg with an AGPR!
48 name: lo_to_hi_vgpr_to_agpr
49 tracksRegLiveness: true
53 $agpr1_lo16 = COPY killed $vgpr0_hi16