Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / bolt / test / X86 / function-order-lite.s
blob5cedc833b08934bcc6671aea9ca38454554d61f6
1 # Check that functions listed in -function-order list take precedence over
2 # lite mode function filtering.
4 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
5 # RUN: link_fdata %s %t.o %t.fdata
6 # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q
7 # RUN: llvm-bolt %t.exe --data %t.fdata --lite --reorder-functions=user \
8 # RUN: --function-order=%p/Inputs/order-lite.txt -o %t -print-all 2>&1 \
9 # RUN: | FileCheck %s
11 # CHECK: 1 out of 3 functions in the binary (33.3%) have non-empty execution profile
12 # CHECK-DAG: Binary Function "main" after reorder-functions
13 # CHECK-DAG: Binary Function "foo.__uniq.123" after reorder-functions
15 .globl main
16 .type main, %function
17 main:
18 .cfi_startproc
19 .LBB06:
20 callq testfunc
21 retq
22 .cfi_endproc
23 .size main, .-main
25 .globl testfunc
26 .type testfunc, %function
27 testfunc:
28 # FDATA: 0 [unknown] 0 1 testfunc 0 1 0
29 .cfi_startproc
30 pushq %rbp
31 movq %rsp, %rbp
32 movl $0x0, %eax
33 popq %rbp
34 retq
35 .cfi_endproc
36 .size testfunc, .-testfunc
38 .globl foo.__uniq.123
39 .type foo.__uniq.123, %function
40 foo.__uniq.123:
41 .cfi_startproc
42 pushq %rbp
43 movq %rsp, %rbp
44 movl $0x0, %eax
45 popq %rbp
46 retq
47 .cfi_endproc
48 .size foo.__uniq.123, .-foo.__uniq.123