Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / aarch64-tls-gdle.s
blob1f31dd77791ae0748492a5ebdcb7915d969a959d
1 # REQUIRES: aarch64
2 # RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %p/Inputs/aarch64-tls-ie.s -o %ttlsie.o
3 # RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %s -o %tmain.o
4 # RUN: ld.lld %tmain.o %ttlsie.o -o %tout
5 # RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %tout | FileCheck %s
6 # RUN: llvm-readobj -r %tout | FileCheck -check-prefix=RELOC %s
8 ## Local-Dynamic to Local-Exec relax creates no dynamic relocations.
9 # RELOC: Relocations [
10 # RELOC-NEXT: ]
12 # TCB size = 0x16 and foo is first element from TLS register.
13 # CHECK-LABEL: <_start>:
14 # CHECK-NEXT: 2101c8: movz x0, #0, lsl #16
15 # CHECK-NEXT: 2101cc: movk x0, #16
16 # CHECK-NEXT: 2101d0: nop
17 # CHECK-NEXT: 2101d4: nop
19 .globl _start
20 _start:
21 adrp x0, :tlsdesc:foo
22 ldr x1, [x0, :tlsdesc_lo12:foo]
23 add x0, x0, :tlsdesc_lo12:foo
24 .tlsdesccall foo
25 blr x1