forked from OSchip/llvm-project
[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
This commit is contained in:
parent
5b14f5051f
commit
9e66e9c30a
|
@ -1778,8 +1778,7 @@ void DAGTypeLegalizer::SplitVecRes_ExtendOp(SDNode *N, SDValue &Lo,
|
|||
// more effectively move in the right direction and prevent falling down
|
||||
// to scalarization in many cases due to the input vector being split too
|
||||
// far.
|
||||
unsigned NumElements = SrcVT.getVectorNumElements();
|
||||
if ((NumElements & 1) == 0 &&
|
||||
if ((SrcVT.getVectorMinNumElements() & 1) == 0 &&
|
||||
SrcVT.getSizeInBits() * 2 < DestVT.getSizeInBits()) {
|
||||
LLVMContext &Ctx = *DAG.getContext();
|
||||
EVT NewSrcVT = SrcVT.widenIntegerVectorElementType(Ctx);
|
||||
|
|
Loading…
Reference in New Issue