[llvm] [BOLT][AArch64] Reduce the number of ADR relaxations (PR #111577)
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 8 12:56:42 PDT 2024
================
@@ -0,0 +1,31 @@
+## Check that llvm-bolt will unnecessarily relax ADR instruction.
+## ADR below references containing function that is split. But ADR is always
+## in the main fragment, thus there is no need to relax it.
+
+# 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=randomN \
+# RUN: 2>&1 | FileCheck %s
+# RUN: llvm-objdump -d --disassemble-symbols=_start %t.bolt | FileCheck %s
+
+# CHECK-NOT: adrp
----------------
dcci wrote:
can we dump the whole function (or some context?) that way we can make the test more robust.
https://github.com/llvm/llvm-project/pull/111577
More information about the llvm-commits
mailing list