[CodeGen] Fix wrong use of getVectorNumElements() in DAGTypeLegalizer::SplitVecRes_Ex...
authorDavid Sherwood <david.sherwood@arm.com>
Fri, 3 Jul 2020 12:32:02 +0000 (13:32 +0100)
committerDavid Sherwood <david.sherwood@arm.com>
Wed, 8 Jul 2020 08:53:20 +0000 (09:53 +0100)
commit9e66e9c30a19dc5923c85d3a3a4b757935299fba
tree63d316c1c11b97f42f3591b98e3a81d480098bb9
parent5b14f5051f134d29f51b523e5c9b602c08a4a7af
[CodeGen] Fix wrong use of getVectorNumElements() in DAGTypeLegalizer::SplitVecRes_ExtendOp

In DAGTypeLegalizer::SplitVecRes_ExtendOp I have replaced an invalid
call to getVectorNumElements() with a call to getVectorMinNumElements(),
since the code path works for both fixed and scalable vectors.

This fixes up a warning in the following test:

  sve-sext-zext.ll

Differential Revision: https://reviews.llvm.org/D83197
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp