mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Test not to remat if the expression is too large.
This commit is contained in:
parent
88a5d152d0
commit
669b63ca5f
@ -155,4 +155,16 @@ BOOST_AUTO_TEST_CASE(do_not_move_out_of_scope)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE(do_not_remat_large_amounts_of_code)
|
||||||
|
{
|
||||||
|
CHECK(
|
||||||
|
"{ let x := add(mul(calldataload(2), calldataload(4)), mul(2, calldatasize())) let b := x }",
|
||||||
|
"{ let x := add(mul(calldataload(2), calldataload(4)), mul(2, calldatasize())) let b := x }"
|
||||||
|
);
|
||||||
|
CHECK(
|
||||||
|
"{ let x := add(mul(calldataload(2), calldataload(4)), calldatasize()) let b := x }",
|
||||||
|
"{ let x := add(mul(calldataload(2), calldataload(4)), calldatasize()) let b := add(mul(calldataload(2), calldataload(4)), calldatasize()) }"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_SUITE_END()
|
BOOST_AUTO_TEST_SUITE_END()
|
||||||
|
Loading…
Reference in New Issue
Block a user