[PATCH] D125812: [RISCV] Canonicalize AVL=setvli to AVL=Imm or AVL=VLMAX

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 17 11:11:42 PDT 2022


reames added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp:1265
+              VSETVLIInfo DefInfo = getInfoForVSETVLI(*DefMI);
+              if (DefInfo.hasSameVTYPE(Require) &&
+                  (DefInfo.hasAVLImm() || DefInfo.getAVLReg() == RISCV::X0)) {
----------------
reames wrote:
> craig.topper wrote:
> > craig.topper wrote:
> > > Can this be hasSameVLMAX instead of hasSameVTYPE?
> > Oh I guess that's what the TODO in the comment was. Is there any reason to not do that now?
> Is HasSameVLMAX the same as "for all AVL, produce the same VL"?  
> 
> It seems like maybe it is, but I hadn't fully recognized that if so.  Probably needs a comment/name update.  
If it is the same, I see at least three other places in code we can generalize.  With your permission, I'll do that in a separate change.  


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125812



More information about the llvm-commits mailing list