1 ; RUN: opt < %s -print-callgraph -disable-output 2>&1 | FileCheck %s
2 ; CHECK: Call graph node <<null function>><<{{.*}}>> #uses=0
3 ; CHECK-NEXT: CS<{{.*}}> calls function 'f'
4 ; CHECK-NEXT: CS<{{.*}}> calls function '__kmpc_fork_call'
7 %struct.ident_t = type { i32, i32, i32, i32, i8* }
9 @0 = private unnamed_addr constant [23 x i8] c";unknown;unknown;0;0;;\00", align 1
10 @1 = private unnamed_addr global %struct.ident_t { i32 0, i32 2, i32 0, i32 0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @0, i32 0, i32 0) }, align 8
12 ; Function Attrs: noinline nounwind optnone uwtable
13 define dso_local void @f() {
15 br label %omp_parallel
17 omp_parallel: ; preds = %entry
18 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @1, i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* @f..omp_par to void (i32*, i32*, ...)*))
19 br label %omp.par.exit.split
21 omp.par.exit.split: ; preds = %omp_parallel
25 ; Function Attrs: norecurse nounwind
26 define internal void @f..omp_par(i32* noalias %tid.addr, i32* noalias %zero.addr) {
28 %tid.addr.local = alloca i32, align 4
29 %0 = load i32, i32* %tid.addr, align 4
30 store i32 %0, i32* %tid.addr.local, align 4
31 %tid = load i32, i32* %tid.addr.local, align 4
32 br label %omp.par.region
34 omp.par.exit.split.exitStub: ; preds = %omp.par.outlined.exit
37 omp.par.region: ; preds = %omp.par.entry
38 br label %omp.par.pre_finalize
40 omp.par.pre_finalize: ; preds = %omp.par.region
41 br label %omp.par.outlined.exit
43 omp.par.outlined.exit: ; preds = %omp.par.pre_finalize
44 br label %omp.par.exit.split.exitStub
47 ; Function Attrs: nounwind
48 declare !callback !2 void @__kmpc_fork_call(%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) #2
51 !3 = !{i64 2, i64 -1, i64 -1, i1 true}