Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / cgprofile-txt2.s
blobb59b6eeb292fabff00e32148498208b799d3cf46
1 # REQUIRES: x86
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
4 # RUN: echo "A B 5" > %t.call_graph
5 # RUN: echo "B C 50" >> %t.call_graph
6 # RUN: echo "C D 40" >> %t.call_graph
7 # RUN: echo "D B 10" >> %t.call_graph
8 # RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph --call-graph-profile-sort=hfsort -o %t2
9 # RUN: llvm-readobj --symbols %t2 | FileCheck %s --check-prefix=CHECKC3
10 # RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph --call-graph-profile-sort=cdsort -o %t2
11 # RUN: llvm-readobj --symbols %t2 | FileCheck %s --check-prefix=CHECKCDS
13 # CHECKC3: Name: A
14 # CHECKC3-NEXT: Value: 0x201123
15 # CHECKC3: Name: B
16 # CHECKC3-NEXT: Value: 0x201120
17 # CHECKC3: Name: C
18 # CHECKC3-NEXT: Value: 0x201121
19 # CHECKC3: Name: D
20 # CHECKC3-NEXT: Value: 0x201122
22 # CHECKCDS: Name: A
23 # CHECKCDS-NEXT: Value: 0x201120
24 # CHECKCDS: Name: B
25 # CHECKCDS-NEXT: Value: 0x201121
26 # CHECKCDS: Name: C
27 # CHECKCDS-NEXT: Value: 0x201122
28 # CHECKCDS: Name: D
29 # CHECKCDS-NEXT: Value: 0x201123
31 .section .text.A,"ax",@progbits
32 .globl A
34 nop
36 .section .text.B,"ax",@progbits
37 .globl B
39 nop
41 .section .text.C,"ax",@progbits
42 .globl C
44 nop
46 .section .text.D,"ax",@progbits
47 .globl D
49 nop