[PATCH] D150133: [RISCV] Support constant immediate for la pseudo instruction

garvit gupta via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 22 22:06:50 PDT 2023


garvitgupta08 marked 3 inline comments as done.
garvitgupta08 added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfo.td:1615
+    isCodeGenOnly = 0, isAsmParserOnly = 1 in
+def PseudoLAImm : Pseudo<(outs GPR:$rd), (ins ixlenimm_la:$imm), [],
+                      "la", "$rd, $imm">;
----------------
jrtc27 wrote:
> Why can't we just reuse ixlenimm_li?
Because the DiagnosticType in class ImmXLenAsmOperand is !strconcat("Invalid", Name), and since the error message for li and la is different (because la supports both symbol and constant immediate) therefore I had to create a new ixlenimm_la type to support that.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150133



More information about the llvm-commits mailing list