[llvm-commits] CVS: llvm/lib/VMCore/Type.cpp

Chris Lattner clattner at apple.com
Wed Jan 17 22:19:45 PST 2007


> +bool IntegerType::isPowerOf2ByteWidth() const {
> +  unsigned BitWidth = getBitWidth();
> +  return (BitWidth > 7 && Log2_32(BitWidth) == Log2_32_Ceil 
> (BitWidth));
> +}
> +

Please use the isPowerOf2_32 function or use ((BitWidth-1) &  
BitWidth) == 0 instead of two Log2_32 calls.

Thanks,

-Chris



More information about the llvm-commits mailing list