Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-cooper committed Oct 3, 2023
1 parent a0ef351 commit cb71178
Showing 1 changed file with 23 additions and 29 deletions.
52 changes: 23 additions & 29 deletions tests/compiler/ir/test_optimize_ir.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,53 +336,47 @@ def test_operator_set_values():
"seq",
["mstore", 0, ["mload", 32]],
["shr", 224, ["calldataload", 0]],
["mstore", 32, ["mload", 64]]
["mstore", 32, ["mload", 64]],
],
None
None,
),
# not-word aligned optimizations (not overlap)
(
[
"seq",
["mstore", 0, ["mload", 1]],
["mstore", 32, ["mload", 33]]
],
["mcopy", 0, 1, 64]
),
(["seq", ["mstore", 0, ["mload", 1]], ["mstore", 32, ["mload", 33]]], ["mcopy", 0, 1, 64]),
# not-word aligned optimizations (overlap)
(
[
"seq",
["mstore", 1, ["mload", 0]],
["mstore", 33, ["mload", 32]]
],
None
),
(["seq", ["mstore", 1, ["mload", 0]], ["mstore", 33, ["mload", 32]]], None),
# not-word aligned optimizations (overlap and not-overlap)
(
[
"seq",
["mstore", 0, ["mload", 1]],
["mstore", 32, ["mload", 33]],
["mstore", 1, ["mload", 0]],
["mstore", 33, ["mload", 32]]
["mstore", 33, ["mload", 32]],
],
[
"seq",
["mcopy", 0, 1, 64],
["mstore", 1, ["mload", 0]],
["mstore", 33, ["mload", 32]]
]
["seq", ["mcopy", 0, 1, 64], ["mstore", 1, ["mload", 0]], ["mstore", 33, ["mload", 32]]],
),
# overflow test
(
[
"seq",
["mstore", 115792089237316195423570985008687907853269984665640564039457584007913129639872, ["mload", 0]], # 2**256-1-31-32
["mstore", 115792089237316195423570985008687907853269984665640564039457584007913129639904, ["mload", 32]] # 2**256-1-31
[
"mstore",
115792089237316195423570985008687907853269984665640564039457584007913129639872,
["mload", 0],
], # 2**256-1-31-32
[
"mstore",
115792089237316195423570985008687907853269984665640564039457584007913129639904,
["mload", 32],
], # 2**256-1-31
],
[
"mcopy",
115792089237316195423570985008687907853269984665640564039457584007913129639872,
0,
64,
],
["mcopy", 115792089237316195423570985008687907853269984665640564039457584007913129639872, 0, 64]
)
),
]


Expand Down

0 comments on commit cb71178

Please sign in to comment.