1 ; RUN: opt -S -passes=openmp-opt < %s | FileCheck %s
3 ; Verify we change it to SPMD mode but also avoid propagating the old mode (=generic) into the __kmpc_target_init function.
5 ; CHECK-NOT: store i32 0, ptr addrspace(3) @IsSPMDMode
6 ; CHECK: call i32 @__kmpc_target_init(ptr addrspacecast (ptr addrspace(1) @1 to ptr), i8 2, i1 false, i1 false)
7 ; CHECK-NOT: store i32 0, ptr addrspace(3) @IsSPMDMode
8 ; CHECK: store i32 1, ptr addrspace(3) @IsSPMDMode
9 ; CHECK-NOT: store i32 0, ptr addrspace(3) @IsSPMDMode
11 target datalayout = "e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7"
12 target triple = "amdgcn-amd-amdhsa"
14 %struct.ident_t = type { i32, i32, i32, i32, ptr }
15 %struct.DeviceEnvironmentTy = type { i32, i32, i32, i32 }
16 %"struct.(anonymous namespace)::SharedMemorySmartStackTy" = type { [512 x i8], [1024 x i8] }
17 %"struct.(anonymous namespace)::TeamStateTy" = type { %"struct.(anonymous namespace)::ICVStateTy", i32, ptr }
18 %"struct.(anonymous namespace)::ICVStateTy" = type { i32, i32, i32, i32, i32, i32 }
20 @__omp_rtl_assume_teams_oversubscription = weak_odr hidden local_unnamed_addr addrspace(1) constant i32 0
21 @__omp_rtl_assume_threads_oversubscription = weak_odr hidden local_unnamed_addr addrspace(1) constant i32 0
22 @0 = private unnamed_addr constant [23 x i8] c";unknown;unknown;0;0;;\00", align 1
23 @1 = private unnamed_addr addrspace(1) constant %struct.ident_t { i32 0, i32 2, i32 0, i32 22, ptr @0 }, align 8
24 @__omp_offloading_20_11e3950_main_l12_exec_mode = weak addrspace(1) constant i8 1
25 @__omp_rtl_debug_kind = weak_odr hidden local_unnamed_addr addrspace(1) constant i32 0
26 @__omp_rtl_assume_no_thread_state = weak_odr hidden local_unnamed_addr addrspace(1) constant i32 0
27 @omptarget_device_environment = weak protected addrspace(4) global %struct.DeviceEnvironmentTy undef, align 4
28 @IsSPMDMode = weak hidden addrspace(3) global i32 undef, align 4
29 @.str.12 = private unnamed_addr addrspace(4) constant [47 x i8] c"ValueRAII initialization with wrong old value!\00", align 1
30 @_ZN12_GLOBAL__N_122SharedMemorySmartStackE = internal addrspace(3) global %"struct.(anonymous namespace)::SharedMemorySmartStackTy" undef, align 16
31 @_ZN12_GLOBAL__N_19TeamStateE = internal unnamed_addr addrspace(3) global %"struct.(anonymous namespace)::TeamStateTy" undef, align 8
32 @_ZN12_GLOBAL__N_112ThreadStatesE = internal unnamed_addr addrspace(3) global [1024 x ptr] undef, align 16
33 @.str.12.47 = private unnamed_addr addrspace(4) constant [49 x i8] c"Thread state modified while explicitly disabled!\00", align 1
34 @_ZL29SharedMemVariableSharingSpace = internal unnamed_addr addrspace(3) global [64 x ptr] undef, align 16
36 @llvm.used = appending addrspace(1) global [2 x ptr] [ptr addrspacecast (ptr addrspace(3) @IsSPMDMode to ptr), ptr addrspacecast (ptr addrspace(4) @omptarget_device_environment to ptr)], section "llvm.metadata"
37 @llvm.compiler.used = appending addrspace(1) global [1 x ptr] [ptr addrspacecast (ptr addrspace(1) @__omp_offloading_20_11e3950_main_l12_exec_mode to ptr)], section "llvm.metadata"
39 ; Function Attrs: alwaysinline convergent norecurse nounwind
40 define weak_odr amdgpu_kernel void @__omp_offloading_20_11e3950_main_l12(i64 noundef %nxyz, i64 noundef %ng, ptr noundef nonnull align 8 dereferenceable(8) %aa) local_unnamed_addr #0 {
42 %ng1 = alloca i32, align 4
43 %captured_vars_addrs = alloca [2 x ptr], align 8, addrspace(5)
44 %0 = call i32 @__kmpc_target_init(ptr addrspacecast (ptr addrspace(1) @1 to ptr), i8 1, i1 true, i1 true)
45 %exec_user_code = icmp eq i32 %0, -1
46 br i1 %exec_user_code, label %user_code.entry, label %common.ret
48 user_code.entry: ; preds = %entry
49 %captured_vars_addrs.ascast = addrspacecast ptr addrspace(5) %captured_vars_addrs to ptr
50 store ptr %ng1, ptr addrspace(5) %captured_vars_addrs, align 8, !tbaa !7
51 call void @__kmpc_parallel_51(ptr addrspacecast (ptr addrspace(1) @1 to ptr), i32 0, i32 1, i32 -1, i32 -1, ptr nonnull @__omp_outlined__, ptr nonnull @__omp_outlined___wrapper, ptr nonnull %captured_vars_addrs.ascast, i64 2)
52 call void @__kmpc_target_deinit(ptr addrspacecast (ptr addrspace(1) @1 to ptr), i8 1, i1 true)
55 common.ret: ; preds = %user_code.entry, %entry
59 ; Function Attrs: argmemonly nocallback nofree nosync nounwind willreturn
60 declare void @llvm.lifetime.start.p5(i64 immarg, ptr addrspace(5) nocapture) #1
62 ; Function Attrs: alwaysinline mustprogress nofree norecurse nosync nounwind readnone willreturn
63 define internal void @__omp_outlined__(ptr noalias nocapture %.global_tid., ptr noalias nocapture %.bound_tid., ptr nocapture nonnull align 4 %ng, ptr nocapture nonnull align 8 %aa) #2 {
65 %isspmd = load i32, ptr addrspace(3) @IsSPMDMode
66 store i32 %isspmd, ptr @G
70 ; Function Attrs: argmemonly nocallback nofree nosync nounwind willreturn
71 declare void @llvm.lifetime.end.p5(i64 immarg, ptr addrspace(5) nocapture) #1
73 ; Function Attrs: mustprogress nofree norecurse nosync nounwind readnone willreturn
74 define internal void @__omp_outlined___wrapper(i16 zeroext %0, i32 noundef %1) #3 {
76 %isspmd = load i32, ptr addrspace(3) @IsSPMDMode
77 store i32 %isspmd, ptr @G
81 ; Function Attrs: nounwind readnone speculatable willreturn
82 declare i32 @llvm.amdgcn.workitem.id.x() #4
84 ; Function Attrs: nounwind readnone speculatable willreturn
85 declare i32 @llvm.amdgcn.workgroup.id.x() #4
87 ; Function Attrs: nounwind readnone speculatable willreturn
88 declare align 4 ptr addrspace(4) @llvm.amdgcn.dispatch.ptr() #4
90 ; Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn
91 declare i32 @llvm.umin.i32(i32, i32) #5
93 ; Function Attrs: inaccessiblememonly nocallback nofree nosync nounwind willreturn
94 declare void @llvm.assume(i1 noundef) #6
96 ; Function Attrs: convergent nounwind willreturn
97 declare void @llvm.amdgcn.s.barrier() #7
99 ; Function Attrs: convergent mustprogress noinline nounwind willreturn
100 define internal fastcc void @_ZN4_OMP11synchronize14threadsAlignedEv() unnamed_addr #8 {
102 call void @llvm.amdgcn.s.barrier() #13
106 ; Function Attrs: convergent nounwind
107 define internal i32 @__kmpc_target_init(ptr nocapture noundef readnone %Ident, i8 noundef signext %Mode, i1 noundef zeroext %UseGenericStateMachine, i1 noundef zeroext %0) local_unnamed_addr #9 {
110 %tobool.not = icmp eq i8 %1, 0
111 br i1 %tobool.not, label %if.else, label %if.then
113 if.then: ; preds = %entry
114 %2 = call i32 @llvm.amdgcn.workitem.id.x() #13, !range !11
115 %3 = call i32 @llvm.amdgcn.workgroup.id.x() #13
116 %4 = call align 4 dereferenceable(64) ptr addrspace(4) @llvm.amdgcn.dispatch.ptr() #13
117 %5 = getelementptr i8, ptr addrspace(4) %4, i64 12
118 %6 = load i32, ptr addrspace(4) %5, align 4, !invariant.load !12
119 %7 = getelementptr i8, ptr addrspace(4) %4, i64 4
120 %8 = load i16, ptr addrspace(4) %7, align 4, !range !13, !invariant.load !12
121 %conv.i.i7.i.i.i = zext i16 %8 to i32
122 %mul.i.i8.i.i.i = mul i32 %3, %conv.i.i7.i.i.i
123 %sub.i.i9.i.i.i = sub i32 %6, %mul.i.i8.i.i.i
124 %9 = call i32 @llvm.umin.i32(i32 %sub.i.i9.i.i.i, i32 %conv.i.i7.i.i.i) #13
125 %cmp4.i.i.i = icmp ult i32 %2, %9
126 call void @llvm.assume(i1 %cmp4.i.i.i) #13
127 %cmp.i.i8 = icmp eq i32 %2, 0
128 br i1 %cmp.i.i8, label %if.then.i, label %_ZN4_OMP5state4initEb.exit.critedge
130 if.then.i: ; preds = %if.then
131 store i32 1, ptr addrspace(3) @IsSPMDMode, align 4, !tbaa !14
132 store i8 0, ptr addrspace(3) getelementptr inbounds (%"struct.(anonymous namespace)::SharedMemorySmartStackTy", ptr addrspace(3) @_ZN12_GLOBAL__N_122SharedMemorySmartStackE, i32 0, i32 1, i32 0), align 16, !tbaa !18
133 store i32 %9, ptr addrspace(3) @_ZN12_GLOBAL__N_19TeamStateE, align 8, !tbaa !19
134 store i32 0, ptr addrspace(3) getelementptr inbounds (%"struct.(anonymous namespace)::TeamStateTy", ptr addrspace(3) @_ZN12_GLOBAL__N_19TeamStateE, i32 0, i32 0, i32 1), align 4, !tbaa !23
135 store i32 0, ptr addrspace(3) getelementptr inbounds (%"struct.(anonymous namespace)::TeamStateTy", ptr addrspace(3) @_ZN12_GLOBAL__N_19TeamStateE, i32 0, i32 0, i32 2), align 8, !tbaa !24
136 store i32 1, ptr addrspace(3) getelementptr inbounds (%"struct.(anonymous namespace)::TeamStateTy", ptr addrspace(3) @_ZN12_GLOBAL__N_19TeamStateE, i32 0, i32 0, i32 3), align 4, !tbaa !25
137 store i32 1, ptr addrspace(3) getelementptr inbounds (%"struct.(anonymous namespace)::TeamStateTy", ptr addrspace(3) @_ZN12_GLOBAL__N_19TeamStateE, i32 0, i32 0, i32 4), align 8, !tbaa !26
138 store i32 1, ptr addrspace(3) getelementptr inbounds (%"struct.(anonymous namespace)::TeamStateTy", ptr addrspace(3) @_ZN12_GLOBAL__N_19TeamStateE, i32 0, i32 0, i32 5), align 4, !tbaa !27
139 store i32 1, ptr addrspace(3) getelementptr inbounds (%"struct.(anonymous namespace)::TeamStateTy", ptr addrspace(3) @_ZN12_GLOBAL__N_19TeamStateE, i32 0, i32 1), align 8, !tbaa !28
140 store ptr null, ptr addrspace(3) getelementptr inbounds (%"struct.(anonymous namespace)::TeamStateTy", ptr addrspace(3) @_ZN12_GLOBAL__N_19TeamStateE, i32 0, i32 2), align 8, !tbaa !29
141 br label %_ZN4_OMP5state4initEb.exit
143 _ZN4_OMP5state4initEb.exit.critedge: ; preds = %if.then
144 %arrayidx.i.i.c = getelementptr inbounds [1024 x i8], ptr addrspace(3) getelementptr inbounds (%"struct.(anonymous namespace)::SharedMemorySmartStackTy", ptr addrspace(3) @_ZN12_GLOBAL__N_122SharedMemorySmartStackE, i32 0, i32 1, i32 0), i32 0, i32 %2
145 store i8 0, ptr addrspace(3) %arrayidx.i.i.c, align 1, !tbaa !18
146 br label %_ZN4_OMP5state4initEb.exit
148 _ZN4_OMP5state4initEb.exit: ; preds = %_ZN4_OMP5state4initEb.exit.critedge, %if.then.i
149 %arrayidx.i = getelementptr inbounds [1024 x ptr], ptr addrspace(3) @_ZN12_GLOBAL__N_112ThreadStatesE, i32 0, i32 %2
150 store ptr null, ptr addrspace(3) %arrayidx.i, align 8, !tbaa !30
151 call fastcc void @_ZN4_OMP11synchronize14threadsAlignedEv() #14
154 if.else: ; preds = %entry
155 %10 = call i32 @llvm.amdgcn.workgroup.id.x() #13
156 %11 = call align 4 dereferenceable(64) ptr addrspace(4) @llvm.amdgcn.dispatch.ptr() #13
157 %12 = getelementptr i8, ptr addrspace(4) %11, i64 12
158 %13 = load i32, ptr addrspace(4) %12, align 4, !invariant.load !12
159 %14 = getelementptr i8, ptr addrspace(4) %11, i64 4
160 %15 = load i16, ptr addrspace(4) %14, align 4, !range !13, !invariant.load !12
161 %conv.i.i.i.i.i.i = zext i16 %15 to i32
162 %mul.i.i.i.i.i.i = mul i32 %10, %conv.i.i.i.i.i.i
163 %sub.i.i.i.i.i.i = sub i32 %13, %mul.i.i.i.i.i.i
164 %16 = call i32 @llvm.umin.i32(i32 %sub.i.i.i.i.i.i, i32 %conv.i.i.i.i.i.i) #13
165 %17 = call i32 @llvm.amdgcn.workitem.id.x() #13
166 %cmp.i.i.i.i26 = icmp ult i32 %17, %16
167 call void @llvm.assume(i1 %cmp.i.i.i.i26) #13
168 %sub.i.i.i27 = add nsw i32 %16, -1
169 %and.i.i.i28 = and i32 %sub.i.i.i27, -64
170 %cmp.i2.i.i29 = icmp eq i32 %17, %and.i.i.i28
171 br i1 %cmp.i2.i.i29, label %if.then.i30, label %_ZN4_OMP5state4initEb.exit55.critedge
173 if.then.i30: ; preds = %if.else
174 store i32 0, ptr addrspace(3) @IsSPMDMode, align 4, !tbaa !14
175 %arrayidx.i.i46 = getelementptr inbounds [1024 x i8], ptr addrspace(3) getelementptr inbounds (%"struct.(anonymous namespace)::SharedMemorySmartStackTy", ptr addrspace(3) @_ZN12_GLOBAL__N_122SharedMemorySmartStackE, i32 0, i32 1, i32 0), i32 0, i32 %17
176 store i8 0, ptr addrspace(3) %arrayidx.i.i46, align 1, !tbaa !18
177 %sub.i.i = add nsw i32 %16, -64
178 store i32 %sub.i.i, ptr addrspace(3) @_ZN12_GLOBAL__N_19TeamStateE, align 8, !tbaa !19
179 store i32 0, ptr addrspace(3) getelementptr inbounds (%"struct.(anonymous namespace)::TeamStateTy", ptr addrspace(3) @_ZN12_GLOBAL__N_19TeamStateE, i32 0, i32 0, i32 1), align 4, !tbaa !23
180 store i32 0, ptr addrspace(3) getelementptr inbounds (%"struct.(anonymous namespace)::TeamStateTy", ptr addrspace(3) @_ZN12_GLOBAL__N_19TeamStateE, i32 0, i32 0, i32 2), align 8, !tbaa !24
181 store i32 1, ptr addrspace(3) getelementptr inbounds (%"struct.(anonymous namespace)::TeamStateTy", ptr addrspace(3) @_ZN12_GLOBAL__N_19TeamStateE, i32 0, i32 0, i32 3), align 4, !tbaa !25
182 store i32 1, ptr addrspace(3) getelementptr inbounds (%"struct.(anonymous namespace)::TeamStateTy", ptr addrspace(3) @_ZN12_GLOBAL__N_19TeamStateE, i32 0, i32 0, i32 4), align 8, !tbaa !26
183 store i32 1, ptr addrspace(3) getelementptr inbounds (%"struct.(anonymous namespace)::TeamStateTy", ptr addrspace(3) @_ZN12_GLOBAL__N_19TeamStateE, i32 0, i32 0, i32 5), align 4, !tbaa !27
184 store i32 1, ptr addrspace(3) getelementptr inbounds (%"struct.(anonymous namespace)::TeamStateTy", ptr addrspace(3) @_ZN12_GLOBAL__N_19TeamStateE, i32 0, i32 1), align 8, !tbaa !28
185 store ptr null, ptr addrspace(3) getelementptr inbounds (%"struct.(anonymous namespace)::TeamStateTy", ptr addrspace(3) @_ZN12_GLOBAL__N_19TeamStateE, i32 0, i32 2), align 8, !tbaa !29
186 br label %_ZN4_OMP5state4initEb.exit55
188 _ZN4_OMP5state4initEb.exit55.critedge: ; preds = %if.else
189 %arrayidx.i.i46.c = getelementptr inbounds [1024 x i8], ptr addrspace(3) getelementptr inbounds (%"struct.(anonymous namespace)::SharedMemorySmartStackTy", ptr addrspace(3) @_ZN12_GLOBAL__N_122SharedMemorySmartStackE, i32 0, i32 1, i32 0), i32 0, i32 %17
190 store i8 0, ptr addrspace(3) %arrayidx.i.i46.c, align 1, !tbaa !18
191 br label %_ZN4_OMP5state4initEb.exit55
193 _ZN4_OMP5state4initEb.exit55: ; preds = %_ZN4_OMP5state4initEb.exit55.critedge, %if.then.i30
194 %arrayidx.i53 = getelementptr inbounds [1024 x ptr], ptr addrspace(3) @_ZN12_GLOBAL__N_112ThreadStatesE, i32 0, i32 %17
195 store ptr null, ptr addrspace(3) %arrayidx.i53, align 8, !tbaa !30
198 if.end: ; preds = %_ZN4_OMP5state4initEb.exit55, %_ZN4_OMP5state4initEb.exit
199 %18 = call i32 @llvm.amdgcn.workgroup.id.x() #13
200 %19 = call align 4 dereferenceable(64) ptr addrspace(4) @llvm.amdgcn.dispatch.ptr() #13
201 %20 = getelementptr i8, ptr addrspace(4) %19, i64 12
202 %21 = load i32, ptr addrspace(4) %20, align 4, !invariant.load !12
203 %22 = getelementptr i8, ptr addrspace(4) %19, i64 4
204 %23 = load i16, ptr addrspace(4) %22, align 4, !range !13, !invariant.load !12
205 %conv.i.i.i.i.i73 = zext i16 %23 to i32
206 %mul.i.i.i.i.i74 = mul i32 %18, %conv.i.i.i.i.i73
207 %sub.i.i.i.i.i75 = sub i32 %21, %mul.i.i.i.i.i74
208 %24 = call i32 @llvm.umin.i32(i32 %sub.i.i.i.i.i75, i32 %conv.i.i.i.i.i73) #13
209 %25 = call i32 @llvm.amdgcn.workitem.id.x() #13
210 %cmp.i.i.i79 = icmp ult i32 %25, %24
211 call void @llvm.assume(i1 %cmp.i.i.i79) #13
212 br i1 %tobool.not, label %_ZN4_OMP7mapping23isInitialThreadInLevel0Eb.exit, label %_ZN4_OMP7mapping12getBlockSizeEb.exit.i64
214 _ZN4_OMP7mapping12getBlockSizeEb.exit.i64: ; preds = %if.end
215 %26 = load i32, ptr addrspace(3) @_ZN12_GLOBAL__N_19TeamStateE, align 8
216 %cmp.i.i.i63 = icmp eq i32 %24, %26
217 call void @llvm.assume(i1 %cmp.i.i.i63) #13
218 %27 = load i32, ptr addrspace(3) getelementptr inbounds (%"struct.(anonymous namespace)::TeamStateTy", ptr addrspace(3) @_ZN12_GLOBAL__N_19TeamStateE, i32 0, i32 0, i32 1), align 4
219 %cmp9.i.i.i = icmp eq i32 %27, 0
220 call void @llvm.assume(i1 %cmp9.i.i.i) #13
221 %28 = load i32, ptr addrspace(3) getelementptr inbounds (%"struct.(anonymous namespace)::TeamStateTy", ptr addrspace(3) @_ZN12_GLOBAL__N_19TeamStateE, i32 0, i32 0, i32 2), align 8
222 %cmp19.i.i.i = icmp eq i32 %28, 0
223 call void @llvm.assume(i1 %cmp19.i.i.i) #13
224 %29 = load i32, ptr addrspace(3) getelementptr inbounds (%"struct.(anonymous namespace)::TeamStateTy", ptr addrspace(3) @_ZN12_GLOBAL__N_19TeamStateE, i32 0, i32 0, i32 3), align 4
225 %cmp29.i.i.i = icmp eq i32 %29, 1
226 call void @llvm.assume(i1 %cmp29.i.i.i) #13
227 %30 = load i32, ptr addrspace(3) getelementptr inbounds (%"struct.(anonymous namespace)::TeamStateTy", ptr addrspace(3) @_ZN12_GLOBAL__N_19TeamStateE, i32 0, i32 0, i32 4), align 8
228 %cmp39.i.i.i = icmp eq i32 %30, 1
229 call void @llvm.assume(i1 %cmp39.i.i.i) #13
230 %31 = load i32, ptr addrspace(3) getelementptr inbounds (%"struct.(anonymous namespace)::TeamStateTy", ptr addrspace(3) @_ZN12_GLOBAL__N_19TeamStateE, i32 0, i32 0, i32 5), align 4
231 %cmp49.i.i.i = icmp eq i32 %31, 1
232 call void @llvm.assume(i1 %cmp49.i.i.i) #13
233 %32 = load i32, ptr addrspace(3) getelementptr inbounds (%"struct.(anonymous namespace)::TeamStateTy", ptr addrspace(3) @_ZN12_GLOBAL__N_19TeamStateE, i32 0, i32 1), align 8
234 %cmp.i.i67 = icmp eq i32 %32, 1
235 call void @llvm.assume(i1 %cmp.i.i67) #13
236 %33 = load i32, ptr addrspace(3) @IsSPMDMode, align 4, !tbaa !14
237 %tobool.i59.i = icmp ne i32 %33, 0
238 call void @llvm.assume(i1 %tobool.i59.i) #13
239 br label %_ZN14DebugEntryRAIID2Ev.exit250
241 _ZN4_OMP7mapping23isInitialThreadInLevel0Eb.exit: ; preds = %if.end
242 %sub.i.i83 = add nsw i32 %24, -1
243 %and.i.i84 = and i32 %sub.i.i83, -64
244 %cmp.i2.i = icmp eq i32 %25, %and.i.i84
245 br i1 %cmp.i2.i, label %_ZN14DebugEntryRAIID2Ev.exit250, label %if.end10
247 if.end10: ; preds = %_ZN4_OMP7mapping23isInitialThreadInLevel0Eb.exit
248 %sub.i = add nsw i32 %24, -64
249 %cmp = icmp ult i32 %25, %sub.i
250 %or.cond251 = select i1 %UseGenericStateMachine, i1 %cmp, i1 false
251 br i1 %or.cond251, label %do.body.i, label %_ZN14DebugEntryRAIID2Ev.exit250
253 do.body.i: ; preds = %if.end10
254 call void @llvm.amdgcn.s.barrier() #13
255 br label %_ZN14DebugEntryRAIID2Ev.exit250
257 _ZN14DebugEntryRAIID2Ev.exit250: ; preds = %do.body.i, %if.end10, %_ZN4_OMP7mapping23isInitialThreadInLevel0Eb.exit, %_ZN4_OMP7mapping12getBlockSizeEb.exit.i64
258 %retval.0 = phi i32 [ -1, %_ZN4_OMP7mapping12getBlockSizeEb.exit.i64 ], [ -1, %_ZN4_OMP7mapping23isInitialThreadInLevel0Eb.exit ], [ %25, %do.body.i ], [ %25, %if.end10 ]
262 ; Function Attrs: nounwind
263 define internal void @__kmpc_target_deinit(ptr nocapture noundef readnone %Ident, i8 noundef signext %Mode, i1 noundef zeroext %0) local_unnamed_addr #10 {
267 ; Function Attrs: convergent nounwind
268 declare void @__kmpc_parallel_51(ptr nocapture noundef readnone %ident, i32 noundef %0, i32 noundef %if_expr, i32 noundef %num_threads, i32 noundef %proc_bind, ptr noundef %fn, ptr noundef %wrapper_fn, ptr noundef %args, i64 noundef %nargs)
270 ; Function Attrs: argmemonly nofree nounwind willreturn
271 declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #12
273 attributes #0 = { alwaysinline convergent norecurse nounwind "frame-pointer"="none" "kernel" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="gfx908" "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dot1-insts,+dot2-insts,+dot3-insts,+dot4-insts,+dot5-insts,+dot6-insts,+dot7-insts,+dpp,+flat-address-space,+gfx8-insts,+gfx9-insts,+mai-insts,+s-memrealtime,+s-memtime-inst" }
274 attributes #1 = { argmemonly nocallback nofree nosync nounwind willreturn }
275 attributes #2 = { alwaysinline mustprogress nofree norecurse nosync nounwind readnone willreturn "frame-pointer"="none" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="gfx908" "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dot1-insts,+dot2-insts,+dot3-insts,+dot4-insts,+dot5-insts,+dot6-insts,+dot7-insts,+dpp,+flat-address-space,+gfx8-insts,+gfx9-insts,+mai-insts,+s-memrealtime,+s-memtime-inst" }
276 attributes #3 = { mustprogress nofree norecurse nosync nounwind readnone willreturn "frame-pointer"="none" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="gfx908" "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dot1-insts,+dot2-insts,+dot3-insts,+dot4-insts,+dot5-insts,+dot6-insts,+dot7-insts,+dpp,+flat-address-space,+gfx8-insts,+gfx9-insts,+mai-insts,+s-memrealtime,+s-memtime-inst" }
277 attributes #4 = { nounwind readnone speculatable willreturn }
278 attributes #5 = { nocallback nofree nosync nounwind readnone speculatable willreturn }
279 attributes #6 = { inaccessiblememonly nocallback nofree nosync nounwind willreturn }
280 attributes #7 = { convergent nounwind willreturn }
281 attributes #8 = { convergent mustprogress noinline nounwind willreturn "frame-pointer"="none" "llvm.assume"="ompx_aligned_barrier,ompx_no_call_asm,ompx_no_call_asm" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="gfx908" "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dot1-insts,+dot2-insts,+dot3-insts,+dot4-insts,+dot5-insts,+dot6-insts,+dot7-insts,+dpp,+flat-address-space,+gfx8-insts,+gfx9-insts,+mai-insts,+s-memrealtime,+s-memtime-inst" }
282 attributes #9 = { convergent nounwind "frame-pointer"="none" "llvm.assume"="ompx_no_call_asm,ompx_no_call_asm" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="gfx908" "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dot1-insts,+dot2-insts,+dot3-insts,+dot4-insts,+dot5-insts,+dot6-insts,+dot7-insts,+dpp,+flat-address-space,+gfx8-insts,+gfx9-insts,+mai-insts,+s-memrealtime,+s-memtime-inst" }
283 attributes #10 = { nounwind "frame-pointer"="none" "llvm.assume"="ompx_no_call_asm,ompx_no_call_asm" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="gfx908" "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dot1-insts,+dot2-insts,+dot3-insts,+dot4-insts,+dot5-insts,+dot6-insts,+dot7-insts,+dpp,+flat-address-space,+gfx8-insts,+gfx9-insts,+mai-insts,+s-memrealtime,+s-memtime-inst" }
284 attributes #11 = { convergent nounwind "frame-pointer"="none" "llvm.assume"="ompx_no_call_asm" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="gfx908" "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dot1-insts,+dot2-insts,+dot3-insts,+dot4-insts,+dot5-insts,+dot6-insts,+dot7-insts,+dpp,+flat-address-space,+gfx8-insts,+gfx9-insts,+mai-insts,+s-memrealtime,+s-memtime-inst" }
285 attributes #12 = { argmemonly nofree nounwind willreturn }
286 attributes #13 = { nounwind }
287 attributes #14 = { convergent nounwind "llvm.assume"="ompx_aligned_barrier,ompx_no_call_asm" }
288 attributes #15 = { convergent nounwind }
290 !omp_offload.info = !{!0}
291 !nvvm.annotations = !{!1}
292 !llvm.module.flags = !{!2, !3, !4, !5}
295 !0 = !{i32 0, i32 32, i32 18757968, !"main", i32 12, i32 0}
296 !1 = !{ptr @__omp_offloading_20_11e3950_main_l12, !"kernel", i32 1}
297 !2 = !{i32 1, !"wchar_size", i32 4}
298 !3 = !{i32 7, !"openmp", i32 50}
299 !4 = !{i32 7, !"openmp-device", i32 50}
300 !5 = !{i32 7, !"PIC Level", i32 2}
301 !6 = !{!"clang version 15.0.0"}
302 !7 = !{!8, !8, i64 0}
303 !8 = !{!"any pointer", !9, i64 0}
304 !9 = !{!"omnipotent char", !10, i64 0}
305 !10 = !{!"Simple C/C++ TBAA"}
306 !11 = !{i32 0, i32 1024}
308 !13 = !{i16 1, i16 1025}
309 !14 = !{!15, !15, i64 0}
310 !15 = !{!"int", !16, i64 0}
311 !16 = !{!"omnipotent char", !17, i64 0}
312 !17 = !{!"Simple C++ TBAA"}
313 !18 = !{!16, !16, i64 0}
314 !19 = !{!20, !15, i64 0}
315 !20 = !{!"_ZTSN12_GLOBAL__N_111TeamStateTyE", !21, i64 0, !15, i64 24, !22, i64 32}
316 !21 = !{!"_ZTSN12_GLOBAL__N_110ICVStateTyE", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !15, i64 16, !15, i64 20}
317 !22 = !{!"any pointer", !16, i64 0}
318 !23 = !{!20, !15, i64 4}
319 !24 = !{!20, !15, i64 8}
320 !25 = !{!20, !15, i64 12}
321 !26 = !{!20, !15, i64 16}
322 !27 = !{!20, !15, i64 20}
323 !28 = !{!20, !15, i64 24}
324 !29 = !{!20, !22, i64 32}
325 !30 = !{!22, !22, i64 0}
326 !31 = !{!"branch_weights", i32 2000, i32 1}