Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / loongarch-tls-le.s
bloba20d7d83bae3f221a9a710cf38749901477c75d1
1 # REQUIRES: loongarch
3 # RUN: llvm-mc --filetype=obj --triple=loongarch32 %s -o %t.32.o
4 # RUN: llvm-mc --filetype=obj --triple=loongarch64 %s -o %t.64.o
6 # RUN: ld.lld %t.32.o -o %t.32
7 # RUN: llvm-nm -p %t.32 | FileCheck --check-prefixes=NM %s
8 # RUN: llvm-objdump -d --no-show-raw-insn %t.32 | FileCheck --check-prefixes=LE %s
10 # RUN: ld.lld %t.64.o -o %t.64
11 # RUN: llvm-objdump -d --no-show-raw-insn %t.64 | FileCheck --check-prefixes=LE %s
13 # RUN: not ld.lld -shared %t.32.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR --implicit-check-not=error:
15 # ERR: error: relocation R_LARCH_TLS_LE_HI20 against .LANCHOR0 cannot be used with -shared
16 # ERR: error: relocation R_LARCH_TLS_LE_LO12 against .LANCHOR0 cannot be used with -shared
17 # ERR: error: relocation R_LARCH_TLS_LE_HI20 against a cannot be used with -shared
18 # ERR: error: relocation R_LARCH_TLS_LE_LO12 against a cannot be used with -shared
20 # NM: {{0*}}00000008 b .LANCHOR0
21 # NM: {{0*}}00000800 B a
23 ## .LANCHOR0@tprel = 8
24 ## a@tprel = 0x800
25 # LE: lu12i.w $a0, 0
26 # LE-NEXT: ori $a0, $a0, 8
27 # LE-NEXT: lu12i.w $a1, 0
28 # LE-NEXT: ori $a1, $a1, 2048
29 # LE-EMPTY:
31 .text
32 _start:
33 la.tls.le $a0, .LANCHOR0
34 la.tls.le $a1, a
36 .section .tbss,"awT",@nobits
37 .space 8
38 .LANCHOR0:
39 .space 0x800-8
40 .globl a
42 .zero 4