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

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 9 21:13:16 PDT 2020


efriedma added inline comments.


================
Comment at: clang/lib/CodeGen/PatternInit.cpp:60
     unsigned BitWidth = llvm::APFloat::semanticsSizeInBits(
-        (Ty->isVectorTy() ? Ty->getVectorElementType() : Ty)
+        (Ty->isVectorTy() ? cast<llvm::VectorType>(Ty)->getElementType() : Ty)
             ->getFltSemantics());
----------------
It would make sense to fix this to use getScalarType().


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77257





More information about the cfe-commits mailing list