Lines Matching refs:lds

1 ; RUN: opt -S -mtriple=amdgcn-- -amdgpu-lower-module-lds < %s | FileCheck %s
2 ; RUN: opt -S -mtriple=amdgcn-- -passes=amdgpu-lower-module-lds < %s | FileCheck %s
5 ; @lds.1: is aliased with @alias.to.lds.1, and @alias.to.lds.1 is used within kernel @k0.
6 ; Hence, @lds.1 is lowered.
7 ; @lds.2: is aliased with @alias.to.lds.2, and @alias.to.lds.2 is used within non-kernel @f0,
8 ; Hence, @lds.2 is lowered.
9 ; @lds.3: is used as initializer to global @gptr.3, and @gptr.3 is aliased with @alias.to.gptr.3,
10 ; and @alias.to.gptr.3 is used within kernel @k1. Hence, @lds.3 is lowered.
11 ; @lds.4: is used as initializer to global @gptr.4, and @gptr.4 is aliased with @alias.to.gptr.4,
12 ; and @alias.to.gptr.4 is used within non-kernel @f1. Hence, @lds.4 is lowered.
13 ; @lds.5: is aliased with @alias.to.lds.5, but neither @lds.5 nor @alias.to.lds.5 is used anywhere.
14 ; Hence, @lds.5 is not lowered.
15 ; @lds.6: is used as initializer to global @gptr.6, and @gptr.6 is aliased with @alias.to.gptr.6.
16 ; But none of them are used anywhere. Hence, @lds.6 is not lowered.
19 ; CHECK: %llvm.amdgcn.module.lds.t = type { [4 x i8], [3 x i8], [1 x i8], [2 x i8] }
21 ; CHECK-NOT: @lds.1
22 ; CHECK-NOT: @lds.2
23 ; CHECK-NOT: @lds.3
24 ; CHECK-NOT: @lds.4
25 ; CHECK: @lds.5 = internal unnamed_addr addrspace(3) global [5 x i8] undef, align 8
26 ; CHECK: @lds.6 = internal unnamed_addr addrspace(3) global [6 x i8] undef, align 8
27 @lds.1 = internal unnamed_addr addrspace(3) global [1 x i8] undef, align 1
28 @lds.2 = internal unnamed_addr addrspace(3) global [2 x i8] undef, align 2
29 @lds.3 = internal unnamed_addr addrspace(3) global [3 x i8] undef, align 4
30 @lds.4 = internal unnamed_addr addrspace(3) global [4 x i8] undef, align 4
31 @lds.5 = internal unnamed_addr addrspace(3) global [5 x i8] undef, align 8
32 @lds.6 = internal unnamed_addr addrspace(3) global [6 x i8] undef, align 8
34 …elementptr inbounds (%llvm.amdgcn.module.lds.t, %llvm.amdgcn.module.lds.t addrspace(3)* @llvm.amdg…
35 …cecast (i64 addrspace(3)* bitcast (%llvm.amdgcn.module.lds.t addrspace(3)* @llvm.amdgcn.module.lds
36 …bal i64* addrspacecast (i64 addrspace(3)* bitcast ([6 x i8] addrspace(3)* @lds.6 to i64 addrspace(…
37 @gptr.3 = addrspace(1) global i64* addrspacecast ([3 x i8] addrspace(3)* @lds.3 to i64*), align 8
38 @gptr.4 = addrspace(1) global i64* addrspacecast ([4 x i8] addrspace(3)* @lds.4 to i64*), align 8
39 @gptr.6 = addrspace(1) global i64* addrspacecast ([6 x i8] addrspace(3)* @lds.6 to i64*), align 8
41 ; CHECK: @llvm.amdgcn.module.lds = internal addrspace(3) global %llvm.amdgcn.module.lds.t undef, al…
42 …elementptr inbounds (%llvm.amdgcn.module.lds.t, %llvm.amdgcn.module.lds.t addrspace(3)* @llvm.amdg…
44 …ias.to.lds.1 = alias [1 x i8], getelementptr inbounds (%llvm.amdgcn.module.lds.t, %llvm.amdgcn.mod…
45 …ias.to.lds.2 = alias [2 x i8], getelementptr inbounds (%llvm.amdgcn.module.lds.t, %llvm.amdgcn.mod…
48 ; CHECK: @alias.to.lds.5 = alias [5 x i8], [5 x i8] addrspace(3)* @lds.5
50 @alias.to.lds.1 = alias [1 x i8], [1 x i8] addrspace(3)* @lds.1
51 @alias.to.lds.2 = alias [2 x i8], [2 x i8] addrspace(3)* @lds.2
54 @alias.to.lds.5 = alias [5 x i8], [5 x i8] addrspace(3)* @lds.5
66 ; CHECK: %bc = bitcast [2 x i8] addrspace(3)* @alias.to.lds.2 to i8 addrspace(3)*
70 %bc = bitcast [2 x i8] addrspace(3)* @alias.to.lds.2 to i8 addrspace(3)*
76 … @llvm.donothing() [ "ExplicitUse"(%llvm.amdgcn.module.lds.t addrspace(3)* @llvm.amdgcn.module.lds
85 … @llvm.donothing() [ "ExplicitUse"(%llvm.amdgcn.module.lds.t addrspace(3)* @llvm.amdgcn.module.lds
86 ; CHECK-LABEL: %bc = bitcast [1 x i8] addrspace(3)* @alias.to.lds.1 to i8 addrspace(3)*
90 %bc = bitcast [1 x i8] addrspace(3)* @alias.to.lds.1 to i8 addrspace(3)*