Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / icf7.s
blob4344c303bcf1e85c2b8bf0c1f575976318d55655
1 # REQUIRES: x86
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
4 # RUN: ld.lld %t -o %t2 --Ttext=220000 --icf=all --print-icf-sections | FileCheck %s
5 # RUN: llvm-objdump -t %t2 | FileCheck --check-prefix=ALIGN %s
7 # CHECK: selected section {{.*}}:(.text.f1)
8 # CHECK: removing identical section {{.*}}:(.text.f2)
10 ## Check that the selected section has the higher alignment of the two identical sections.
11 # ALIGN: 0000000000220000 g .text 0000000000000000 _start
12 # ALIGN: 0000000000220100 g .text 0000000000000000 f1
14 .globl _start, f1, f2
15 _start:
16 ret
18 .section .text.f1, "ax"
19 .align 1
20 f1:
21 mov $60, %rax
22 mov $42, %rdi
23 syscall
25 .section .text.f2, "ax"
26 .align 256
27 f2:
28 mov $60, %rax
29 mov $42, %rdi
30 syscall