[PATCH] D130895: [RISCV] Make VL choosing for a splat-like VMV based on its users

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 22 11:49:18 PDT 2022


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp:1814
+    // Try to shrink VL for a splat-like move.
+    if (Opcode == RISCVISD::VMV_V_X_VL || Opcode == RISCVISD::VFMV_V_F_VL) {
+      SDNode *UpdatedNode = tryShrinkVLForVMV(Node);
----------------
asi-sc wrote:
> reames wrote:
> > We will need to extend this for splats of constants eventually.  
> Aren't splats already processed in RISCVDAGToDAGISel::PreprocessISelDAG ? Honestly, I thought that ISD:SPLAT_VECTOR here is a legacy that we can remove.
I wonder if @reames was noticing that it said V_X_VL and did not include V_I_VL which doesn't exist. Before isel all integer scalar use V_X_VL. Isel checks the size of the immediate and uses vmv.v.i or li+vmv.v.x.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130895



More information about the llvm-commits mailing list