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

Christopher Tetreault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 13 10:12:21 PDT 2020


ctetreau marked 2 inline comments as done.
ctetreau 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);
+
----------------
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.


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