[PATCH] D77264: Clean up usages of asserting vector getters in Type

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 13 10:45:02 PDT 2020


RKSimon added inline comments.


================
Comment at: llvm/lib/Target/X86/X86TargetTransformInfo.cpp:2760
+  // following. In practice, can this actually happen?
+  auto *ValVTy = dyn_cast<VectorType>(ValTy);
+
----------------
ctetreau wrote:
> efriedma wrote:
> > The type has to be a vector: it's the type of a vector reduction operation.  You can just cast<> here.
> > 
> > It would probably be worth going through at some point and making the various TTI cost hooks that require a vector take a VectorType instead of a Type.  But that's out of scope here, of course.
> That is the endgame that I'm hoping for, but probably not something I can personally justify doing on the company's dime.
In which case, please can you raise a bug listing the functions that need changing to VectorType?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77264





More information about the llvm-commits mailing list