brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 566eb1e Raw
38 lines · plain
1; RUN: sed 's/CODE_OBJECT_VERSION/400/g' %s | llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -o - | FileCheck -check-prefixes=GCN,ALL %s2; RUN: sed 's/CODE_OBJECT_VERSION/500/g' %s | llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -o - | FileCheck -check-prefixes=GCN-V5,ALL %s3; RUN: sed 's/CODE_OBJECT_VERSION/600/g' %s | llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -o - | FileCheck -check-prefixes=GCN-V5,ALL %s4 5; Make sure there's no assertion when trying to report the resource6; usage for a function which becomes dead during codegen.7 8@gv.fptr0 = external hidden unnamed_addr addrspace(4) constant ptr, align 49 10define internal fastcc void @unreachable() {11  %fptr = load ptr, ptr addrspace(4) @gv.fptr012  call void %fptr()13  unreachable14}15 16; GCN-LABEL: entry:17; GCN-NOT: s_swappc_b6418; GCN: s_endpgm19 20; GCN-NOT: .amdhsa_uses_dynamic_stack21; GCN-V5: .amdhsa_uses_dynamic_stack22; ALL: .set entry.private_seg_size, 023; ALL: .set entry.has_dyn_sized_stack, 024define amdgpu_kernel void @entry() {25bb0:26  br i1 false, label %bb1, label %bb227 28bb1:29  tail call fastcc void @unreachable()30  unreachable31 32bb2:33  ret void34}35 36!llvm.module.flags = !{!0}37!0 = !{i32 1, !"amdhsa_code_object_version", i32 CODE_OBJECT_VERSION}38