1 ; RUN: sed 's/CODE_OBJECT_VERSION/400/g' %s | llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 | FileCheck --check-prefix=DOORBELL %s
2 ; RUN: sed 's/CODE_OBJECT_VERSION/400/g' %s | llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 | FileCheck --check-prefix=DOORBELL %s
3 ; RUN: sed 's/CODE_OBJECT_VERSION/300/g' %s | llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 | FileCheck --check-prefix=HSA %s
5 declare void @llvm.trap() #0
7 ; HSA: .amdhsa_kernel trap
8 ; HSA-NEXT: .amdhsa_group_segment_fixed_size 0
9 ; HSA-NEXT: .amdhsa_private_segment_fixed_size 0
10 ; HSA-NEXT: .amdhsa_kernarg_size 8
11 ; HSA-NEXT: .amdhsa_user_sgpr_count 8
12 ; HSA-NEXT: .amdhsa_user_sgpr_private_segment_buffer 1
13 ; HSA: .end_amdhsa_kernel
15 ; DOORBELL: .amdhsa_kernel trap
16 ; DOORBELL-NEXT: .amdhsa_group_segment_fixed_size 0
17 ; DOORBELL-NEXT: .amdhsa_private_segment_fixed_size 0
18 ; DOORBELL-NEXT: .amdhsa_kernarg_size 8
19 ; DOORBELL-NEXT: .amdhsa_user_sgpr_count 6
20 ; DOORBELL-NEXT: .amdhsa_user_sgpr_private_segment_buffer 1
21 ; DOORBELL: .end_amdhsa_kernel
23 define amdgpu_kernel void @trap(ptr addrspace(1) nocapture readonly %arg0) {
24 store volatile i32 1, ptr addrspace(1) %arg0
25 call void @llvm.trap()
27 store volatile i32 2, ptr addrspace(1) %arg0
31 !llvm.module.flags = !{!0}
32 !0 = !{i32 1, !"amdgpu_code_object_version", i32 CODE_OBJECT_VERSION}