From: David Sherwood Date: Wed, 27 May 2020 09:36:25 +0000 (+0100) Subject: [CodeGen] Fix warnings in getZeroExtendInReg X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=4265f1d23cc9d10b9544bafc7a285ca5f143faea;p=android-x86%2Fexternal-llvm-project.git [CodeGen] Fix warnings in getZeroExtendInReg We should be using getVectorElementCount() to assert that two types have the same numbers of elements. I encountered the warnings while compiling this test: CodeGen/AArch64/sve-intrinsics-ld1.ll Differential Revision: https://reviews.llvm.org/D80616 --- diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 2f277eee849..bd1a5a4a876 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -1175,7 +1175,7 @@ SDValue SelectionDAG::getZeroExtendInReg(SDValue Op, const SDLoc &DL, EVT VT) { "getZeroExtendInReg type should be vector iff the operand " "type is vector!"); assert((!VT.isVector() || - VT.getVectorNumElements() == OpVT.getVectorNumElements()) && + VT.getVectorElementCount() == OpVT.getVectorElementCount()) && "Vector element counts must match in getZeroExtendInReg"); assert(VT.bitsLE(OpVT) && "Not extending!"); if (OpVT == VT)