[llvm-readobj] - Simplify stack-sizes.test test case.
[llvm-complete.git] / test / MC / AMDGPU / hsa-diag-v3.s
blob8a793ca49b1e410be35cc08aa3c8d92886d8e265
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
5 .text
7 .amdgcn_target "amdgcn--amdhsa-gfx803+xnack"
8 // CHECK: error: target must match options
10 .amdhsa_kernel
11 // CHECK: error: unknown directive
12 .end_amdhsa_kernel
14 .amdhsa_kernel foo
15 .amdhsa_group_segment_fixed_size -1
16 // CHECK: error: value out of range
17 .end_amdhsa_kernel
19 .amdhsa_kernel foo
20 .amdhsa_group_segment_fixed_size 10000000000 + 1
21 // CHECK: error: value out of range
22 .end_amdhsa_kernel
24 .amdhsa_kernel foo
25 // NOT-AMDHSA: error: unknown directive
26 .end_amdhsa_kernel
28 .amdhsa_kernel foo
29 .amdhsa_group_segment_fixed_size 1
30 .amdhsa_group_segment_fixed_size 1
31 // CHECK: error: .amdhsa_ directives cannot be repeated
32 .end_amdhsa_kernel
34 .amdhsa_kernel foo
35 // CHECK: error: .amdhsa_next_free_vgpr directive is required
36 .end_amdhsa_kernel
38 .amdhsa_kernel foo
39 .amdhsa_next_free_vgpr 0
40 // CHECK: error: .amdhsa_next_free_sgpr directive is required
41 .end_amdhsa_kernel
43 .amdhsa_kernel foo
45 // CHECK: error: expected .amdhsa_ directive or .end_amdhsa_kernel
46 .end_amdhsa_kernel
48 .amdhsa_kernel foo
49 .amdhsa_wavefront_size32 1
50 // CHECK: error: directive requires gfx10+
51 .end_amdhsa_kernel
53 .amdhsa_kernel foo
54 .amdhsa_workgroup_processor_mode 1
55 // CHECK: error: directive requires gfx10+
56 .end_amdhsa_kernel
58 .amdhsa_kernel foo
59 .amdhsa_memory_ordered 1
60 // CHECK: error: directive requires gfx10+
61 .end_amdhsa_kernel
63 .amdhsa_kernel foo
64 .amdhsa_forward_progress 1
65 // CHECK: error: directive requires gfx10+
66 .end_amdhsa_kernel
68 .amdhsa_kernel foo
69 .amdhsa_wavefront_size32 5
70 // GFX10: error: value out of range
71 .end_amdhsa_kernel
73 .amdhsa_kernel foo
74 .amdhsa_workgroup_processor_mode 5
75 // GFX10: error: value out of range
76 .end_amdhsa_kernel
78 .amdhsa_kernel foo
79 .amdhsa_memory_ordered 5
80 // GFX10: error: value out of range
81 .end_amdhsa_kernel
83 .amdhsa_kernel foo
84 .amdhsa_forward_progress 5
85 // GFX10: error: value out of range
86 .end_amdhsa_kernel
88 .set .amdgcn.next_free_vgpr, "foo"
89 v_mov_b32_e32 v0, s0
90 // CHECK: error: .amdgcn.next_free_{v,s}gpr symbols must be absolute expressions