[llvm] [BOLT][RISCV] Fix AUIPC/JALR call rewriting (PR #216882)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 25 00:58:03 PDT 2026
================
@@ -0,0 +1,57 @@
+// Test recovery of an RV64 linker-resolved call using the alternate link
+// register and targeting an entry point inside a function.
+
+// RUN: llvm-mc -triple riscv64 -mattr=-relax -filetype=obj -o %t.o %s
+// RUN: ld.lld --no-relax --emit-relocs -o %t %t.o
+// RUN: llvm-objdump -dr %t | FileCheck --check-prefix=INPUT %s
+// RUN: llvm-bolt --print-cfg --print-fix-riscv-calls --print-only=_start \
+// RUN: --reorder-functions=user \
+// RUN: --function-order=%p/Inputs/unsymbolized-call-order.txt \
+// RUN: -o %t.bolt %t | FileCheck --check-prefix=BOLT %s
----------------
Thrrreeee wrote:
using as
```
// RUN: echo target > %t.order
// RUN: echo relocated_call >> %t.order
// RUN: echo _start >> %t.order
// RUN: llvm-bolt --print-cfg --print-fix-riscv-calls --print-only=_start \
// RUN: --reorder-functions=user \
// RUN: --function-order=%t.order \
// RUN: -o %t.bolt %t | FileCheck --check-prefix=BOLT %s
```
https://github.com/llvm/llvm-project/pull/216882
More information about the llvm-commits
mailing list