diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp --- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp @@ -68,6 +68,7 @@ // inference will apply to each mode separately. TypeSetByHwMode::TypeSetByHwMode(ArrayRef VTList) { + AddrSpaces.reserve(VTList.size()); for (const ValueTypeByHwMode &VVT : VTList) { insert(VVT); AddrSpaces.push_back(VVT.PtrAddrSpace);