From ad4846c859498597322e5d40360d2dcc7761d27a Mon Sep 17 00:00:00 2001 From: Qi Zhao Date: Fri, 27 Dec 2024 17:59:55 +0800 Subject: [PATCH] [JITLink][RISCV] Add feature relax for addsub tests. NFC 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. --- .../JITLink/RISCV/{riscv_reloc_add.s => ELF_reloc_add.s} | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) rename llvm/test/ExecutionEngine/JITLink/RISCV/{riscv_reloc_add.s => ELF_reloc_add.s} (82%) 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 13689b6d8a026..01f9e7eb5653d 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 \