diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2010-12-04 18:05:36 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2010-12-04 18:05:36 +0000 |
commit | fd6d53fbad9d3f48da4910ebba12d9d2a3c24bd8 (patch) | |
tree | 63458a991f69ce7f68167890448f32f89d8888ad /lib/Support/APInt.cpp | |
parent | bd7d2622a2ee828a02017dca19170b6f79ff6684 (diff) |
APInt: microoptimize a few methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120912 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/APInt.cpp')
-rw-r--r-- | lib/Support/APInt.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/Support/APInt.cpp b/lib/Support/APInt.cpp index 9d8f8be127..e7ff15cadb 100644 --- a/lib/Support/APInt.cpp +++ b/lib/Support/APInt.cpp @@ -759,10 +759,6 @@ APInt APInt::getLoBits(unsigned numBits) const { BitWidth - numBits); } -bool APInt::isPowerOf2() const { - return (!!*this) && !(*this & (*this - APInt(BitWidth,1))); -} - unsigned APInt::countLeadingZerosSlowCase() const { // Treat the most significand word differently because it might have // meaningless bits set beyond the precision. |