[PATCH] D101938: [RISCV] Initial version of a demand based vsetvli insertion pass.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 6 20:13:33 PDT 2021


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp:150
+  if (VLOp.isImm()) {
+    int64_t Imm = VLOp.getImm();
+
----------------
HsiangKai wrote:
> Should we check the range of immediate? vsetivli only has 5-bits immediate field.
I can assert it. It should have been checked by SelectionDAG when the instruction was created.


================
Comment at: llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp:202
+
+  // Clear the GPR, the we don't need it anymore
+  VLOp.setReg(RISCV::NoRegister);
----------------
HsiangKai wrote:
> Is 'the' redundant in the comment?
Yes. Thanks


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101938



More information about the llvm-commits mailing list