[PATCH] D77267: Clean up usages of asserting vector getters in Type
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 3 11:53:41 PDT 2020
efriedma accepted this revision.
efriedma added a comment.
LGTM with one minor suggestion.
================
Comment at: llvm/lib/Target/Hexagon/HexagonISelLowering.cpp:1090
if (auto *CV = dyn_cast<ConstantVector>(CPN->getConstVal())) {
- if (CV->getType()->getVectorElementType()->isIntegerTy(1)) {
+ if (cast<VectorType>(CV->getType())->getElementType()->isIntegerTy(1)) {
IRBuilder<> IRB(CV->getContext());
----------------
ConstantVector::getType() actually returns a VectorType; the cast<> isn't necessary.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77267/new/
https://reviews.llvm.org/D77267
More information about the llvm-commits
mailing list