Use a cheaper computation.
authorReid Spencer <rspencer@reidspencer.com>
Thu, 18 Jan 2007 18:14:49 +0000 (18:14 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Thu, 18 Jan 2007 18:14:49 +0000 (18:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33336 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Type.cpp

index b41d1a0414e89975580fa76a5b799fec0a41769a..00c6d48dceb1eac4410bad3588dd38517ee31eb7 100644 (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