1 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 < %s | FileCheck --check-prefix=HSA %s
2 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 --amdhsa-code-object-version=4 < %s | FileCheck --check-prefix=HSA %s
3 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 --amdhsa-code-object-version=3 < %s | FileCheck --check-prefix=HSA %s
5 declare void @llvm.trap() #0
6 declare void @llvm.debugtrap() #1
8 ; HSA: .amdhsa_kernel trap
9 ; HSA-NEXT: .amdhsa_group_segment_fixed_size 0
10 ; HSA-NEXT: .amdhsa_private_segment_fixed_size 0
11 ; HSA-NEXT: .amdhsa_kernarg_size 8
12 ; HSA-NEXT: .amdhsa_user_sgpr_private_segment_buffer 1
13 ; HSA: .end_amdhsa_kernel
15 define amdgpu_kernel void @trap(i32 addrspace(1)* nocapture readonly %arg0) {
16 store volatile i32 1, i32 addrspace(1)* %arg0
17 call void @llvm.trap()
19 store volatile i32 2, i32 addrspace(1)* %arg0