[PATCH] D127205: [LoongArch 5/n] Use register R0 (ZERO) for constant 0

Lu Weining via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 9 02:10:28 PDT 2022


SixWeining added inline comments.


================
Comment at: llvm/lib/Target/LoongArch/LoongArchISelDAGToDAG.cpp:35
   SDLoc DL(Node);
+  MVT VT = Node->getSimpleValueType(0);
 
----------------
myhsu wrote:
> nit: is this variable used in any other place? could we either put it in the inner local scope or spell it out in-place?
Thanks. Currently this variable is only used once but will be used in ohter place later. Let me spell it out in-place.


================
Comment at: llvm/test/CodeGen/LoongArch/imm.ll:159
+
+define i64 @imm0() {
+; CHECK-LABEL: imm0:
----------------
MaskRay wrote:
> Usually simple tests are placed before complex ones.
Yes, I agree. Let me make it be the first one of this file. Thanks.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127205



More information about the llvm-commits mailing list