mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-03 17:24:24 +00:00
getMinSignedBits needs to take into consider the sign bit when the value is positive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41566 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d80fb8b366
commit
cd3c4cac6e
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user