Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / merge-align2.s
blob686b2ef7ba71c6af9bb7c1379cc67010abd29aa0
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
4 # RUN: ld.lld %t.o -o %t
5 # RUN: llvm-readelf -S %t | FileCheck --check-prefix=SEC %s
6 # RUN: llvm-readelf -x .cst8 %t | FileCheck %s
8 # RUN: ld.lld -O0 -r %t.o -o %t1.o
9 # RUN: llvm-readelf -S %t1.o | FileCheck --check-prefix=SEC %s
10 # RUN: llvm-readelf -x .cst8 %t1.o | FileCheck %s
12 ## Check that if we have SHF_MERGE sections with the same name, flags and
13 ## entsize, but different alignments, we combine them with the maximum input
14 ## alignment as the output alignment.
16 # SEC: Name Type {{.*}} Size ES Flg Lk Inf Al
17 # SEC: .cst8 PROGBITS {{.*}} 000018 08 AM 0 0 8
19 # CHECK: [[#%x,]] 01000000 00000000 02000000 00000000
20 # CHECK-NEXT: [[#%x,]] 03000000 00000000
22 .section .cst8,"aM",@progbits,8,unique,0
23 .align 4
24 .quad 1
25 .quad 1
27 .section .cst8,"aM",@progbits,8,unique,1
28 .align 4
29 .quad 1
30 .quad 2
32 .section .cst8,"aM",@progbits,8,unique,2
33 .align 8
34 .quad 1
35 .quad 3