[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:09 PDT 2025
================
@@ -752,13 +752,15 @@ def LUI : RVInstU<OPC_LUI, (outs GPR:$rd), (ins uimm20_lui:$imm20),
def AUIPC : RVInstU<OPC_AUIPC, (outs GPR:$rd), (ins uimm20_auipc:$imm20),
"auipc", "$rd, $imm20">, Sched<[WriteIALU]>;
-def JAL : RVInstJ<OPC_JAL, (outs GPR:$rd), (ins simm21_lsb0_jal:$imm20),
- "jal", "$rd, $imm20">, Sched<[WriteJal]>;
+ let isCall = 1 in {
----------------
topperc wrote:
Both of these instructions are not a call if the destination is X0. The RET pseudoinstruciton for example is JALR with rd=x0 and rs1=x0.
https://github.com/llvm/llvm-project/pull/161105
More information about the llvm-commits
mailing list