diff --git a/src/EVM/Expr.hs b/src/EVM/Expr.hs index 021c7006f..ff39a0dc6 100644 --- a/src/EVM/Expr.hs +++ b/src/EVM/Expr.hs @@ -954,6 +954,7 @@ simplify e = if (mapExpr go e == e) -- Some trivial div eliminations go (Div (Lit 0) _) = Lit 0 -- divide 0 by anything (including 0) is zero in EVM go (Div _ (Lit 0)) = Lit 0 -- divide anything by 0 is zero in EVM + go (Div a (Lit 1)) = a -- If a >= b then the value of the `Max` expression can never be < b go o@(LT (Max (Lit a) _) (Lit b))