[llvm] [RISCV][XCV] Relax long `cv.beqimm`/`cv.bneimm` branches (PR #205096)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 23 05:05:56 PDT 2026


VittorioBurani wrote:

Done. I've replaced the llc + llvm-objdump test with an llvm-mc test (`llvm/test/MC/RISCV/corev/XCVbi-long-branch.s`): it assembles out-of-range `cv.beqimm`/`cv.bneimm` and checks the assembler relaxes them into an inverted short branch plus a `jal` trampoline, and leaves an in-range branch as a single instruction. As you noted, this also confirms the assembler does the relaxation.


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


More information about the llvm-commits mailing list