[PATCH] D133829: [RISCV] Add cost model for insertelement/extractelement of vector type that should be splitted.
    Jianjian Guan via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Oct 26 04:48:34 PDT 2022
    
    
  
jacquesguan 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.
----------------
craig.topper wrote:
> konwn -> known
Done.
================
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() ||
----------------
craig.topper wrote:
> could -> can
Done.
================
Comment at: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp:842
+                          /*AddressSpace=*/0, TTI::TCK_RecipThroughput);
+      auto ReLoadCost =
+          getMemoryOpCost(Instruction::Load, Val, DL.getABITypeAlign(Val),
----------------
craig.topper wrote:
> ReLoad -> Reload
Done.
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