[PATCH] D141834: [RISCV][NFC] Use uncompressInst to relax instructions

Kito Cheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 16 07:17:51 PST 2023


kito-cheng accepted this revision.
kito-cheng added a comment.
This revision is now accepted and ready to land.

LGTM with a nit, seems like it also improve the debug info (loc).



================
Comment at: llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp:182
   case RISCV::C_JAL:
-    // c.jal $imm -> jal X1, $imm.
-    Res.setOpcode(RISCV::JAL);
-    Res.addOperand(MCOperand::createReg(RISCV::X1));
-    Res.addOperand(Inst.getOperand(0));
+    uncompressInst(Res, Inst, MRI, STI);
     break;
----------------
nit: Assert check return value of uncompressInst.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141834/new/

https://reviews.llvm.org/D141834



More information about the llvm-commits mailing list