diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-05-10 17:34:37 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-05-20 00:49:20 +0800 |
commit | af3a4b06427eac386a7cf81e90dc5307884d5096 (patch) | |
tree | 57ea340f9c93b4234f9653f2234443d9202c8821 /libevmasm/SimplificationRules.cpp | |
parent | dc8eb3d8463f14835078b89eb181ad3473f2b73e (diff) | |
download | dexon-solidity-af3a4b06427eac386a7cf81e90dc5307884d5096.tar.gz dexon-solidity-af3a4b06427eac386a7cf81e90dc5307884d5096.tar.zst dexon-solidity-af3a4b06427eac386a7cf81e90dc5307884d5096.zip |
Add simplification rule for SDIV(0,X) and SDIV(X,0)
Diffstat (limited to 'libevmasm/SimplificationRules.cpp')
-rw-r--r-- | libevmasm/SimplificationRules.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libevmasm/SimplificationRules.cpp b/libevmasm/SimplificationRules.cpp index 4788d4d7..e6c51f95 100644 --- a/libevmasm/SimplificationRules.cpp +++ b/libevmasm/SimplificationRules.cpp @@ -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); }}, |