[llvm] [BOLT][RISCV] Fix the inaccurate profile data check (PR #189338)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 8 18:21:04 PDT 2026


https://github.com/WangJee updated https://github.com/llvm/llvm-project/pull/189338

>From a7f82f5e29f8d75a4987a1dd28e6c6ded4fb63ad Mon Sep 17 00:00:00 2001
From: "wangjue.wangjue" <wangjue.wangjue at alibaba-inc.com>
Date: Mon, 30 Mar 2026 07:31:11 +0000
Subject: [PATCH] Fix the inaccurate profile data check

---
 bolt/lib/Passes/FixRISCVCallsPass.cpp | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/bolt/lib/Passes/FixRISCVCallsPass.cpp b/bolt/lib/Passes/FixRISCVCallsPass.cpp
index 9011ef303a80e..2a4173fc225a7 100644
--- a/bolt/lib/Passes/FixRISCVCallsPass.cpp
+++ b/bolt/lib/Passes/FixRISCVCallsPass.cpp
@@ -59,14 +59,6 @@ void FixRISCVCallsPass::runOnFunction(BinaryFunction &BF) {
 
         MIB->moveAnnotations(std::move(OldCall), *II);
 
-        // The original offset was set on the jalr of the auipc+jalr pair. Since
-        // the whole pair is replaced by a call, adjust the offset by -4 (the
-        // size of a auipc).
-        if (std::optional<uint32_t> Offset = MIB->getOffset(*II)) {
-          assert(*Offset >= 4 && "Illegal jalr offset");
-          MIB->setOffset(*II, *Offset - 4);
-        }
-
         II = BB.eraseInstruction(NextII);
         continue;
       }



More information about the llvm-commits mailing list