Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / PowerPC / pcrel-tls-initial-exec-value-load-reloc.s
blobbc254d66c95403fb457cf5a2b5029d1797e8da23
1 # RUN: llvm-mc -triple=powerpc64le-unknown-unknown -filetype=obj %s 2>&1 | \
2 # RUN: FileCheck %s -check-prefix=MC
3 # RUN: llvm-mc -triple=powerpc64le-unknown-unknown -filetype=obj %s | \
4 # RUN: llvm-readobj -r - | FileCheck %s -check-prefix=READOBJ
6 # This test checks that on Power PC we can correctly convert x@got@tprel@pcrel
7 # and x@tls@pcrel into R_PPC64_GOT_TPREL_PCREL34, and R_PPC64_TLS for initial
8 # exec relocations with the value loaded.
9 # Note that with R_PPC64_TLS relocations, to distinguish PC relative
10 # TLS the relocation has a field value displaced by one byte from the
11 # beginning of the instruction.
13 # MC-NOT: error: invalid variant
15 # READOBJ: 0x0 R_PPC64_GOT_TPREL_PCREL34 x 0x0
16 # READOBJ-NEXT: 0x9 R_PPC64_TLS x 0x0
18 InitialExecLoad:
19 pld 3, x@got@tprel@pcrel(0), 1
20 lwzx 3, 3, x@tls@pcrel
21 blr