summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ef4e0ad)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249951
91177308-0d34-0410-b5e6-
96231b3b80d8
/// isUIntN - Checks if an unsigned integer fits into the given (dynamic)
/// bit width.
inline bool isUIntN(unsigned N, uint64_t x) {
/// isUIntN - Checks if an unsigned integer fits into the given (dynamic)
/// bit width.
inline bool isUIntN(unsigned N, uint64_t x) {
- return x == (x & (~0ULL >> (64 - N)));
+ return N >= 64 || x < (UINT64_C(1)<<(N));
}
/// isIntN - Checks if an signed integer fits into the given (dynamic)
}
/// isIntN - Checks if an signed integer fits into the given (dynamic)