mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add simplification rule for SDIV(0,X) and SDIV(X,0)
This commit is contained in:
parent
dc8eb3d846
commit
af3a4b0642
@ -132,6 +132,8 @@ Rules::Rules()
|
||||
{{Instruction::DIV, {X, 0}}, [=]{ return u256(0); }},
|
||||
{{Instruction::DIV, {0, X}}, [=]{ return u256(0); }},
|
||||
{{Instruction::DIV, {X, 1}}, [=]{ return X; }},
|
||||
{{Instruction::SDIV, {X, 0}}, [=]{ return u256(0); }},
|
||||
{{Instruction::SDIV, {0, X}}, [=]{ return u256(0); }},
|
||||
{{Instruction::SDIV, {X, 1}}, [=]{ return X; }},
|
||||
{{Instruction::AND, {X, ~u256(0)}}, [=]{ return X; }},
|
||||
{{Instruction::AND, {X, 0}}, [=]{ return u256(0); }},
|
||||
|
Loading…
Reference in New Issue
Block a user