1 // RUN
: not llvm-mc
--amdhsa-code-object-version
=3 -triple amdgcn-amd-amdhsa
-mcpu
=gfx810
-mattr
=+xnack
-show-encoding
%s
2>&1 >/dev
/null | FileCheck
%s
--check-prefixes
=GCN
,GFX8
,NONGFX10
,AMDHSA
2 // RUN
: not llvm-mc
--amdhsa-code-object-version
=3 -triple amdgcn-amd-amdhsa
-mcpu
=gfx1010
-mattr
=+xnack
-show-encoding
%s
2>&1 >/dev
/null | FileCheck
%s
--check-prefixes
=GCN
,GFX10
,AMDHSA
3 // RUN
: not llvm-mc
--amdhsa-code-object-version
=3 -triple amdgcn-amd-
-mcpu
=gfx810
-mattr
=+xnack
-show-encoding
%s
2>&1 >/dev
/null | FileCheck
%s
--check-prefixes
=GCN
,NONAMDHSA
4 // RUN
: not llvm-mc
--amdhsa-code-object-version
=3 -triple amdgcn-amd-amdhsa
-mcpu
=gfx90a
-mattr
=+xnack
-show-encoding
%s
2>&1 >/dev
/null | FileCheck
%s
--check-prefixes
=GFX90A
,NONGFX10
,AMDHSA
,ALL
8 // GCN-LABEL
: warning
: test_target
10 // GFX10
: error
: .amdgcn_target directive's target id amdgcn-amd-amdhsa--gfx810+xnack does not match the specified target id amdgcn-amd-amdhsa--gfx1010+xnack
11 // NONAMDHSA: error: .amdgcn_target directive's target id amdgcn-amd-amdhsa--gfx810+xnack does not match the specified target id amdgcn-amd-unknown--gfx810
12 .warning "test_target"
13 .amdgcn_target "amdgcn-amd-amdhsa--gfx810+xnack"
15 // GCN-LABEL
: warning
: test_amdhsa_kernel_no_name
16 // GCN
: error
: unknown directive
17 .warning "test_amdhsa_kernel_no_name"
21 // GCN-LABEL
: warning
: test_amdhsa_kernel_empty
22 // NONAMDHSA
: error
: unknown directive
23 .warning "test_amdhsa_kernel_empty"
24 .amdhsa_kernel test_amdhsa_kernel_empty
27 // GCN-LABEL
: warning
: test_amdhsa_kernel_unknown_directive
28 // AMDHSA
: error
: expected
.amdhsa_ directive or .end_amdhsa_kernel
29 // NONAMDHSA
: error
: unknown directive
30 .warning "test_amdhsa_kernel_unknown_directive"
31 .amdhsa_kernel test_amdhsa_kernel_unknown_directive
35 // GCN-LABEL
: warning
: test_amdhsa_group_segment_fixed_size_invalid_size
36 // AMDHSA
: error
: value out of range
37 // NONAMDHSA
: error
: unknown directive
38 .warning "test_amdhsa_group_segment_fixed_size_invalid_size"
39 .amdhsa_kernel test_amdhsa_group_segment_fixed_size_invalid_size
40 .amdhsa_group_segment_fixed_size -1
43 // GCN-LABEL
: warning
: test_amdhsa_group_segment_fixed_size_invalid_expression
44 // AMDHSA
: error
: value out of range
45 // NONAMDHSA
: error
: unknown directive
46 .warning "test_amdhsa_group_segment_fixed_size_invalid_expression"
47 .amdhsa_kernel test_amdhsa_group_segment_fixed_size_invalid_expression
48 .amdhsa_group_segment_fixed_size 10000000000 + 1
51 // GCN-LABEL
: warning
: test_amdhsa_group_segment_fixed_size_repeated
52 // AMDHSA
: error
: .amdhsa_ directives cannot be repeated
53 // NONAMDHSA-
: error
: unknown directive
54 .warning "test_amdhsa_group_segment_fixed_size_repeated"
55 .amdhsa_kernel test_amdhsa_group_segment_fixed_size_repeated
56 .amdhsa_group_segment_fixed_size 1
57 .amdhsa_group_segment_fixed_size 1
60 // GCN-LABEL
: warning
: test_amdhsa_next_free_vgpr_missing
61 // AMDHSA
: error
: .amdhsa_next_free_vgpr directive is required
62 // NONAMDHSA
: error
: unknown directive
63 .warning "test_amdhsa_next_free_vgpr_missing"
64 .amdhsa_kernel test_amdhsa_next_free_vgpr_missing
67 // GCN-LABEL
: warning
: test_amdhsa_next_free_sgpr_missing
68 // AMDHSA
: error
: .amdhsa_next_free_sgpr directive is required
69 // NONAMDHSA
: error
: unknown directive
70 .warning "test_amdhsa_next_free_sgpr_missing"
71 .amdhsa_kernel test_amdhsa_next_free_sgpr_missing
72 .amdhsa_next_free_vgpr 0
75 // ALL-LABEL
: warning
: test_amdhsa_accum_offset
76 // NONGFX9A
: error
: directive requires gfx90a+
77 // GFX90A
: error
: .amdhsa_next_free_vgpr directive is required
78 // NONAMDHSA
: error
: unknown directive
79 .warning "test_amdhsa_accum_offset"
80 .amdhsa_kernel test_amdhsa_accum_offset
81 .amdhsa_accum_offset 4
84 // ALL-LABEL
: warning
: test_amdhsa_accum_offset_missing
85 // NONGFX9A
: error
: directive requires gfx90a+
86 // GFX90A
: error
: .amdhsa_accum_offset directive is required
87 // NONAMDHSA
: error
: unknown directive
88 .warning "test_amdhsa_accum_offset_missing"
89 .amdhsa_kernel test_amdhsa_accum_offset_missing
90 .amdhsa_next_free_sgpr 0
91 .amdhsa_next_free_vgpr 0
94 // ALL-LABEL
: warning
: test_amdhsa_accum_offset_invalid0
95 // NONGFX9A
: error
: directive requires gfx90a+
96 // GFX90A
: error
: accum_offset should
be in range
[4..256] in increments of 4
97 // NONAMDHSA
: error
: unknown directive
98 .warning "test_amdhsa_accum_offset_invalid0"
99 .amdhsa_kernel test_amdhsa_accum_offset_invalid0
100 .amdhsa_next_free_sgpr 0
101 .amdhsa_next_free_vgpr 0
102 .amdhsa_accum_offset 0
105 // ALL-LABEL
: warning
: test_amdhsa_accum_offset_invalid5
106 // NONGFX9A
: error
: directive requires gfx90a+
107 // GFX90A
: error
: accum_offset should
be in range
[4..256] in increments of 4
108 // NONAMDHSA
: error
: unknown directive
109 .warning "test_amdhsa_accum_offset_invalid5"
110 .amdhsa_kernel test_amdhsa_accum_offset_invalid5
111 .amdhsa_next_free_sgpr 0
112 .amdhsa_next_free_vgpr 0
113 .amdhsa_accum_offset 5
116 // ALL-LABEL
: warning
: test_amdhsa_accum_offset_invalid257
117 // NONGFX9A
: error
: directive requires gfx90a+
118 // GFX90A
: error
: accum_offset should
be in range
[4..256] in increments of 4
119 // NONAMDHSA
: error
: unknown directive
120 .warning "test_amdhsa_accum_offset_invalid257"
121 .amdhsa_kernel test_amdhsa_accum_offset_invalid257
122 .amdhsa_next_free_sgpr 0
123 .amdhsa_next_free_vgpr 0
124 .amdhsa_accum_offset 257
127 // ALL-LABEL
: warning
: test_amdhsa_accum_offset_invalid8
128 // NONGFX9A
: error
: directive requires gfx90a+
129 // GFX90A
: error
: accum_offset exceeds total VGPR allocation
130 // NONAMDHSA
: error
: unknown directive
131 .warning "test_amdhsa_accum_offset_invalid8"
132 .amdhsa_kernel test_amdhsa_accum_offset_invalid8
133 .amdhsa_next_free_sgpr 0
134 .amdhsa_next_free_vgpr 0
135 .amdhsa_accum_offset 8
138 // ALL-LABEL
: warning
: test_amdhsa_tg_split
139 // NONGFX90A
: error
: directive requires gfx90a+
140 // GFX90A
: error
: .amdhsa_next_free_vgpr directive is required
141 // NONAMDHSA
: error
: unknown directive
142 .warning "test_amdhsa_tg_split"
143 .amdhsa_kernel test_amdhsa_tg_split
147 // ALL-LABEL
: warning
: test_amdhsa_tg_split_invalid
148 // NONGFX90A
: error
: directive requires gfx90a+
149 // GFX90A
: error
: value out of range
150 // NONAMDHSA
: error
: unknown directive
151 .warning "test_amdhsa_tg_split_invalid"
152 .amdhsa_kernel test_amdhsa_tg_split_invalid
156 // ALL-LABEL
: warning
: test_amdhsa_wavefront_size32
157 // NONGFX10
: error
: directive requires gfx10+
158 // GFX10
: error
: .amdhsa_next_free_vgpr directive is required
159 // NONAMDHSA
: error
: unknown directive
160 .warning "test_amdhsa_wavefront_size32"
161 .amdhsa_kernel test_amdhsa_wavefront_size32
162 .amdhsa_wavefront_size32 1
165 // GCN-LABEL
: warning
: test_amdhsa_wavefront_size32_invalid
166 // NONGFX10
: error
: directive requires gfx10+
167 // GFX10
: error
: value out of range
168 // NONAMDHSA
: error
: unknown directive
169 .warning "test_amdhsa_wavefront_size32_invalid"
170 .amdhsa_kernel test_amdhsa_wavefront_size32_invalid
171 .amdhsa_wavefront_size32 5
174 // GCN-LABEL
: warning
: test_amdhsa_workgroup_processor_mode
175 // NONGFX10
: error
: directive requires gfx10+
176 // GFX10
: error
: .amdhsa_next_free_vgpr directive is required
177 // NONAMDHSA
: error
: unknown directive
178 .warning "test_amdhsa_workgroup_processor_mode"
179 .amdhsa_kernel test_amdhsa_workgroup_processor_mode
180 .amdhsa_workgroup_processor_mode 1
183 // GCN-LABEL
: warning
: test_amdhsa_workgroup_processor_mode_invalid
184 // NONGFX10
: error
: directive requires gfx10+
185 // GFX10
: error
: value out of range
186 // NONAMDHSA
: error
: unknown directive
187 .warning "test_amdhsa_workgroup_processor_mode_invalid"
188 .amdhsa_kernel test_amdhsa_workgroup_processor_mode_invalid
189 .amdhsa_workgroup_processor_mode 5
192 // GCN-LABEL
: warning
: test_amdhsa_memory_ordered
193 // NONGFX10
: error
: directive requires gfx10+
194 // GFX10
: error
: .amdhsa_next_free_vgpr directive is required
195 // NONAMDHSA
: error
: unknown directive
196 .warning "test_amdhsa_memory_ordered"
197 .amdhsa_kernel test_amdhsa_memory_ordered
198 .amdhsa_memory_ordered 1
201 // GCN-LABEL
: warning
: test_amdhsa_memory_ordered_invalid
202 // NONGFX10
: error
: directive requires gfx10+
203 // GFX10
: error
: value out of range
204 // NONAMDHSA
: error
: unknown directive
205 .warning "test_amdhsa_memory_ordered_invalid"
206 .amdhsa_kernel test_amdhsa_memory_ordered_invalid
207 .amdhsa_memory_ordered 5
210 // GCN-LABEL
: warning
: test_amdhsa_forward_progress
211 // NONGFX10
: error
: directive requires gfx10+
212 // GFX10
: error
: .amdhsa_next_free_vgpr directive is required
213 // NONAMDHSA
: error
: unknown directive
214 .warning "test_amdhsa_forward_progress"
215 .amdhsa_kernel test_amdhsa_forward_progress
216 .amdhsa_forward_progress 1
219 // GCN-LABEL
: warning
: test_amdhsa_forward_progress_invalid
220 // NONGFX10
: error
: directive requires gfx10+
221 // GFX10
: error
: value out of range
222 // NONAMDHSA
: error
: unknown directive
223 .warning "test_amdhsa_forward_progress_invalid"
224 .amdhsa_kernel test_amdhsa_forward_progress_invalid
225 .amdhsa_forward_progress 5
228 // GCN-LABEL
: warning
: test_next_free_vgpr_invalid
229 // AMDHSA
: error
: .amdgcn.next_free_{v,s}gpr symbols must be absolute expressions
230 // NONAMDHSA-
NOT: error
:
231 .warning "test_next_free_vgpr_invalid"
232 .set .amdgcn.next_free_vgpr, "foo"
235 // GCN-LABEL
: warning
: test_end