summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/Support/MathExtras.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/include/llvm/Support/MathExtras.h b/llvm/include/llvm/Support/MathExtras.h
index fd29865c847..db01e99334a 100644
--- a/llvm/include/llvm/Support/MathExtras.h
+++ b/llvm/include/llvm/Support/MathExtras.h
@@ -424,7 +424,7 @@ constexpr inline bool isPowerOf2_32(uint32_t Value) {
/// Return true if the argument is a power of two > 0 (64 bit edition.)
constexpr inline bool isPowerOf2_64(uint64_t Value) {
- return Value && !(Value & (Value - int64_t(1L)));
+ return Value && !(Value & (Value - 1));
}
/// Return a byte-swapped representation of the 16-bit argument.
OpenPOWER on IntegriCloud