[PATCH] D77273: 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 17:53:46 PDT 2020
efriedma added inline comments.
================
Comment at: llvm/lib/Analysis/ConstantFolding.cpp:156
+ auto *CVTy = cast<VectorType>(C->getType());
+
----------------
Given there are three "cast<>"s and three uses, the variable probably isn't worth it.
================
Comment at: llvm/lib/Analysis/TargetTransformInfo.cpp:877
- SmallVector<int, 32> Mask(SI->getType()->getVectorNumElements(), -1);
+ SmallVector<int, 32> Mask(cast<VectorType>(SI->getType())->getNumElements(),
+ -1);
----------------
Unnecessary cast<>
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77273/new/
https://reviews.llvm.org/D77273
More information about the llvm-commits
mailing list