[PATCH] D131551: [RISCV] Fold scalable binary integer vector op and vector select op to RVV VL Op.

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 12 19:54:45 PDT 2022


jrtc27 added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:8314
+  unsigned RISCVVLISDOpc;
+  int64_t Imm;
+
----------------
Imm isn't that clear, this is really the identity


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:8357
+    return V;
+
   if (SDValue V = transformAddImmMulImm(N, DAG, Subtarget))
----------------
Why the blank line when the others don't have one?


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:8317
+  switch (N->getOpcode()) {
+  case ISD::ADD:
+    RISCVVLISDOpc = RISCVISD::ADD_VL;
----------------
jacquesguan wrote:
> StephenFan wrote:
> > Is it possible to use a macro definition to reduce code lines?
> Done.
Undefine helper macros like this once you're done with them


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131551



More information about the llvm-commits mailing list