1 ## Check that llvm-bolt will not unnecessarily relax ADR instruction.
3 # RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown %s -o %t.o
4 # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -static
5 # RUN: llvm-bolt %t.exe -o %t.bolt --split-functions --split-strategy=random2
6 # RUN: llvm-objdump -d --disassemble-symbols=_start %t.bolt | FileCheck %s
7 # RUN: llvm-objdump -d --disassemble-symbols=foo.cold.0 %t.bolt \
8 # RUN: | FileCheck --check-prefix=CHECK-FOO %s
10 ## ADR below references its containing function that is split. But ADR is always
11 ## in the main fragment, thus there is no need to relax it.
14 .type _start, %function
27 .size _start, .-_start
30 ## In foo, ADR is in the split fragment but references the main one. Thus, it
31 ## needs to be relaxed into ADRP + ADD.
40 # CHECK-FOO: <foo.cold.0>:
48 ## Force relocation mode.
49 .reloc 0, R_AARCH64_NONE