Skip to content

Commit

Permalink
update optimizer tests -- callvalue is now considered constant
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-cooper committed Sep 19, 2023
1 parent 2c71523 commit 4e837a8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/compiler/ir/test_optimize_ir.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@
(["sub", "x", 0], ["x"]),
(["sub", "x", "x"], [0]),
(["sub", ["sload", 0], ["sload", 0]], None),
(["sub", ["callvalue"], ["callvalue"]], None),
(["sub", ["callvalue"], ["callvalue"]], [0]),
(["sub", ["msize"], ["msize"]], None),
(["sub", ["gas"], ["gas"]], None),
(["sub", -1, ["sload", 0]], ["not", ["sload", 0]]),
(["mul", "x", 1], ["x"]),
(["div", "x", 1], ["x"]),
Expand Down Expand Up @@ -210,7 +212,9 @@
(["eq", -1, ["add", -(2**255), 2**255 - 1]], [1]), # test compile-time wrapping
(["eq", -2, ["add", 2**256 - 1, 2**256 - 1]], [1]), # test compile-time wrapping
(["eq", "x", "x"], [1]),
(["eq", "callvalue", "callvalue"], None),
(["eq", "gas", "gas"], None),
(["eq", "msize", "msize"], None),
(["eq", "callvalue", "callvalue"], [1]),
(["ne", "x", "x"], [0]),
]

Expand Down

0 comments on commit 4e837a8

Please sign in to comment.