From fd6d53fbad9d3f48da4910ebba12d9d2a3c24bd8 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sat, 4 Dec 2010 18:05:36 +0000 Subject: APInt: microoptimize a few methods. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120912 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/APInt.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'lib/Support/APInt.cpp') 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. -- cgit v1.2.3-18-g5258