[llvm-shlib] Fix the version naming style of libLLVM for Windows (#85710)
[llvm-project.git] / bolt / test / X86 / split-all.s
blob1f51ba2e375e83f2fdf875dcdb5ea7d62ff48552
1 # Test split all block strategy
3 # RUN: llvm-mc --filetype=obj --triple x86_64-unknown-unknown %s -o %t.o
4 # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q
5 # RUN: llvm-bolt %t.exe -o %t.bolt --split-functions --split-strategy=all \
6 # RUN: --print-split --print-only=chain \
7 # RUN: 2>&1 | FileCheck %s
9 # CHECK: Binary Function "chain"
10 # CHECK: IsSplit :
11 # CHECK-SAME: {{ 1$}}
12 # CHECK: {{^\.LBB00}}
13 # CHECK: ------- HOT-COLD SPLIT POINT -------
14 # CHECK: {{^\.LFT0}}
15 # CHECK: ------- HOT-COLD SPLIT POINT -------
16 # CHECK: {{^\.Ltmp0}}
17 # CHECK: ------- HOT-COLD SPLIT POINT -------
18 # CHECK: {{^\.Ltmp2}}
19 # CHECK: ------- HOT-COLD SPLIT POINT -------
20 # CHECK: {{^\.Ltmp3}}
21 # CHECK: ------- HOT-COLD SPLIT POINT -------
22 # CHECK: {{^\.Ltmp4}}
23 # CHECK: ------- HOT-COLD SPLIT POINT -------
24 # CHECK: {{^\.Ltmp5}}
25 # CHECK: ------- HOT-COLD SPLIT POINT -------
26 # CHECK: {{^\.Ltmp1}}
27 # CHECK: End of Function "chain"
29 .text
30 .globl chain
31 .type chain, @function
32 chain:
33 .Lchain_entry:
34 pushq %rbp
35 movq %rsp, %rbp
36 cmpl $2, %edi
37 jge .Lchain_start
38 .Lfast:
39 movl $5, %eax
40 jmp .Lexit
41 .Lchain_start:
42 movl $10, %eax
43 jmp .Lchain1
44 .Lchain1:
45 addl $1, %eax
46 jmp .Lchain2
47 .Lchain2:
48 addl $1, %eax
49 jmp .Lchain3
50 .Lchain3:
51 addl $1, %eax
52 addl $1, %eax
53 addl $1, %eax
54 addl $1, %eax
55 addl $1, %eax
56 jmp .Lchain4
57 .Lchain4:
58 addl $1, %eax
59 addl $1, %eax
60 addl $1, %eax
61 addl $1, %eax
62 addl $1, %eax
63 jmp .Lexit
64 .Lexit:
65 popq %rbp
66 ret
67 .Lchain_end:
68 .size chain, .Lchain_end-chain
71 .globl main
72 .type main, @function
73 main:
74 pushq %rbp
75 movq %rsp, %rbp
76 movl $1, %edi
77 call chain
78 movl $4, %edi
79 call chain
80 xorl %eax, %eax
81 popq %rbp
82 retq
83 .Lmain_end:
84 .size main, .Lmain_end-main