From: Craig Topper Date: Sun, 19 Jun 2016 15:37:30 +0000 (+0000) Subject: [X86] Use SmallVector::assign instead of resize to ensure we really start with a... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=06be9d5f0873d3b3aab15af3f50f3389f69a67fd;p=llvm [X86] Use SmallVector::assign instead of resize to ensure we really start with a vector of all -1s. Otherwise we're trusting the caller to pass the right thing. This should be no functional change with current code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273113 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 623ba20ecef..bebfbf28535 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -7065,7 +7065,7 @@ static bool is128BitLaneRepeatedShuffleMask(MVT VT, ArrayRef Mask, SmallVectorImpl &RepeatedMask) { int LaneSize = 128 / VT.getScalarSizeInBits(); - RepeatedMask.resize(LaneSize, -1); + RepeatedMask.assign(LaneSize, -1); int Size = Mask.size(); for (int i = 0; i < Size; ++i) { if (Mask[i] < 0)