[CodeGen] Fix warnings in getVectorElementCount()

In EVT::getVectorElementCount() when the type is not simple we
should return getExtendedVectorElementCount() from the function
instead of constructing the ElementCount object manually.

I discovered this warning in an existing test:

  test/CodeGen/AArch64/sve-intrinsics-loads.ll

Differential Revision: https://reviews.llvm.org/D81927
This commit is contained in:
David Sherwood 2020-06-16 12:18:00 +01:00
parent fb495c3170
commit 3ffb44b448
1 changed files with 1 additions and 1 deletions

View File

@ -299,7 +299,7 @@ namespace llvm {
if (isSimple())
return V.getVectorElementCount();
return {getExtendedVectorNumElements(), isExtendedScalableVector()};
return getExtendedVectorElementCount();
}
/// Given a vector type, return the minimum number of elements it contains.