[PATCH] D92094: [CostModel]Replace FixedVectorType by VectorType in costgetIntrinsicInstrCost

Caroline via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 3 03:15:21 PST 2020


CarolineConcatto added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1331
     if (VF.isVector() && !RetTy->isVoidTy())
-      RetTy = FixedVectorType::get(RetTy, VF.getKnownMinValue());
+      RetTy = VectorType::get(RetTy, VF);
 
----------------
sdesmalen wrote:
> This should still use `FixedVectorType` 
Thank you @sdesmalen. I've missed that.


================
Comment at: llvm/test/Analysis/CostModel/AArch64/sve-getIntrinsicInstrCost-cctz-ctlz.ll:14
+; CHECK-LABEL: 'ctlz_nxv4i32'
+; CHECK-NEXT: Cost Model: Found an estimated cost of {{[0-9]+}} for instruction:
+; CHECK-NETX: Cost Model: Found an estimated cost of {{[0-9]+}} for instruction:
----------------
sdesmalen wrote:
> even though the cost doesn't directly matter much, it may be useful to just fill in the value it uses currently, so that when we improve the cost-model for scalable vectors, we can see the changes we make.
Fair enough! I've added the values.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92094



More information about the llvm-commits mailing list