Replace byte(A, X) by zero if A >= 32

This commit is contained in:
chriseth
2019-08-29 15:35:34 +02:00
parent e74b63b6de
commit e86b5cf14e
3 changed files with 25 additions and 0 deletions
+8
View File
@@ -259,6 +259,14 @@ std::vector<SimplificationRule<Pattern>> simplificationRuleListPart5(
[=]() { return A.d() >= 256; }
});
// Replace BYTE(A, X), A >= 32 with 0
rules.push_back({
{Instruction::BYTE, {A, X}},
[=]() -> Pattern { return u256(0); },
true,
[=]() { return A.d() >= 32; }
});
for (auto const& op: std::vector<Instruction>{
Instruction::ADDRESS,
Instruction::CALLER,