[llvm] 8e40450 - [JITLink][RISCV] Add feature relax for addsub tests. NFC (#121204)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 2 17:07:47 PST 2025


Author: ZhaoQi
Date: 2025-01-03T09:07:44+08:00
New Revision: 8e404509cc130d95f09f255649a87446ca81b187

URL: https://github.com/llvm/llvm-project/commit/8e404509cc130d95f09f255649a87446ca81b187
DIFF: https://github.com/llvm/llvm-project/commit/8e404509cc130d95f09f255649a87446ca81b187.diff

LOG: [JITLink][RISCV] Add feature relax for addsub tests. NFC (#121204)

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.

Added: 
    llvm/test/ExecutionEngine/JITLink/RISCV/ELF_reloc_add.s

Modified: 
    

Removed: 
    llvm/test/ExecutionEngine/JITLink/RISCV/riscv_reloc_add.s


################################################################################
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 \


        


More information about the llvm-commits mailing list