From eabaee0c59110d0e11b33a69db54ccda526b35fd Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 7 Jan 2024 12:09:44 -0800 Subject: [RISCV] Omit "@plt" in assembly output "call foo@plt" (#72467) R_RISCV_CALL/R_RISCV_CALL_PLT distinction is not necessary and R_RISCV_CALL has been deprecated. Since https://reviews.llvm.org/D132530 `call foo` assembles to R_RISCV_CALL_PLT. The `@plt` suffix is not useful and can be removed now (matching AArch64 and PowerPC). GNU assembler assembles `call foo` to RISCV_CALL_PLT since 2022-09 (70f35d72ef04cd23771875c1661c9975044a749c). Without this patch, unconditionally changing MO_CALL to MO_PLT could create `jump .L1@plt, a0`, which is invalid in LLVM integrated assembler and GNU assembler. --- llvm/test/CodeGen/RISCV/select-or.ll | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/test/CodeGen/RISCV/select-or.ll') diff --git a/llvm/test/CodeGen/RISCV/select-or.ll b/llvm/test/CodeGen/RISCV/select-or.ll index d378bb4..20a5ec1 100644 --- a/llvm/test/CodeGen/RISCV/select-or.ll +++ b/llvm/test/CodeGen/RISCV/select-or.ll @@ -44,10 +44,10 @@ define signext i32 @if_of_or(i1 zeroext %a, i1 zeroext %b) nounwind { ; RV32I-NEXT: # %bb.1: ; RV32I-NEXT: bnez a1, .LBB1_3 ; RV32I-NEXT: # %bb.2: # %if.else -; RV32I-NEXT: call neither@plt +; RV32I-NEXT: call neither ; RV32I-NEXT: j .LBB1_4 ; RV32I-NEXT: .LBB1_3: # %if.then -; RV32I-NEXT: call either@plt +; RV32I-NEXT: call either ; RV32I-NEXT: .LBB1_4: # %if.end ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload ; RV32I-NEXT: addi sp, sp, 16 @@ -61,10 +61,10 @@ define signext i32 @if_of_or(i1 zeroext %a, i1 zeroext %b) nounwind { ; RV64I-NEXT: # %bb.1: ; RV64I-NEXT: bnez a1, .LBB1_3 ; RV64I-NEXT: # %bb.2: # %if.else -; RV64I-NEXT: call neither@plt +; RV64I-NEXT: call neither ; RV64I-NEXT: j .LBB1_4 ; RV64I-NEXT: .LBB1_3: # %if.then -; RV64I-NEXT: call either@plt +; RV64I-NEXT: call either ; RV64I-NEXT: .LBB1_4: # %if.end ; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload ; RV64I-NEXT: addi sp, sp, 16 -- cgit v1.1