diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2018-03-27 16:10:01 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2018-03-27 16:10:01 +0000 |
commit | 22458ea7aa968518e275909c4cec52c110f23072 (patch) | |
tree | b1cca5815f072bb1fbab91bcc239595c7db2cf0c | |
parent | b66b8fd0f2355773379f20ae29593be167aec227 (diff) | |
download | bcm5719-llvm-22458ea7aa968518e275909c4cec52c110f23072.tar.gz bcm5719-llvm-22458ea7aa968518e275909c4cec52c110f23072.zip |
Add a passing test.
I noticed that we were not testing this while working on another patch.
llvm-svn: 328631
-rw-r--r-- | lld/test/ELF/icf-merge2.s | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lld/test/ELF/icf-merge2.s b/lld/test/ELF/icf-merge2.s new file mode 100644 index 00000000000..47c4c88d449 --- /dev/null +++ b/lld/test/ELF/icf-merge2.s @@ -0,0 +1,23 @@ +# REQUIRES: x86 + +# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o +# RUN: ld.lld %t.o -o %t --icf=all +# RUN: llvm-objdump -d %t | FileCheck %s + +# Test that we don't merge these. +# CHECK: leaq +# CHECK: leaq + + .section .merge1, "aM", @progbits, 8 +.Lfoo: + .quad 42 + + .section .merge2, "aM", @progbits, 4 +.Lbar: + .long 41 + + .section .text.foo, "ax", @progbits + leaq .Lfoo(%rip), %rax + + .section .text.bar, "ax", @progbits + leaq .Lbar(%rip), %rax |