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 a75e4a62e6
commit 39cc673e61

View File

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