Changelog entry.

This commit is contained in:
chriseth 2021-03-11 14:51:35 +01:00
parent baf2ff2a6e
commit d18db63843
2 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@ Language Features:
Compiler Features:
* Command Line Interface: Drop experimental support for ``--machine evm15``.
* Optimizer: Try to move ``and`` with constant inside ``or`` to improve storage writes of small types.
* Optimizer: Replace multiplications and divisions with powers of two by shifts.
Bugfixes:

View File

@ -60,7 +60,7 @@ template <class S> S shlWorkaround(S const& _x, unsigned _amount)
/// @returns k if _x == 2**k, nullopt otherwise
inline std::optional<size_t> binaryLogarithm(u256 const& _x)
{
if (!_x)
if (_x == 0)
return std::nullopt;
size_t msb = boost::multiprecision::msb(_x);
return (u256(1) << msb) == _x ? std::make_optional(msb) : std::nullopt;