Home | History | Annotate | Download | only in AMDGPU
      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- -mcpu=gfx803 -mattr=+xnack -show-encoding %s 2>&1 >/dev/null | FileCheck %s --check-prefix=NOT-AMDHSA
      3 
      4 .text
      5 
      6 .amdgcn_target "amdgcn--amdhsa-gfx803+xnack"
      7 // CHECK: error: target must match options
      8 
      9 .amdhsa_kernel
     10 // CHECK: error: unknown directive
     11 .end_amdhsa_kernel
     12 
     13 .amdhsa_kernel foo
     14   .amdhsa_group_segment_fixed_size -1
     15   // CHECK: error: value out of range
     16 .end_amdhsa_kernel
     17 
     18 .amdhsa_kernel foo
     19   .amdhsa_group_segment_fixed_size 10000000000 + 1
     20   // CHECK: error: value out of range
     21 .end_amdhsa_kernel
     22 
     23 .amdhsa_kernel foo
     24   // NOT-AMDHSA: error: directive only supported for amdhsa OS
     25 .end_amdhsa_kernel
     26 
     27 .amdhsa_kernel foo
     28   .amdhsa_group_segment_fixed_size 1
     29   .amdhsa_group_segment_fixed_size 1
     30   // CHECK: error: .amdhsa_ directives cannot be repeated
     31 .end_amdhsa_kernel
     32 
     33 .amdhsa_kernel foo
     34   // CHECK: error: .amdhsa_next_free_vgpr directive is required
     35 .end_amdhsa_kernel
     36 
     37 .amdhsa_kernel foo
     38   .amdhsa_next_free_vgpr 0
     39   // CHECK: error: .amdhsa_next_free_sgpr directive is required
     40 .end_amdhsa_kernel
     41 
     42 .amdhsa_kernel foo
     43   1
     44   // CHECK: error: expected .amdhsa_ directive or .end_amdhsa_kernel
     45 .end_amdhsa_kernel
     46 
     47 .set .amdgcn.next_free_vgpr, "foo"
     48 v_mov_b32_e32 v0, s0
     49 // CHECK: error: .amdgcn.next_free_{v,s}gpr symbols must be absolute expressions
     50