projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ddde0a
)
Don't attempt to mask no bits
author
Neil Booth
<neil@daikokuya.co.uk>
Fri, 12 Oct 2007 15:31:31 +0000
(15:31 +0000)
committer
Neil Booth
<neil@daikokuya.co.uk>
Fri, 12 Oct 2007 15:31:31 +0000
(15:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42909
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Support/APInt.cpp
patch
|
blob
|
history
diff --git
a/lib/Support/APInt.cpp
b/lib/Support/APInt.cpp
index 2e537d66da7f49ce88613a97cda5569a46e32620..c5abf4bf1634d86b9217addf2716c13875092394 100644
(file)
--- 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. */