Index: test/profile/instrprof-max-function-count.c =================================================================== --- /dev/null +++ test/profile/instrprof-max-function-count.c @@ -0,0 +1,24 @@ +// RUN: %clang_profgen -o %t -O2 %s +// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t +// RUN: llvm-profdata merge -o %t.profdata %t.profraw +// RUN: %clang_profuse=%t.profdata -o - -S -emit-llvm %s | FileCheck %s + +int begin(int i) { + if (i) + return 0; + return 1; +} + +int end(int i) { + if (i) + return 0; + return 1; +} + +int main(int argc, const char *argv[]) { + begin(0); + end(1); + end(1); + return 0; +} +// CHECK: !{{[0-9]+}} = !{i32 1, !"MaxFunctionCount", i32 2}