48 lines · plain
1# REQUIRES: x862 3# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t4# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/print-icf.s -o %t15# RUN: ld.lld %t %t1 -o %t2 --icf=all --print-icf-sections | FileCheck %s --match-full-lines --strict-whitespace6# RUN: ld.lld %t %t1 -o %t2 --icf=all --no-print-icf-sections --print-icf-sections | FileCheck %s7# RUN: ld.lld %t %t1 -o %t2 --icf=all --print-icf-sections --no-print-icf-sections | count 08 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:{{.}}18 19.globl _start, f1, f220_start:21 ret22 23.section .text.f1, "ax"24f1:25 mov $60, %rax26 mov $42, %rdi27 syscall28 29 .section .text.f2, "ax"30f2:31 mov $0, %rax32 33.section .text.f3, "ax"34f3:35 mov $60, %rax36 mov $42, %rdi37 syscall38 39.section .text.f4, "ax"40f4:41 mov $0, %rax42 43.section .text.f5, "ax"44f5:45 mov $60, %rax46 mov $42, %rdi47 syscall48