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

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 16 10:55:36 PDT 2022


reames 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:
> 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.
I'm going to take a closer look at this separately, and probably post a patch removing the copy handling.  


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