APInt: Simplify code.

No functionality change.

llvm-svn: 160929
This commit is contained in:
Benjamin Kramer 2012-07-29 12:33:29 +00:00
parent e0d6e8427a
commit ef2932125d
1 changed files with 1 additions and 7 deletions

View File

@ -357,13 +357,7 @@ public:
/// @brief Check if this APInt has an N-bits unsigned integer value.
bool isIntN(unsigned N) const {
assert(N && "N == 0 ???");
if (N >= getBitWidth())
return true;
if (isSingleWord())
return isUIntN(N, VAL);
return APInt(N, makeArrayRef(pVal, getNumWords())).zext(getBitWidth())
== (*this);
return getActiveBits() <= N;
}
/// @brief Check if this APInt has an N-bits signed integer value.