[llvm-shlib] Fix the version naming style of libLLVM for Windows (#85710)
[llvm-project.git] / bolt / test / X86 / lto-name-match.s
blob92aad7d5ec62c321bd20285dc238698b4dd7efb0
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
13 .globl _start
14 _start:
16 LL_start_0:
17 # FDATA: 1 _start #LL_start_0# 1 foo.llvm.321 0 0 1
18 call foo.llvm.123
20 LL_start_1:
21 # FDATA: 1 _start #LL_start_1# 1 foo.constprop.321 0 0 1
22 call foo.constprop.123
24 LL_start_2:
25 # FDATA: 1 _start #LL_start_2# 1 foo.lto_priv.321 0 0 1
26 call foo.lto_priv.123
28 LL_start_3:
29 # FDATA: 1 _start #LL_start_3# 1 foo.__uniq.321 0 0 1
30 call foo.__uniq.123
32 LL_start_4:
33 # FDATA: 1 _start #LL_start_4# 1 foo.__uniq.654.llvm.321 0 0 1
34 call foo.__uniq.456.llvm.123
36 call exit
37 .size _start, .-_start
39 .globl foo.llvm.123
40 .type foo.llvm.123,@function
41 foo.llvm.123:
42 ret
43 .size foo.llvm.123, .-foo.llvm.123
45 .globl foo.constprop.123
46 .type foo.constprop.123,@function
47 foo.constprop.123:
48 ret
49 .size foo.constprop.123, .-foo.constprop.123
51 .globl foo.lto_priv.123
52 .type foo.lto_priv.123,@function
53 foo.lto_priv.123:
54 ret
55 .size foo.lto_priv.123, .-foo.lto_priv.123
57 .globl foo.__uniq.123
58 .type foo.__uniq.123,@function
59 foo.__uniq.123:
60 ret
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:
66 ret
67 .size foo.__uniq.456.llvm.123, .-foo.__uniq.456.llvm.123