diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-07-29 12:33:29 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-07-29 12:33:29 +0000 |
commit | ef2932125d001095d19d9457ea6e1b0eb8aedc81 (patch) | |
tree | 058b007aa2c44335990d290ae5b01432554d222c /llvm | |
parent | e0d6e8427ab998863c044396ea7ff4291caac2bc (diff) | |
download | bcm5719-llvm-ef2932125d001095d19d9457ea6e1b0eb8aedc81.tar.gz bcm5719-llvm-ef2932125d001095d19d9457ea6e1b0eb8aedc81.zip |
APInt: Simplify code.
No functionality change.
llvm-svn: 160929
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/include/llvm/ADT/APInt.h | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/llvm/include/llvm/ADT/APInt.h b/llvm/include/llvm/ADT/APInt.h index 9498ef031dc..f30a6e3f081 100644 --- a/llvm/include/llvm/ADT/APInt.h +++ b/llvm/include/llvm/ADT/APInt.h @@ -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. |