[PATCH] D83195: [CodeGen] Fix a warning in DAGTypeLegalizer::PromoteIntRes_EXTRACT_SUBVECTOR
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 6 12:53:24 PDT 2020
david-arm created this revision.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a reviewer: rengolin.
Herald added a project: LLVM.
Fixes up one warning in this test:
sve-sext-zext.ll
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D83195
Files:
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
Index: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
@@ -4334,7 +4334,6 @@
EVT OutVT = N->getValueType(0);
EVT NOutVT = TLI.getTypeToTransformTo(*DAG.getContext(), OutVT);
assert(NOutVT.isVector() && "This type must be promoted to a vector type");
- unsigned OutNumElems = OutVT.getVectorNumElements();
EVT NOutVTElem = NOutVT.getVectorElementType();
SDLoc dl(N);
@@ -4371,6 +4370,7 @@
EVT InVT = InOp0.getValueType();
+ unsigned OutNumElems = OutVT.getVectorNumElements();
SmallVector<SDValue, 8> Ops;
Ops.reserve(OutNumElems);
for (unsigned i = 0; i != OutNumElems; ++i) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83195.275602.patch
Type: text/x-patch
Size: 805 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200706/38b18975/attachment.bin>
More information about the llvm-commits
mailing list