[llvm] fix isCall flag for JAL and JALR, and the isBranch flag for C_JR (PR #161105)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 29 08:55:08 PDT 2025


================
@@ -488,6 +488,7 @@ def C_LDSP : CStackLoad<0b011, "c.ldsp", GPRNoX0, uimm9_lsb000>,
 let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in
 def C_JR : RVInst16CR<0b1000, 0b10, (outs), (ins GPRNoX0:$rs1),
                       "c.jr", "$rs1">, Sched<[WriteJalr, ReadJalr]> {
+  let isBranch = 1;
----------------
topperc wrote:

c.jr is not a branch if rs1=x1. It's a return.

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


More information about the llvm-commits mailing list