aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/profile-function-groups.c
blob: 052e8676459442473e194d2c02213d1444cf9bfc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// RUN: %clang -fprofile-generate -fprofile-function-groups=3 -fprofile-selected-function-group=0 -emit-llvm -S %s -o - | FileCheck %s --implicit-check-not="; {{.* (noprofile|skipprofile)}}" --check-prefixes=CHECK,SELECT0
// RUN: %clang -fprofile-generate -fprofile-function-groups=3 -fprofile-selected-function-group=1 -emit-llvm -S %s -o - | FileCheck %s --implicit-check-not="; {{.* (noprofile|skipprofile)}}" --check-prefixes=CHECK,SELECT1
// RUN: %clang -fprofile-generate -fprofile-function-groups=3 -fprofile-selected-function-group=2 -emit-llvm -S %s -o - | FileCheck %s --implicit-check-not="; {{.* (noprofile|skipprofile)}}" --check-prefixes=CHECK,SELECT2

// Group 0

// SELECT1: skipprofile
// SELECT2: skipprofile
// CHECK: define {{.*}} @hoo()
void hoo() {}

// Group 1
// SELECT0: skipprofile

// SELECT2: skipprofile
// CHECK: define {{.*}} @goo()
void goo() {}

// Group 2
// SELECT0: skipprofile
// SELECT1: skipprofile

// CHECK: define {{.*}} @boo()
void boo() {}