mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Replace XOR/ISZERO with EQ
This commit is contained in:
parent
25160bfc26
commit
b8bba66220
@ -288,6 +288,10 @@ Rules::Rules()
|
|||||||
{Instruction::ISZERO, {{Instruction::ISZERO, {{Instruction::ISZERO, {X}}}}}},
|
{Instruction::ISZERO, {{Instruction::ISZERO, {{Instruction::ISZERO, {X}}}}}},
|
||||||
[=]() -> Pattern { return {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
|
// Associative operations
|
||||||
for (auto const& opFun: vector<pair<Instruction,function<u256(u256 const&,u256 const&)>>>{
|
for (auto const& opFun: vector<pair<Instruction,function<u256(u256 const&,u256 const&)>>>{
|
||||||
{Instruction::ADD, plus<u256>()},
|
{Instruction::ADD, plus<u256>()},
|
||||||
|
Loading…
Reference in New Issue
Block a user