[CodeGen] Replace calls to getVectorNumElements() in DAGTypeLegalizer::SetSplitVector

In DAGTypeLegalizer::SetSplitVector I have changed calls in the assert
from getVectorNumElements() to getVectorElementCount(), since this
code path works for both fixed and scalable vectors.

This fixes up one warning in the test:

  sve-sext-zext.ll

Differential Revision: https://reviews.llvm.org/D83196
This commit is contained in:
David Sherwood 2020-07-03 13:27:21 +01:00
parent 043eaa9a4a
commit da731894a2
1 changed files with 3 additions and 3 deletions

View File

@ -835,9 +835,9 @@ void DAGTypeLegalizer::GetSplitVector(SDValue Op, SDValue &Lo,
void DAGTypeLegalizer::SetSplitVector(SDValue Op, SDValue Lo,
SDValue Hi) {
assert(Lo.getValueType().getVectorElementType() ==
Op.getValueType().getVectorElementType() &&
2*Lo.getValueType().getVectorNumElements() ==
Op.getValueType().getVectorNumElements() &&
Op.getValueType().getVectorElementType() &&
Lo.getValueType().getVectorElementCount() * 2 ==
Op.getValueType().getVectorElementCount() &&
Hi.getValueType() == Lo.getValueType() &&
"Invalid type for split vector");
// Lo/Hi may have been newly allocated, if so, add nodeid's as relevant.