diff options
Diffstat (limited to 'lib/Support/APInt.cpp')
-rw-r--r-- | lib/Support/APInt.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Support/APInt.cpp b/lib/Support/APInt.cpp index 2e537d66da..c5abf4bf16 100644 --- a/lib/Support/APInt.cpp +++ b/lib/Support/APInt.cpp @@ -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. */ |