[PATCH] D127880: [RISCV] Avoid reducing etype just to initialize lane 0 of an undef vector

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 15 20:15:46 PDT 2022


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp:935
+       (CurInfo.hasZeroAVL() && Require.hasZeroAVL()))) {
+    auto *VRegDef = MRI->getVRegDef(MI.getOperand(1).getReg());
+    if (VRegDef && VRegDef->isImplicitDef() &&
----------------
craig.topper wrote:
> I wonder if we should call elideCopies here like we do when we look for implicit def for tail policy. 
Hmm it doesn't look like any existing lit tests need the elideCopies call in other location. So I'm not sure if that's still needed. It might be a left over from when we did vsetvli insertion right after SelectionDAG.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127880



More information about the llvm-commits mailing list