comparison llvm/test/CodeGen/AMDGPU/lo16-hi16-illegal-copy.mir @ 173:0572611fdcc8 llvm10 llvm12

reorgnization done
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 11:55:54 +0900
parents
children 1f2b6ac9f198
comparison
equal deleted inserted replaced
172:9fbae9c8bf63 173:0572611fdcc8
1 # RUN: not llc -march=amdgcn -mcpu=gfx802 -start-before postrapseudos -asm-verbose=0 -amdgpu-keep-16-bit-reg-suffixes -verify-machineinstrs %s -o - 2>&1 | FileCheck -check-prefixes=ERR,GFX8-ERR %s
2 # RUN: not llc -march=amdgcn -mcpu=gfx802 -start-before postrapseudos -asm-verbose=0 -amdgpu-keep-16-bit-reg-suffixes -verify-machineinstrs %s -o - 2>&1 | FileCheck -check-prefix=GCN %s
3 # RUN: not llc -march=amdgcn -mcpu=gfx900 -start-before postrapseudos -asm-verbose=0 -amdgpu-keep-16-bit-reg-suffixes -verify-machineinstrs %s -o - 2>&1 | FileCheck -check-prefix=ERR %s
4 # RUN: not llc -march=amdgcn -mcpu=gfx900 -start-before postrapseudos -asm-verbose=0 -amdgpu-keep-16-bit-reg-suffixes -verify-machineinstrs %s -o - 2>&1 | FileCheck -check-prefixes=GCN,GFX9 %s
5
6 # Note: GFX8 did not allow SDWA SGPR sources. Therefor no HI16 subregs can be used there.
7
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 SGPR to VGPR copy
11 name: lo_to_lo_illegal_vgpr_to_sgpr
12 tracksRegLiveness: true
13 body: |
14 bb.0:
15 $vgpr0 = IMPLICIT_DEF
16 $sgpr1_lo16 = COPY $vgpr0_lo16
17 S_ENDPGM 0
18 ...
19
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
26 body: |
27 bb.0:
28 $sgpr0 = IMPLICIT_DEF
29 $vgpr1_hi16 = COPY killed $sgpr0_lo16
30 S_ENDPGM 0
31 ...
32
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 SGPR to VGPR copy
36 name: lo_to_lo_illegal_agpr_to_sgpr
37 tracksRegLiveness: true
38 body: |
39 bb.0:
40 $agpr0 = IMPLICIT_DEF
41 $sgpr1_lo16 = COPY $agpr0_lo16
42 S_ENDPGM 0
43 ...
44
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
50 body: |
51 bb.0:
52 $vgpr0 = IMPLICIT_DEF
53 $agpr1_lo16 = COPY killed $vgpr0_hi16
54 S_ENDPGM 0
55 ...