1# REQUIRES: x86
2
3# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
4# RUN: ld.lld %t -o %t2 --icf=all --print-icf-sections | FileCheck %s
5# RUN: llvm-objdump -t %t2 | FileCheck --check-prefix=ALIGN %s
6
7# CHECK: selected section {{.*}}:(.text.f1)
8# CHECK:   removing identical section {{.*}}:(.text.f2)
9
10# ALIGN: .text 0000000000000000 _start
11# ALIGN: .text 0000000000000000 f1
12
13.globl _start, f1, f2
14_start:
15  ret
16
17.section .text.f1, "ax"
18  .align 1
19f1:
20  mov $60, %rax
21  mov $42, %rdi
22  syscall
23
24.section .text.f2, "ax"
25  .align 256
26f2:
27  mov $60, %rax
28  mov $42, %rdi
29  syscall
30