[PATCH] D125323: [RISCV] Add the passthru operand for RVV unmasked segment load IR intrinsics.

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 10 17:59:36 PDT 2022


craig.topper added inline comments.


================
Comment at: clang/include/clang/Basic/riscv_vector.td:879
+      // intrinsic: (passthru0, passthru1, ..., ptr, vl)
+      SmallVector<llvm::Value*, 12> Operands;
+      for (unsigned I = 0; I < NF; ++I)
----------------
Why 12? NF is at most 8 right? And then 2 additional operands?


================
Comment at: llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp:314
 
+static bool IsAllUndef(ArrayRef<SDValue> Values) {
+  for (auto &Value : Values) {
----------------
IsAllUndef -> isAllUndef


================
Comment at: llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp:315
+static bool IsAllUndef(ArrayRef<SDValue> Values) {
+  for (auto &Value : Values) {
+    if (!Value->isUndef())
----------------
return llvm::all_of(Value, [](SDValue V) { return V->isUndef(); });


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:4920
     SDVTList VTs = DAG.getVTList(ContainerVTs);
+    SmallVector<SDValue, 9> Ops = {Load->getChain(), IntID};
+    Ops.insert(Ops.end(), NF, DAG.getUNDEF(ContainerVT));
----------------
9 seems too low. Should be 12?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125323



More information about the cfe-commits mailing list