llvm.org GIT mirror llvm / d4c00c0
Fix the N>=64 case in the isInt<> and isUint<> templates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78899 91177308-0d34-0410-b5e6-96231b3b80d8 Jakob Stoklund Olesen 10 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
5353
5454 template
5555 inline bool isInt(int64_t x) {
56 return -(INT64_C(1)<<(N-1)) <= x && x < (INT64_C(1)<<(N-1));
56 return N >= 64 || (-(INT64_C(1)<<(N-1)) <= x && x < (INT64_C(1)<<(N-1)));
5757 }
5858
5959 template
6060 inline bool isUint(uint64_t x) {
61 return x < (UINT64_C(1)<
61 return N >= 64 || x < (UINT64_C(1)<
6262 }
6363
6464 /// isMask_32 - This function returns true if the argument is a sequence of ones