[SVE] Remove invalid usage of VectorType::getNumElements in Function

Summary:
Removes usage of VectorType::getNumElements identified by test located
at CodeGen/aarch64-sve-intrinsics/acle_sve_dot.c. This code explicitly
converts a potentially fixed length vector to scalable vector by
constructing the ElementCount = {getNumElements(), true}

Reviewers: rengolin, efriedma, kmclaughlin, c-rhodes, sdesmalen

Reviewed By: efriedma

Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D78967
This commit is contained in:
Christopher Tetreault 2020-04-28 12:39:59 -07:00
parent 95e570725a
commit 2e214baed9
1 changed files with 2 additions and 2 deletions

View File

@ -1074,8 +1074,8 @@ static Type *DecodeFixedType(ArrayRef<Intrinsic::IITDescriptor> &Infos,
// Return the overloaded type (which determines the pointers address space)
return Tys[D.getOverloadArgNumber()];
case IITDescriptor::ScalableVecArgument: {
auto *Ty = cast<VectorType>(DecodeFixedType(Infos, Tys, Context));
return VectorType::get(Ty->getElementType(), {Ty->getNumElements(), true});
auto *Ty = cast<FixedVectorType>(DecodeFixedType(Infos, Tys, Context));
return ScalableVectorType::get(Ty->getElementType(), Ty->getNumElements());
}
}
llvm_unreachable("unhandled");