1 ; RUN: sed 's/CODE_OBJECT_VERSION/400/g' %s | llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -o - | FileCheck -check-prefix=GCN %s
2 ; RUN: sed 's/CODE_OBJECT_VERSION/500/g' %s | llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -o - | FileCheck -check-prefix=GCN-V5 %s
4 ; Make sure there's no assertion when trying to report the resource
5 ; usage for a function which becomes dead during codegen.
7 @gv.fptr0 = external hidden unnamed_addr addrspace(4) constant ptr, align 4
9 ; GCN-LABEL: unreachable:
12 define internal fastcc void @unreachable() {
13 %fptr = load ptr, ptr addrspace(4) @gv.fptr0
20 ; GCN-NOT: s_swappc_b64
23 ; GCN: .amdhsa_private_segment_fixed_size 0
24 ; GCN-NOT: .amdhsa_uses_dynamic_stack 0
25 ; GCN-V5: .amdhsa_uses_dynamic_stack 0
26 define amdgpu_kernel void @entry() {
28 br i1 false, label %bb1, label %bb2
31 tail call fastcc void @unreachable()
38 !llvm.module.flags = !{!0}
39 !0 = !{i32 1, !"amdgpu_code_object_version", i32 CODE_OBJECT_VERSION}