[PATCH] D91532: [NFC][CostModel]Extend class IntrinsicCostAttributes to use ElementCount Type

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 30 03:25:27 PST 2020


david-arm accepted this revision.
david-arm added a comment.
This revision is now accepted and ready to land.

- nit: Can you fix up the formatting issue before merging? Thanks!



================
Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1271
+    if (VF.isVector() && !RetTy->isVoidTy())
+      RetTy = FixedVectorType::get(RetTy, VF.getKnownMinValue());
 
----------------
sdesmalen wrote:
> This can use VectorType.
Hi @CarolineConcatto FWIW I think @sdesmalen is right here and you can use VectorType::get and pass in the element count directly. I think this still counts as NFC because the ElementCount will always be for a fixed vector type anyway due to how the ElementCount is created above. However, I think it's fine to leave it like this, since you're fixing this up in a later patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91532



More information about the llvm-commits mailing list