Rui Ueyama | 0b28952 | 2016-02-25 18:43:51 | [diff] [blame] | 1 | # REQUIRES: x86 |
2 | |||||
3 | # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1 | ||||
4 | # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/icf2.s -o %t2 | ||||
Fangrui Song | 40a9f22 | 2018-07-02 17:48:23 | [diff] [blame] | 5 | # RUN: ld.lld %t1 %t2 -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck %s |
Rui Ueyama | 0b28952 | 2016-02-25 18:43:51 | [diff] [blame] | 6 | |
Rui Ueyama | 2d9e7a8 | 2018-02-13 22:56:49 | [diff] [blame] | 7 | # CHECK: selected section {{.*}}:(.text.f1) |
8 | # CHECK: removing identical section {{.*}}:(.text.f2) | ||||
Rui Ueyama | 0b28952 | 2016-02-25 18:43:51 | [diff] [blame] | 9 | |
10 | .globl _start, f1, f2 | ||||
11 | _start: | ||||
12 | ret | ||||
13 | |||||
14 | .section .text.f1, "ax" | ||||
15 | f1: | ||||
16 | mov $60, %rdi | ||||
17 | call f2 |