Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / ppc32-local-branch.s
blob95099df43be2f69556af5a385eeaf8b3071fc365
1 # REQUIRES: ppc
2 # RUN: llvm-mc -filetype=obj -triple=powerpc %s -o %t.o
3 # RUN: echo '.globl foo; foo: blr' | llvm-mc -filetype=obj -triple=powerpc - -o %t1.o
4 # RUN: ld.lld %t.o %t1.o -o %t
5 # RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
7 ## R_PPC_REL24 and R_PPC_PLTREL24 are converted to PC relative relocations if the
8 ## symbol is non-preemptable. The addend of R_PPC_PLTREL24 should be ignored.
10 # CHECK: [[#%x,ADDR:]] <_start>:
11 # CHECK-NEXT: b 0x[[#%x,ADDR+12]]
12 # CHECK-NEXT: b 0x[[#%x,ADDR+12]]
13 # CHECK-NEXT: b 0x[[#%x,ADDR+12]]
14 # CHECK-EMPTY:
15 # CHECK-NEXT: <foo>:
17 .globl _start
18 _start:
19 b foo # R_PPC_REL24
20 b foo@plt # R_PPC_PLTREL24
21 b foo+32768@plt #_PPC_PLTREL24 with addend