[PATCH] D124961: [riscv] Use X0 for destination of VSETVLI instruction if result unused

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 4 14:54:48 PDT 2022


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp:1222
+          Register VRegDef = MI.getOperand(0).getReg();
+          if (VRegDef != RISCV::X0 && MRI->use_empty(VRegDef))
+            MI.getOperand(0).setReg(RISCV::X0);
----------------
This should maybe be `use_nodbg_empty`.


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

https://reviews.llvm.org/D124961



More information about the llvm-commits mailing list