[SVE] Remove calls to VectorType::getNumElements from AggressiveInstCombine

Reviewed By: fpetrogalli

Differential Revision: https://reviews.llvm.org/D82218
This commit is contained in:
Christopher Tetreault 2020-08-14 15:54:16 -07:00
parent 02197f7e50
commit 416a6a85b1
1 changed files with 2 additions and 1 deletions

View File

@ -291,7 +291,8 @@ static Type *getReducedType(Value *V, Type *Ty) {
assert(Ty && !Ty->isVectorTy() && "Expect Scalar Type");
if (auto *VTy = dyn_cast<VectorType>(V->getType())) {
// FIXME: should this handle scalable vectors?
return FixedVectorType::get(Ty, VTy->getNumElements());
return FixedVectorType::get(Ty,
cast<FixedVectorType>(VTy)->getNumElements());
}
return Ty;
}