xref: /llvm-project/clang/test/CodeGen/profile-function-groups.c (revision 6f4c3c0f6463880b685bfbca1932c06fd0c1f015)
112e78ff8SEllis Hoag // 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
212e78ff8SEllis Hoag // 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
312e78ff8SEllis Hoag // 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
4af58684fSEllis Hoag 
5af58684fSEllis Hoag // Group 0
612e78ff8SEllis Hoag 
7*6f4c3c0fSEllis Hoag // SELECT1: skipprofile
8*6f4c3c0fSEllis Hoag // SELECT2: skipprofile
9af58684fSEllis Hoag // CHECK: define {{.*}} @hoo()
hoo()10af58684fSEllis Hoag void hoo() {}
11af58684fSEllis Hoag 
12af58684fSEllis Hoag // Group 1
13*6f4c3c0fSEllis Hoag // SELECT0: skipprofile
1412e78ff8SEllis Hoag 
15*6f4c3c0fSEllis Hoag // SELECT2: skipprofile
16af58684fSEllis Hoag // CHECK: define {{.*}} @goo()
goo()17af58684fSEllis Hoag void goo() {}
18af58684fSEllis Hoag 
19af58684fSEllis Hoag // Group 2
20*6f4c3c0fSEllis Hoag // SELECT0: skipprofile
21*6f4c3c0fSEllis Hoag // SELECT1: skipprofile
2212e78ff8SEllis Hoag 
23af58684fSEllis Hoag // CHECK: define {{.*}} @boo()
boo()24af58684fSEllis Hoag void boo() {}
25