[PATCH] D154183: [LoongArch] Add definition for LSX instructions
wanglei via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 29 22:39:37 PDT 2023
wangleiat added inline comments.
================
Comment at: llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchMCCodeEmitter.cpp:274
+void LoongArchMCCodeEmitter::expandToLDI(const MCInst &MI,
+ SmallVectorImpl<char> &CB,
----------------
xen0n wrote:
> 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.)
> 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.)
Thank you very much for your feedback and great suggestions. I will make the necessary changes right away.
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