Use a cheaper computation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33336 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2007-01-18 18:14:49 +00:00
parent 8205972a5a
commit b5f378e11b

View File

@ -977,7 +977,7 @@ const IntegerType *IntegerType::get(unsigned NumBits) {
bool IntegerType::isPowerOf2ByteWidth() const {
unsigned BitWidth = getBitWidth();
return (BitWidth > 7 && Log2_32(BitWidth) == Log2_32_Ceil(BitWidth));
return (BitWidth > 7) && isPowerOf2_32(BitWidth);
}
// FunctionValType - Define a class to hold the key that goes into the TypeMap