[llvm] [JITLink][RISCV] Add feature relax for addsub tests. NFC (PR #121204)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 27 03:29:54 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-risc-v
Author: ZhaoQi (zhaoqi5)
<details>
<summary>Changes</summary>
R_RISCV_{ADD*/SUB*} relocations are kept only when feature relax enabled. So it is better to add relax to the test, so that relocs can be reserved for processing by the jitlink. That's what this test really wants to test.
---
Full diff: https://github.com/llvm/llvm-project/pull/121204.diff
1 Files Affected:
- (renamed) llvm/test/ExecutionEngine/JITLink/RISCV/ELF_reloc_add.s (+4-2)
``````````diff
diff --git a/llvm/test/ExecutionEngine/JITLink/RISCV/riscv_reloc_add.s b/llvm/test/ExecutionEngine/JITLink/RISCV/ELF_reloc_add.s
similarity index 82%
rename from llvm/test/ExecutionEngine/JITLink/RISCV/riscv_reloc_add.s
rename to llvm/test/ExecutionEngine/JITLink/RISCV/ELF_reloc_add.s
index 13689b6d8a026c..01f9e7eb5653d9 100644
--- a/llvm/test/ExecutionEngine/JITLink/RISCV/riscv_reloc_add.s
+++ b/llvm/test/ExecutionEngine/JITLink/RISCV/ELF_reloc_add.s
@@ -1,6 +1,8 @@
# RUN: rm -rf %t && mkdir -p %t
-# RUN: llvm-mc -triple=riscv64 -filetype=obj -o %t/riscv64_reloc_add.o %s
-# RUN: llvm-mc -triple=riscv32 -filetype=obj -o %t/riscv32_reloc_add.o %s
+# RUN: llvm-mc -triple=riscv64 -mattr=+relax -filetype=obj \
+# RUN: -o %t/riscv64_reloc_add.o %s
+# RUN: llvm-mc -triple=riscv32 -mattr=+relax -filetype=obj \
+# RUN: -o %t/riscv32_reloc_add.o %s
# RUN: llvm-jitlink -noexec -check %s %t/riscv64_reloc_add.o \
# RUN: -slab-allocate=1Mb -slab-address=0x1000 -slab-page-size=0x1000
# RUN: llvm-jitlink -noexec -check %s %t/riscv32_reloc_add.o \
``````````
</details>
https://github.com/llvm/llvm-project/pull/121204
More information about the llvm-commits
mailing list