[PATCH] D147609: [RISCV] Use non-strided load if VL=1 for optimized zero stride loads

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 5 09:57:46 PDT 2023


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp:2088
 
-    SDValue Operands[] = {Ld->getBasePtr(),
-                          CurDAG->getRegister(RISCV::X0, XLenVT), VL, SEW,
-                          Ld->getChain()};
+    bool IsStrided = true;
+    // If VL=1, then we don't need to do a strided load and can just do a
----------------
Does this simplify to `bool IsStrided = !isOneConstant(VL)`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147609



More information about the llvm-commits mailing list