mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
APInt: Simplify code.
No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160929 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e8b4a4a9d1
commit
a77b95a316
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user