1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

[MathExtras] Remove unnecessary cast of a constant 1 in a subtract.

Pretty sure this will automatically promoted to match the type of the other operand of the subtract. There's plenty of other similar code around here without this cast.

llvm-svn: 309653
This commit is contained in:
Craig Topper 2017-08-01 04:18:34 +00:00
parent 71cfb62124
commit a53dfb3621

View File

@ -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.