[PATCH] D119921: [RISCV] Teach VSETVLInsert to optimize vsetvli for ScalarMoveInstr

Chenbing.Zheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 17 18:03:47 PST 2022


Chenbing.Zheng added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp:1056
+          if (isScalarMoveInstr(MI))
+            ScalarMoveVSETVLI = MI.getPrevNode();
           CurInfo = NewInfo;
----------------
jacquesguan wrote:
> The scalar move instruction may share a VSETVLI with one or some other instruction.
In the case you said,the insertVSETVLI function will not be called. So ScalarMoveVSETVLI only be set if VSETVLI come from single ScalarMoveInstr.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119921



More information about the llvm-commits mailing list