1 ; RUN: llc -global-isel=0 -mtriple=amdgcn-amd-amdhsa < %s | FileCheck -check-prefix=ALL -check-prefix=HSA %s
2 ; RUN: llc -global-isel=1 -mtriple=amdgcn-amd-amdhsa < %s | FileCheck -check-prefix=ALL -check-prefix=HSA %s
3 ; RUN: llc -mtriple=r600 -mcpu=redwood < %s | FileCheck -check-prefix=ALL -check-prefix=EG %s
5 ; This test makes sure we do not double count global values when they are
6 ; used in different basic blocks.
9 ; GCN-NEXT: .long 32900
15 ; HSA-NOT: COMPUTE_PGM_RSRC2.LDS_SIZE
16 ; HSA: .amdhsa_group_segment_fixed_size 4
18 ; GCN: ; LDSByteSize: 4 bytes/workgroup (compile time only)
19 @lds = internal unnamed_addr addrspace(3) global i32 undef, align 4
21 define amdgpu_kernel void @test(ptr addrspace(1) %out, i32 %cond) {
23 %0 = icmp eq i32 %cond, 0
24 br i1 %0, label %if, label %else
27 store i32 1, ptr addrspace(3) @lds
31 store i32 2, ptr addrspace(3) @lds
38 !llvm.module.flags = !{!0}
39 !0 = !{i32 1, !"amdhsa_code_object_version", i32 400}