1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
|
// 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
// 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
// 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
.text
.amdgcn_target "amdgcn--amdhsa-gfx803+xnack"
// CHECK: error: target must match options
.amdhsa_kernel
// CHECK: error: unknown directive
.end_amdhsa_kernel
.amdhsa_kernel foo
.amdhsa_group_segment_fixed_size -1
// CHECK: error: value out of range
.end_amdhsa_kernel
.amdhsa_kernel foo
.amdhsa_group_segment_fixed_size 10000000000 + 1
// CHECK: error: value out of range
.end_amdhsa_kernel
.amdhsa_kernel foo
// NOT-AMDHSA: error: unknown directive
.end_amdhsa_kernel
.amdhsa_kernel foo
.amdhsa_group_segment_fixed_size 1
.amdhsa_group_segment_fixed_size 1
// CHECK: error: .amdhsa_ directives cannot be repeated
.end_amdhsa_kernel
.amdhsa_kernel foo
// CHECK: error: .amdhsa_next_free_vgpr directive is required
.end_amdhsa_kernel
.amdhsa_kernel foo
.amdhsa_next_free_vgpr 0
// CHECK: error: .amdhsa_next_free_sgpr directive is required
.end_amdhsa_kernel
.amdhsa_kernel foo
1
// CHECK: error: expected .amdhsa_ directive or .end_amdhsa_kernel
.end_amdhsa_kernel
.amdhsa_kernel foo
.amdhsa_wavefront_size32 1
// CHECK: error: directive requires gfx10+
.end_amdhsa_kernel
.amdhsa_kernel foo
.amdhsa_workgroup_processor_mode 1
// CHECK: error: directive requires gfx10+
.end_amdhsa_kernel
.amdhsa_kernel foo
.amdhsa_memory_ordered 1
// CHECK: error: directive requires gfx10+
.end_amdhsa_kernel
.amdhsa_kernel foo
.amdhsa_forward_progress 1
// CHECK: error: directive requires gfx10+
.end_amdhsa_kernel
.amdhsa_kernel foo
.amdhsa_wavefront_size32 5
// GFX10: error: value out of range
.end_amdhsa_kernel
.amdhsa_kernel foo
.amdhsa_workgroup_processor_mode 5
// GFX10: error: value out of range
.end_amdhsa_kernel
.amdhsa_kernel foo
.amdhsa_memory_ordered 5
// GFX10: error: value out of range
.end_amdhsa_kernel
.amdhsa_kernel foo
.amdhsa_forward_progress 5
// GFX10: error: value out of range
.end_amdhsa_kernel
.set .amdgcn.next_free_vgpr, "foo"
v_mov_b32_e32 v0, s0
// CHECK: error: .amdgcn.next_free_{v,s}gpr symbols must be absolute expressions
|