[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / cgprofile-icf.s
blobe28630d0eb30bf030d8c26ada90c2452a6872b04
1 # REQUIRES: x86
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
5 # RUN: echo "A B 100" > %t.call_graph
6 # RUN: echo "A C 40" >> %t.call_graph
7 # RUN: echo "C D 61" >> %t.call_graph
8 # RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph --call-graph-profile-sort=hfsort -o %t.out -icf=all
9 # RUN: llvm-readobj --symbols %t.out | FileCheck %s
10 # RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph --call-graph-profile-sort=hfsort -o %t2.out
11 # RUN: llvm-readobj --symbols %t2.out | FileCheck %s --check-prefix=NOICF
13 .section .text.D,"ax",@progbits
14 .globl D
16 mov $60, %rax
17 retq
19 .section .text.C,"ax",@progbits
20 .globl C
22 mov $60, %rax
23 retq
25 .section .text.B,"ax",@progbits
26 .globl B
28 mov $2, %rax
29 retq
31 .section .text.A,"ax",@progbits
32 .globl A
34 mov $42, %rax
35 retq
37 # CHECK: Name: D
38 # CHECK-NEXT: Value: 0x201128
39 # CHECK: Name: C
40 # CHECK-NEXT: Value: 0x201128
41 # CHECK: Name: B
42 # CHECK-NEXT: Value: 0x201130
43 # CHECK: Name: A
44 # CHECK-NEXT: Value: 0x201120
46 # NOICF: Name: D
47 # NOICF-NEXT: Value: 0x201138
48 # NOICF: Name: C
49 # NOICF-NEXT: Value: 0x201130
50 # NOICF: Name: B
51 # NOICF-NEXT: Value: 0x201128
52 # NOICF: Name: A
53 # NOICF-NEXT: Value: 0x201120