[llvm] [BOLT][AArch64] Reduce the number of ADR relaxations (PR #111577)
Vladislav Khmelevsky via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 8 13:22:28 PDT 2024
================
@@ -0,0 +1,49 @@
+## Check that llvm-bolt will not unnecessarily relax ADR instruction.
+
+# RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown %s -o %t.o
+# RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -static
+# RUN: llvm-bolt %t.exe -o %t.bolt --split-functions --split-strategy=random2
+# RUN: llvm-objdump -d --disassemble-symbols=_start %t.bolt | FileCheck %s
+# RUN: llvm-objdump -d --disassemble-symbols=foo.cold.0 %t.bolt \
+# RUN: | FileCheck --check-prefix=CHECK-FOO %s
+
+## ADR below references its containing function that is split. But ADR is always
+## in the main fragment, thus there is no need to relax it.
+ .text
+ .globl _start
+ .type _start, %function
+_start:
+# CHECK: <_start>:
+ .cfi_startproc
+ adr x1, _start
----------------
yota9 wrote:
Indentation
https://github.com/llvm/llvm-project/pull/111577
More information about the llvm-commits
mailing list