[llvm] [BOLT][RISCV] Fix AUIPC/JALR call rewriting (PR #216882)

via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 21 12:56:38 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- bolt/lib/Target/RISCV/RISCVMCSymbolizer.cpp bolt/lib/Target/RISCV/RISCVMCSymbolizer.h bolt/include/bolt/Core/BinaryFunction.h bolt/include/bolt/Core/MCPlusBuilder.h bolt/lib/Core/BinaryFunction.cpp bolt/lib/Core/Relocation.cpp bolt/lib/Target/RISCV/RISCVMCPlusBuilder.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/bolt/lib/Target/RISCV/RISCVMCSymbolizer.cpp b/bolt/lib/Target/RISCV/RISCVMCSymbolizer.cpp
index d2ed21684..0e6ca38f7 100644
--- a/bolt/lib/Target/RISCV/RISCVMCSymbolizer.cpp
+++ b/bolt/lib/Target/RISCV/RISCVMCSymbolizer.cpp
@@ -142,8 +142,8 @@ bool RISCVMCSymbolizer::tryAddingSymbolicOperand(
       return false;
 
     const MCExpr *Expr = MCSymbolRefExpr::create(TargetSymbol, *Ctx);
-    Inst.addOperand(MCOperand::createExpr(BC.MIB->getTargetExprFor(
-        Inst, Expr, *Ctx, ELF::R_RISCV_CALL_PLT)));
+    Inst.addOperand(MCOperand::createExpr(
+        BC.MIB->getTargetExprFor(Inst, Expr, *Ctx, ELF::R_RISCV_CALL_PLT)));
     return true;
   }
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/216882


More information about the llvm-commits mailing list