diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2016-11-09 10:22:54 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2016-11-30 19:16:43 +0800 |
commit | b8bba6622013a6c0969392a4096a3a7384b8cf62 (patch) | |
tree | ec6a385e75de8f701af6ed5b2b68bc038a11a06c | |
parent | 25160bfc26cd5ae4b5104625caba41c1533614ba (diff) | |
download | dexon-solidity-b8bba6622013a6c0969392a4096a3a7384b8cf62.tar.gz dexon-solidity-b8bba6622013a6c0969392a4096a3a7384b8cf62.tar.zst dexon-solidity-b8bba6622013a6c0969392a4096a3a7384b8cf62.zip |
Replace XOR/ISZERO with EQ
-rw-r--r-- | libevmasm/ExpressionClasses.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libevmasm/ExpressionClasses.cpp b/libevmasm/ExpressionClasses.cpp index cb327252..29fb6dbc 100644 --- a/libevmasm/ExpressionClasses.cpp +++ b/libevmasm/ExpressionClasses.cpp @@ -288,6 +288,10 @@ Rules::Rules() {Instruction::ISZERO, {{Instruction::ISZERO, {{Instruction::ISZERO, {X}}}}}}, [=]() -> Pattern { return {Instruction::ISZERO, {X}}; } }); + m_rules.push_back({ + {Instruction::ISZERO, {{Instruction::XOR, {X, Y}}}}, + [=]() -> Pattern { return { Instruction::EQ, {X, Y} }; } + }); // Associative operations for (auto const& opFun: vector<pair<Instruction,function<u256(u256 const&,u256 const&)>>>{ {Instruction::ADD, plus<u256>()}, |