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 // FIXME: Run the following command once LTOPreLinkDefaultPipeline is
6 // %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
7 // Checks if hot call is inlined by normal compile, but not inlined by
14 for (int i = 0; i < n; i++)
18 // SAMPLEPGO-LABEL: define void @bar
19 // THINLTO-LABEL: define void @bar
20 // SAMPLEPGO-NOT: call{{.*}}foo
21 // THINLTO: call{{.*}}foo
23 for (int i = 0; i < n; i++)
27 // Checks if loop unroll is invoked by normal compile, but not thinlto compile.
28 // SAMPLEPGO-LABEL: define void @unroll
29 // THINLTO-LABEL: define void @unroll
30 // SAMPLEPGO: call{{.*}}baz
31 // SAMPLEPGO: call{{.*}}baz
32 // THINLTO: call{{.*}}baz
33 // THINLTO-NOT: call{{.*}}baz
35 for (int i = 0; i < 2; i++)
39 // Checks that icp is not invoked for ThinLTO, but invoked for normal samplepgo.
40 // SAMPLEPGO-LABEL: define void @icp
41 // THINLTO-LABEL: define void @icp
42 // SAMPLEPGO: if.true.direct_targ
43 // FIXME: the following condition needs to be reversed once
44 // LTOPreLinkDefaultPipeline is customized.
45 // THINLTO-NOT: if.true.direct_targ
46 void icp(void (*p)()) {