[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / print-icf.s
blobf74e689f87e61d9bbd09443b446c3f369207b491
1 # REQUIRES: x86
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
4 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/print-icf.s -o %t1
5 # RUN: ld.lld %t %t1 -o %t2 --icf=all --print-icf-sections | FileCheck %s --match-full-lines --strict-whitespace
6 # RUN: ld.lld %t %t1 -o %t2 --icf=all --no-print-icf-sections --print-icf-sections | FileCheck %s
7 # RUN: ld.lld %t %t1 -o %t2 --icf=all --print-icf-sections --no-print-icf-sections | count 0
9 # CHECK-NOT:{{.}}
10 # CHECK:selected section {{.*}}:(.text.f1)
11 # CHECK-NEXT: removing identical section {{.*}}:(.text.f3)
12 # CHECK-NEXT: removing identical section {{.*}}:(.text.f5)
13 # CHECK-NEXT: removing identical section {{.*}}:(.text.f6)
14 # CHECK:selected section {{.*}}:(.text.f2)
15 # CHECK-NEXT: removing identical section {{.*}}:(.text.f4)
16 # CHECK-NEXT: removing identical section {{.*}}:(.text.f7)
17 # CHECK-NOT:{{.}}
19 .globl _start, f1, f2
20 _start:
21 ret
23 .section .text.f1, "ax"
24 f1:
25 mov $60, %rax
26 mov $42, %rdi
27 syscall
29 .section .text.f2, "ax"
30 f2:
31 mov $0, %rax
33 .section .text.f3, "ax"
34 f3:
35 mov $60, %rax
36 mov $42, %rdi
37 syscall
39 .section .text.f4, "ax"
40 f4:
41 mov $0, %rax
43 .section .text.f5, "ax"
44 f5:
45 mov $60, %rax
46 mov $42, %rdi
47 syscall