From 6686ea6c03d80f11ef55352b917ef13a06dfd244 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Sun, 23 Oct 2016 00:23:08 +0100 Subject: Optimiser the PUSH 0, EQ case as ISZERO --- libevmasm/ExpressionClasses.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libevmasm/ExpressionClasses.cpp b/libevmasm/ExpressionClasses.cpp index 9d13a57a..cf5e6a0e 100644 --- a/libevmasm/ExpressionClasses.cpp +++ b/libevmasm/ExpressionClasses.cpp @@ -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; }}, -- cgit v1.2.3