From f1a04edb4277ea85e854a4c291f28ef2f8fecfcd 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. llvm-svn: 120912 --- llvm/lib/Support/APInt.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'llvm/lib/Support/APInt.cpp') diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp index 9d8f8be1277..e7ff15cadb8 100644 --- a/llvm/lib/Support/APInt.cpp +++ b/llvm/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