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:
d80fb8b
)
getMinSignedBits needs to take into consider the sign bit when the value is positive.
author
Chris Lattner
<sabre@nondot.org>
Wed, 29 Aug 2007 16:21:18 +0000
(16:21 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Wed, 29 Aug 2007 16:21:18 +0000
(16:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41566
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ADT/APInt.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/APInt.h
b/include/llvm/ADT/APInt.h
index 0102d67e07e61f50b5e3e8c9844e93a9be4b180a..9a5643bfc5e1bf4b5b50d59f7a215d4c371550a9 100644
(file)
--- a/
include/llvm/ADT/APInt.h
+++ b/
include/llvm/ADT/APInt.h
@@
-856,7
+856,7
@@
public:
inline uint32_t getMinSignedBits() const {
if (isNegative())
return BitWidth - countLeadingOnes() + 1;
- return getActiveBits();
+ return getActiveBits()
+1
;
}
/// This method attempts to return the value of this APInt as a zero extended