mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +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…
Reference in New Issue
Block a user