[PATCH] D154183: [LoongArch] Add definition for LSX instructions

WÁNG Xuěruì via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 29 22:19:37 PDT 2023


xen0n added inline comments.


================
Comment at: llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchMCCodeEmitter.cpp:274
 
+void LoongArchMCCodeEmitter::expandToLDI(const MCInst &MI,
+                                         SmallVectorImpl<char> &CB,
----------------
This may have to become generic when we add `xvldi` later, so I'd recommend adding a template argument for substituting the `LoongArch::VLDI` at call site. Doing so will also let the name make sense because there isn't a `ldi` per se. (You may also name this `expandToVectorLDI` or `expandVectorREPLI` instead for maximum clarity.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154183



More information about the llvm-commits mailing list