mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-16 11:30:51 +00:00
Make isOneBitSet faster by using APInt::isPowerOf2. Thanks Chris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35194 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8cf47cef5c
commit
5f6a89562d
@ -3472,7 +3472,7 @@ static bool isMinValuePlusOne(const ConstantInt *C, bool isSigned) {
|
||||
// isOneBitSet - Return true if there is exactly one bit set in the specified
|
||||
// constant.
|
||||
static bool isOneBitSet(const ConstantInt *CI) {
|
||||
return CI->getValue().countPopulation() == 1;
|
||||
return CI->getValue().isPowerOf2();
|
||||
}
|
||||
|
||||
#if 0 // Currently unused
|
||||
|
Loading…
Reference in New Issue
Block a user