88@recursive.kernel.lds = addrspace (3 ) global i16 poison
99
1010;.
11- ; CHECK: @[[LLVM_AMDGCN_KERNEL_K0_F0_LDS:[a-zA-Z0-9_$"\\.-]+]] = internal addrspace(3) global [[LLVM_AMDGCN_KERNEL_K0_F0_LDS_T:%.*]] poison, align 2, !absolute_symbol !0
12- ; CHECK: @[[LLVM_AMDGCN_KERNEL_K1_F0_LDS:[a-zA-Z0-9_$"\\.-]+]] = internal addrspace(3) global [[LLVM_AMDGCN_KERNEL_K1_F0_LDS_T:%.*]] poison, align 2, !absolute_symbol !0
13- ; CHECK: @[[LLVM_AMDGCN_KERNEL_KERNEL_LDS_LDS:[a-zA-Z0-9_$"\\.-]+]] = internal addrspace(3) global [[LLVM_AMDGCN_KERNEL_KERNEL_LDS_LDS_T:%.*]] poison, align 2, !absolute_symbol !0
14- ; CHECK: @[[LLVM_AMDGCN_KERNEL_KERNEL_LDS_RECURSION_LDS:[a-zA-Z0-9_$"\\.-]+]] = internal addrspace(3) global [[LLVM_AMDGCN_KERNEL_KERNEL_LDS_RECURSION_LDS_T:%.*]] poison, align 2, !absolute_symbol !0
15- ; CHECK: @[[LLVM_AMDGCN_LDS_OFFSET_TABLE:[a-zA-Z0-9_$"\\.-]+]] = internal addrspace(4) constant [3 x [2 x i32]]
11+ ; CHECK: @llvm.amdgcn.kernel.k0_f0.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k0_f0.lds.t poison, align 2, !absolute_symbol [[META0:![0-9]+]]
12+ ; CHECK: @llvm.amdgcn.kernel.k1_f0.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k1_f0.lds.t poison, align 2, !absolute_symbol [[META0]]
13+ ; CHECK: @llvm.amdgcn.kernel.kernel_lds.lds = internal addrspace(3) global %llvm.amdgcn.kernel.kernel_lds.lds.t poison, align 2, !absolute_symbol [[META0]]
14+ ; CHECK: @llvm.amdgcn.kernel.kernel_lds_recursion.lds = internal addrspace(3) global %llvm.amdgcn.kernel.kernel_lds_recursion.lds.t poison, align 2, !absolute_symbol [[META0]]
15+ ; CHECK: @llvm.amdgcn.lds.offset.table = internal addrspace(4) constant [3 x [2 x i32]] [[2 x i32] [i32 ptrtoint (ptr addrspace(3) @llvm.amdgcn.kernel.k0_f0.lds to i32), i32 poison], [2 x i32] [i32 ptrtoint (ptr addrspace(3) @llvm.amdgcn.kernel.k1_f0.lds to i32), i32 ptrtoint (ptr addrspace(3) getelementptr inbounds (%llvm.amdgcn.kernel.k1_f0.lds.t, ptr addrspace(3) @llvm.amdgcn.kernel.k1_f0.lds, i32 0, i32 1) to i32)], [2 x i32] [i32 poison, i32 ptrtoint (ptr addrspace(3) @llvm.amdgcn.kernel.kernel_lds_recursion.lds to i32) ]]
1616;.
1717define internal void @lds_use_through_indirect () {
1818; CHECK-LABEL: define internal void @lds_use_through_indirect(
@@ -105,7 +105,7 @@ define internal void @f0_transitive() {
105105
106106define amdgpu_kernel void @k0_f0 () {
107107; CHECK-LABEL: define amdgpu_kernel void @k0_f0(
108- ; CHECK-SAME: ) #[[ATTR2:[0-9]+]] !llvm.amdgcn.lds.kernel.id !2 {
108+ ; CHECK-SAME: ) #[[ATTR2:[0-9]+]] !llvm.amdgcn.lds.kernel.id [[META2:![0-9]+]] {
109109; CHECK-NEXT: call void @llvm.donothing() [ "ExplicitUse"(ptr addrspace(3) @llvm.amdgcn.kernel.k0_f0.lds) ]
110110; CHECK-NEXT: call void @f0_transitive()
111111; CHECK-NEXT: ret void
@@ -116,8 +116,8 @@ define amdgpu_kernel void @k0_f0() {
116116
117117define amdgpu_kernel void @k1_f0 () {
118118; CHECK-LABEL: define amdgpu_kernel void @k1_f0(
119- ; CHECK-SAME: ) #[[ATTR3:[0-9]+]] !llvm.amdgcn.lds.kernel.id !3 {
120- ; CHECK-NEXT: call void @llvm.donothing() [ "ExplicitUse"(ptr addrspace(3) @llvm.amdgcn.kernel.k1_f0.lds) ], !alias.scope !4 , !noalias !7
119+ ; CHECK-SAME: ) #[[ATTR3:[0-9]+]] !llvm.amdgcn.lds.kernel.id [[META3:![0-9]+]] {
120+ ; CHECK-NEXT: call void @llvm.donothing() [ "ExplicitUse"(ptr addrspace(3) @llvm.amdgcn.kernel.k1_f0.lds) ], !alias.scope [[META4:![0-9]+]] , !noalias [[META7:![0-9]+]]
121121; CHECK-NEXT: call void @f0_transitive()
122122; CHECK-NEXT: [[FPTR:%.*]] = load volatile ptr, ptr addrspace(1) null, align 8
123123; CHECK-NEXT: call void [[FPTR]]()
@@ -178,7 +178,7 @@ define internal void @mutual_recursion_1(i16 %arg) {
178178
179179define amdgpu_kernel void @kernel_lds_recursion () {
180180; CHECK-LABEL: define amdgpu_kernel void @kernel_lds_recursion(
181- ; CHECK-SAME: ) #[[ATTR2]] !llvm.amdgcn.lds.kernel.id !9 {
181+ ; CHECK-SAME: ) #[[ATTR2]] !llvm.amdgcn.lds.kernel.id [[META9:![0-9]+]] {
182182; CHECK-NEXT: call void @llvm.donothing() [ "ExplicitUse"(ptr addrspace(3) @llvm.amdgcn.kernel.kernel_lds_recursion.lds) ]
183183; CHECK-NEXT: call void @mutual_recursion_0(i16 0)
184184; CHECK-NEXT: ret void
@@ -199,15 +199,16 @@ define amdgpu_kernel void @kernel_lds_recursion() {
199199; CHECK: attributes #[[ATTR5:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(none) }
200200; CHECK: attributes #[[ATTR6:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
201201;.
202- ; CHECK: [[META0:![0-9]+]] = !{i32 0, i32 1}
203- ; CHECK: [[META1:![0-9]+]] = !{i32 0}
204- ; CHECK: [[META2:![0-9]+]] = !{i32 1}
205- ; CHECK: [[META3:![0-9]+]] = !{!5}
206- ; CHECK: [[META4:![0-9]+]] = distinct !{!5, !6}
207- ; CHECK: [[META5:![0-9]+]] = distinct !{!6}
208- ; CHECK: [[META6:![0-9]+]] = !{!8}
209- ; CHECK: [[META7:![0-9]+]] = distinct !{!8, !6}
210- ; CHECK: [[META8:![0-9]+]] = !{i32 2}
202+ ; CHECK: [[META0]] = !{i32 0, i32 1}
203+ ; CHECK: [[META1:![0-9]+]] = !{i32 1, !"amdhsa_code_object_version", i32 400}
204+ ; CHECK: [[META2]] = !{i32 0}
205+ ; CHECK: [[META3]] = !{i32 1}
206+ ; CHECK: [[META4]] = !{[[META5:![0-9]+]]}
207+ ; CHECK: [[META5]] = distinct !{[[META5]], [[META6:![0-9]+]]}
208+ ; CHECK: [[META6]] = distinct !{[[META6]]}
209+ ; CHECK: [[META7]] = !{[[META8:![0-9]+]]}
210+ ; CHECK: [[META8]] = distinct !{[[META8]], [[META6]]}
211+ ; CHECK: [[META9]] = !{i32 2}
211212;.
212213;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
213214; TABLE: {{.*}}
0 commit comments