From 33733c0342c91fef596ee6e3a99164c6790ebeca Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Thu, 13 Aug 2009 06:24:02 +0000 Subject: [PATCH] Fix the N>=64 case in the isInt<> and isUint<> templates. llvm-svn: 78899 --- llvm/include/llvm/Support/MathExtras.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/include/llvm/Support/MathExtras.h b/llvm/include/llvm/Support/MathExtras.h index 15a67e402991..7ba5d8661ccc 100644 --- a/llvm/include/llvm/Support/MathExtras.h +++ b/llvm/include/llvm/Support/MathExtras.h @@ -54,12 +54,12 @@ inline bool isUInt32(int64_t Value) { template inline bool isInt(int64_t x) { - return -(INT64_C(1)<<(N-1)) <= x && x < (INT64_C(1)<<(N-1)); + return N >= 64 || (-(INT64_C(1)<<(N-1)) <= x && x < (INT64_C(1)<<(N-1))); } template inline bool isUint(uint64_t x) { - return x < (UINT64_C(1)<= 64 || x < (UINT64_C(1)<