[CodeGen] Fix warnings in getVectorElementCount()
authorDavid Sherwood <david.sherwood@arm.com>
Tue, 16 Jun 2020 11:18:00 +0000 (12:18 +0100)
committerDavid Sherwood <david.sherwood@arm.com>
Thu, 18 Jun 2020 06:51:11 +0000 (07:51 +0100)
commit3ffb44b4481fe7bfaed67fe3e592908b9b4ad628
tree065843dbc746dc1db67695624b359365726d30f6
parentfb495c31701b2cd697cf4282f63764c9cefd49c0
[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
llvm/include/llvm/CodeGen/ValueTypes.h