Don't attempt to mask no bits

llvm-svn: 42909
This commit is contained in:
Neil Booth 2007-10-12 15:31:31 +00:00
parent dc35bd79ca
commit 7e74b17ad2
1 changed files with 2 additions and 1 deletions

View File

@ -2212,6 +2212,7 @@ APInt::tcExtract(integerPart *dst, unsigned int dstCount, const integerPart *src
dst[dstParts - 1] |= ((src[firstSrcPart + dstParts] & mask)
<< n % integerPartWidth);
} else if (n > srcBits) {
if (srcBits % integerPartWidth)
dst[dstParts - 1] &= lowBitMask (srcBits % integerPartWidth);
}