1 ; RUN: llc -mtriple=amdgcn-amd-amdhsa < %s | FileCheck -check-prefix=ALL -check-prefix=HSA %s
2 ; RUN: llc -march=r600 -mcpu=redwood < %s | FileCheck -check-prefix=ALL -check-prefix=EG %s
4 ; This test makes sure we do not double count global values when they are
5 ; used in different basic blocks.
8 ; GCN-NEXT: .long 32900
14 ; HSA: granulated_lds_size = 0
15 ; HSA: workgroup_group_segment_byte_size = 4
17 ; GCN: ; LDSByteSize: 4 bytes/workgroup (compile time only)
18 @lds = internal unnamed_addr addrspace(3) global i32 undef, align 4
20 define amdgpu_kernel void @test(i32 addrspace(1)* %out, i32 %cond) {
22 %0 = icmp eq i32 %cond, 0
23 br i1 %0, label %if, label %else
26 store i32 1, i32 addrspace(3)* @lds
30 store i32 2, i32 addrspace(3)* @lds