mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Optimiser the PUSH 0, EQ case as ISZERO
This commit is contained in:
parent
3e13e59ff9
commit
6686ea6c03
@ -257,6 +257,7 @@ Rules::Rules()
|
||||
{{Instruction::MOD, {0, X}}, [=]{ return u256(0); }},
|
||||
{{Instruction::AND, {X, 0}}, [=]{ return u256(0); }},
|
||||
{{Instruction::OR, {X, ~u256(0)}}, [=]{ return ~u256(0); }},
|
||||
{{Instruction::EQ, {X, 0}}, [=]() -> Pattern { return {Instruction::ISZERO, {X}}; } },
|
||||
// operations involving an expression and itself
|
||||
{{Instruction::AND, {X, X}}, [=]{ return X; }},
|
||||
{{Instruction::OR, {X, X}}, [=]{ return X; }},
|
||||
|
Loading…
Reference in New Issue
Block a user