1// RUN: not llvm-mc -arch=amdgcn -mcpu=tahiti %s 2>&1 | FileCheck -check-prefixes=GCN-ERR,SICIVI9-ERR,SIVICI-ERR,SI-ERR --implicit-check-not=error: %s
2// RUN: not llvm-mc -arch=amdgcn -mcpu=tonga %s 2>&1 | FileCheck -check-prefixes=GCN-ERR,SICIVI9-ERR,SIVICI-ERR,VI-ERR --implicit-check-not=error: %s
3// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx900 %s 2>&1 | FileCheck -check-prefixes=GCN-ERR,GFX9-ERR,SICIVI9-ERR --implicit-check-not=error: %s
4// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1010 %s 2>&1 | FileCheck -check-prefixes=GCN-ERR,GFX10-ERR --implicit-check-not=error: %s
5
6// RUN: not llvm-mc -arch=amdgcn -mcpu=tahiti -show-encoding %s | FileCheck -check-prefix=SIVICI %s
7// RUN: not llvm-mc -arch=amdgcn -mcpu=tonga -show-encoding %s | FileCheck -check-prefixes=SIVICI,CIVI9 %s
8// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx900 -show-encoding %s | FileCheck -check-prefixes=GFX9,CIVI9 %s
9// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1010 -show-encoding %s | FileCheck -check-prefix=GFX10 %s
10
11s_add_i32 s106, s0, s1
12// GCN-ERR: error: register index is out of range
13
14s_add_i32 s104, s0, s1
15// SICIVI9-ERR: error: register not available on this GPU
16// GFX10: s_add_i32 s104, s0, s1 ; encoding:
17
18s_add_i32 s105, s0, s1
19// SICIVI9-ERR: error: register not available on this GPU
20// GFX10: s_add_i32 s105, s0, s1 ; encoding:
21
22v_add_i32 v256, v0, v1
23// GFX10-ERR: error: instruction not supported on this GPU
24// GFX9-ERR: error: register index is out of range
25// SI-ERR: error: register index is out of range
26// VI-ERR: error: instruction not supported on this GPU
27
28v_add_i32 v257, v0, v1
29// GFX10-ERR: error: instruction not supported on this GPU
30// GFX9-ERR: error: register index is out of range
31// SI-ERR: error: register index is out of range
32// VI-ERR: error: instruction not supported on this GPU
33
34s_mov_b64 s[0:17], -1
35// GCN-ERR: error: invalid or unsupported register size
36
37s_mov_b64 s[103:104], -1
38// GCN-ERR: error: invalid register alignment
39
40s_mov_b64 s[105:106], -1
41// GCN-ERR: error: invalid register alignment
42
43s_mov_b64 s[104:105], -1
44// SICIVI9-ERR: error: register not available on this GPU
45// GFX10: s_mov_b64 s[104:105], -1 ; encoding:
46
47s_load_dwordx4 s[102:105], s[2:3], s4
48// GCN-ERR: error: invalid register alignment
49
50s_load_dwordx4 s[104:108], s[2:3], s4
51// GCN-ERR: error: register index is out of range
52
53s_load_dwordx4 s[108:112], s[2:3], s4
54// GCN-ERR: error: register index is out of range
55
56s_load_dwordx4 s[1:4], s[2:3], s4
57// GCN-ERR: error: invalid register alignment
58
59s_load_dwordx4 s[2:5], s[2:3], s4
60// GCN-ERR: error: invalid register alignment
61
62s_load_dwordx8 s[104:111], s[2:3], s4
63// GCN-ERR: error: register index is out of range
64
65s_load_dwordx8 s[100:107], s[2:3], s4
66// GCN-ERR: error: register index is out of range
67
68s_load_dwordx8 s[108:115], s[2:3], s4
69// GCN-ERR: error: register index is out of range
70
71s_load_dwordx16 s[92:107], s[2:3], s4
72// GCN-ERR: error: register index is out of range
73
74s_load_dwordx16 s[96:111], s[2:3], s4
75// GCN-ERR: error: register index is out of range
76
77s_load_dwordx16 s[100:115], s[2:3], s4
78// GCN-ERR: error: register index is out of range
79
80s_load_dwordx16 s[104:119], s[2:3], s4
81// GCN-ERR: error: register index is out of range
82
83s_load_dwordx16 s[108:123], s[2:3], s4
84// GCN-ERR: error: register index is out of range
85
86s_mov_b32 ttmp16, 0
87// GCN-ERR: error: register index is out of range
88
89s_mov_b32 ttmp12, 0
90// GFX9: s_mov_b32 ttmp12, 0 ; encoding:
91// GFX10: s_mov_b32 ttmp12, 0 ; encoding:
92// SIVICI-ERR: error: register not available on this GPU
93
94s_mov_b32 ttmp15, 0
95// GFX9: s_mov_b32 ttmp15, 0 ; encoding:
96// GFX10: s_mov_b32 ttmp15, 0 ; encoding:
97// SIVICI-ERR: error: register not available on this GPU
98
99s_mov_b32 flat_scratch_lo, 0
100// SI-ERR: error: register not available on this GPU
101// GFX10-ERR: error: register not available on this GPU
102// CIVI9: s_mov_b32 flat_scratch_lo, 0 ; encoding: [0x80,0x00,0xe6,0xbe]
103
104s_mov_b32 flat_scratch_hi, 0
105// SI-ERR: error: register not available on this GPU
106// GFX10-ERR: error: register not available on this GPU
107// CIVI9: s_mov_b32 flat_scratch_hi, 0 ; encoding: [0x80,0x00,0xe7,0xbe]
108
109s_mov_b32 tma_lo, 0
110// SIVICI: s_mov_b32 tma_lo, 0 ; encoding:
111// GFX9-ERR: error: register not available on this GPU
112// GFX10-ERR: error: register not available on this GPU
113
114s_mov_b32 tba_lo, 0
115// SIVICI: s_mov_b32 tba_lo, 0 ; encoding:
116// GFX9-ERR: error: register not available on this GPU
117// GFX10-ERR: error: register not available on this GPU
118