forked from OSchip/llvm-project
Clean up usages of asserting vector getters in Type
Summary: Remove usages of asserting vector getters in Type in preparation for the VectorType refactor. The existence of these functions complicates the refactor while adding little value. Reviewers: kparzysz, sdesmalen, efriedma Reviewed By: kparzysz Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77267
This commit is contained in:
parent
0c0831f74b
commit
b600809688
|
@ -1087,7 +1087,7 @@ HexagonTargetLowering::LowerConstantPool(SDValue Op, SelectionDAG &DAG) const {
|
|||
Constant *CVal = nullptr;
|
||||
bool isVTi1Type = false;
|
||||
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());
|
||||
SmallVector<Constant*, 128> NewConst;
|
||||
unsigned VecLen = CV->getNumOperands();
|
||||
|
|
|
@ -60,8 +60,8 @@ bool HexagonTTIImpl::isTypeForHVX(Type *VecTy) const {
|
|||
}
|
||||
|
||||
unsigned HexagonTTIImpl::getTypeNumElements(Type *Ty) const {
|
||||
if (Ty->isVectorTy())
|
||||
return Ty->getVectorNumElements();
|
||||
if (auto *VTy = dyn_cast<VectorType>(Ty))
|
||||
return VTy->getNumElements();
|
||||
assert((Ty->isIntegerTy() || Ty->isFloatingPointTy()) &&
|
||||
"Expecting scalar type");
|
||||
return 1;
|
||||
|
|
Loading…
Reference in New Issue