1 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
2 # RUN: link_fdata %s %t.o %t.fdata
3 # RUN: llvm-strip --strip-unneeded %t.o
4 # RUN: %clang %cflags %t.o -o %t.exe
5 # RUN: llvm-bolt %t.exe --data %t.fdata -o %t.null | FileCheck %s
7 ## Check that profile is correctly matched by functions with variable suffixes.
8 ## E.g., LTO-generated name foo.llvm.123 should match foo.llvm.*.
10 # CHECK: 6 out of {{.*}} functions in the binary {{.*}} have non-empty execution profile
11 # CHECK-NOT: profile for {{.*}} objects was ignored
17 # FDATA: 1 _start #LL_start_0# 1 foo.llvm.321 0 0 1
21 # FDATA: 1 _start #LL_start_1# 1 foo.constprop.321 0 0 1
22 call foo.constprop.123
25 # FDATA: 1 _start #LL_start_2# 1 foo.lto_priv.321 0 0 1
29 # FDATA: 1 _start #LL_start_3# 1 foo.__uniq.321 0 0 1
33 # FDATA: 1 _start #LL_start_4# 1 foo.__uniq.654.llvm.321 0 0 1
34 call foo.__uniq.456
.llvm.123
37 .size _start, .-_start
40 .type foo.llvm.123,@function
43 .size foo.llvm.123, .-foo.llvm.123
45 .globl foo.constprop.123
46 .type foo.constprop.123,@function
49 .size foo.constprop.123, .-foo.constprop.123
51 .globl foo.lto_priv.123
52 .type foo.lto_priv.123,@function
55 .size foo.lto_priv.123, .-foo.lto_priv.123
58 .type foo.__uniq.123,@function
61 .size foo.__uniq.123, .-foo.__uniq.123
63 .globl foo.__uniq.456.llvm.123
64 .type foo.__uniq.456.llvm.123,@function
65 foo.__uniq.456
.llvm.123:
67 .size foo.__uniq.456.llvm.123, .-foo.__uniq.456.llvm.123