1 // RUN
: not llvm-mc
-mattr
=+code-object-v3
-triple amdgcn-amd-amdhsa
-mcpu
=gfx803
-mattr
=+xnack
-show-encoding
%s
2>&1 >/dev
/null | FileCheck
%s
2 // RUN
: not llvm-mc
-mattr
=+code-object-v3
-triple amdgcn-amd-amdhsa
-mcpu
=gfx1010
-mattr
=+xnack
-show-encoding
%s
2>&1 >/dev
/null | FileCheck
%s
--check-prefix
=GFX10
3 // RUN
: not llvm-mc
-mattr
=+code-object-v3
-triple amdgcn-amd-
-mcpu
=gfx803
-mattr
=+xnack
-show-encoding
%s
2>&1 >/dev
/null | FileCheck
%s
--check-prefix
=NOT-AMDHSA
7 .amdgcn_target "amdgcn--amdhsa-gfx803+xnack"
8 // CHECK
: error
: target must match options
11 // CHECK
: error
: unknown directive
15 .amdhsa_group_segment_fixed_size -1
16 // CHECK
: error
: value out of range
20 .amdhsa_group_segment_fixed_size 10000000000 + 1
21 // CHECK
: error
: value out of range
25 // NOT-AMDHSA
: error
: unknown directive
29 .amdhsa_group_segment_fixed_size 1
30 .amdhsa_group_segment_fixed_size 1
31 // CHECK
: error
: .amdhsa_ directives cannot be repeated
35 // CHECK
: error
: .amdhsa_next_free_vgpr directive is required
39 .amdhsa_next_free_vgpr 0
40 // CHECK
: error
: .amdhsa_next_free_sgpr directive is required
45 // CHECK
: error
: expected
.amdhsa_ directive or .end_amdhsa_kernel
49 .amdhsa_wavefront_size32 1
50 // CHECK
: error
: directive requires gfx10+
54 .amdhsa_workgroup_processor_mode 1
55 // CHECK
: error
: directive requires gfx10+
59 .amdhsa_memory_ordered 1
60 // CHECK
: error
: directive requires gfx10+
64 .amdhsa_forward_progress 1
65 // CHECK
: error
: directive requires gfx10+
69 .amdhsa_wavefront_size32 5
70 // GFX10
: error
: value out of range
74 .amdhsa_workgroup_processor_mode 5
75 // GFX10
: error
: value out of range
79 .amdhsa_memory_ordered 5
80 // GFX10
: error
: value out of range
84 .amdhsa_forward_progress 5
85 // GFX10
: error
: value out of range
88 .set .amdgcn.next_free_vgpr, "foo"
90 // CHECK
: error
: .amdgcn.next_free_{v,s}gpr symbols must be absolute expressions