1 // RUN: %clang_cc1 -O2 -fprofile-sample-use=%S/Inputs/pgo-sample-thinlto-summary.prof %s -emit-llvm -o - 2>&1 | FileCheck %s -check-prefix=SAMPLEPGO
2 // RUN: %clang_cc1 -O2 -fprofile-sample-use=%S/Inputs/pgo-sample-thinlto-summary.prof %s -emit-llvm -flto=thin -o - 2>&1 | FileCheck %s -check-prefix=THINLTO
3 // RUN: %clang_cc1 -O2 -fexperimental-new-pass-manager -fprofile-sample-use=%S/Inputs/pgo-sample-thinlto-summary.prof %s -emit-llvm -o - 2>&1 | FileCheck %s -check-prefix=SAMPLEPGO
4 // RUN: %clang_cc1 -O2 -fexperimental-new-pass-manager -fprofile-sample-use=%S/Inputs/pgo-sample-thinlto-summary.prof %s -emit-llvm -flto=thin -o - 2>&1 | FileCheck %s -check-prefix=THINLTO
5 // Checks if hot call is inlined by normal compile, but not inlined by
12 for (int i = 0; i < n; i++)
16 // SAMPLEPGO-LABEL: define {{(dso_local )?}}void @bar
17 // THINLTO-LABEL: define {{(dso_local )?}}void @bar
18 // SAMPLEPGO-NOT: call{{.*}}foo
19 // THINLTO: call{{.*}}foo
21 for (int i = 0; i < n; i++)
25 // Checks if loop unroll is invoked by normal compile, but not thinlto compile.
26 // SAMPLEPGO-LABEL: define {{(dso_local )?}}void @unroll
27 // THINLTO-LABEL: define {{(dso_local )?}}void @unroll
28 // SAMPLEPGO: call{{.*}}baz
29 // SAMPLEPGO: call{{.*}}baz
30 // THINLTO: call{{.*}}baz
31 // THINLTO-NOT: call{{.*}}baz
33 for (int i = 0; i < 2; i++)
37 // Checks that icp is not invoked for ThinLTO, but invoked for normal samplepgo.
38 // SAMPLEPGO-LABEL: define {{(dso_local )?}}void @icp
39 // THINLTO-LABEL: define {{(dso_local )?}}void @icp
40 // SAMPLEPGO: if.true.direct_targ
41 // FIXME: the following condition needs to be reversed once
42 // LTOPreLinkDefaultPipeline is customized.
43 // THINLTO-NOT: if.true.direct_targ
44 void icp(void (*p)()) {