[PATCH] D133829: [RISCV] Add cost model for insertelement/extractelement of vector type that should be splitted.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 24 23:42:22 PDT 2022


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp:818
+      EltCnt.getKnownMinValue()) {
+    // If the vector is fixed length or the index is konwn at the first splitted
+    // vector, we could also use the cost of insertelement/extractelement.
----------------
konwn -> known


================
Comment at: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp:819
+    // If the vector is fixed length or the index is konwn at the first splitted
+    // vector, we could also use the cost of insertelement/extractelement.
+    if (!(LT.second.isFixedLengthVector() ||
----------------
could -> can


================
Comment at: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp:842
+                          /*AddressSpace=*/0, TTI::TCK_RecipThroughput);
+      auto ReLoadCost =
+          getMemoryOpCost(Instruction::Load, Val, DL.getABITypeAlign(Val),
----------------
ReLoad -> Reload


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133829



More information about the llvm-commits mailing list