Merge pull request #6952 from ethereum/remove-redundant-optimizer-rule

optimizer: Remove redundant rule from the optimizer rule list
This commit is contained in:
chriseth 2019-06-17 14:37:31 +02:00 committed by GitHub
commit e186dc061d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,7 +89,6 @@ std::vector<SimplificationRule<Pattern>> simplificationRuleListPart1(
{{Instruction::BYTE, {A, B}}, [=]{ return A.d() >= 32 ? 0 : (B.d() >> unsigned(8 * (31 - A.d()))) & 0xff; }, false}, {{Instruction::BYTE, {A, B}}, [=]{ return A.d() >= 32 ? 0 : (B.d() >> unsigned(8 * (31 - A.d()))) & 0xff; }, false},
{{Instruction::ADDMOD, {A, B, C}}, [=]{ return C.d() == 0 ? 0 : u256((bigint(A.d()) + bigint(B.d())) % C.d()); }, false}, {{Instruction::ADDMOD, {A, B, C}}, [=]{ return C.d() == 0 ? 0 : u256((bigint(A.d()) + bigint(B.d())) % C.d()); }, false},
{{Instruction::MULMOD, {A, B, C}}, [=]{ return C.d() == 0 ? 0 : u256((bigint(A.d()) * bigint(B.d())) % C.d()); }, false}, {{Instruction::MULMOD, {A, B, C}}, [=]{ return C.d() == 0 ? 0 : u256((bigint(A.d()) * bigint(B.d())) % C.d()); }, false},
{{Instruction::MULMOD, {A, B, C}}, [=]{ return A.d() * B.d(); }, false},
{{Instruction::SIGNEXTEND, {A, B}}, [=]() -> u256 { {{Instruction::SIGNEXTEND, {A, B}}, [=]() -> u256 {
if (A.d() >= 31) if (A.d() >= 31)
return B.d(); return B.d();