diff --git a/test/cmdlineTests/exp_base_literal/output b/test/cmdlineTests/exp_base_literal/output index b7aaea4ba..bec570658 100644 --- a/test/cmdlineTests/exp_base_literal/output +++ b/test/cmdlineTests/exp_base_literal/output @@ -182,36 +182,85 @@ object "C_81" { cleaned := value } + function cleanup_t_rational_0_by_1(value) -> cleaned { + cleaned := value + } + + function cleanup_t_rational_10_by_1(value) -> cleaned { + cleaned := value + } + + function cleanup_t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1(value) -> cleaned { + cleaned := value + } + + function cleanup_t_rational_1_by_1(value) -> cleaned { + cleaned := value + } + + function cleanup_t_rational_2_by_1(value) -> cleaned { + cleaned := value + } + + function cleanup_t_rational_minus_1_by_1(value) -> cleaned { + cleaned := value + } + + function cleanup_t_rational_minus_2_by_1(value) -> cleaned { + cleaned := value + } + function cleanup_t_uint256(value) -> cleaned { cleaned := value } function convert_t_rational_0_by_1_to_t_uint256(value) -> converted { + + value := cleanup_t_rational_0_by_1(value) converted := cleanup_t_uint256(value) + } function convert_t_rational_10_by_1_to_t_uint256(value) -> converted { + + value := cleanup_t_rational_10_by_1(value) converted := cleanup_t_uint256(value) + } function convert_t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1_to_t_uint256(value) -> converted { + + value := cleanup_t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1(value) converted := cleanup_t_uint256(value) + } function convert_t_rational_1_by_1_to_t_uint256(value) -> converted { + + value := cleanup_t_rational_1_by_1(value) converted := cleanup_t_uint256(value) + } function convert_t_rational_2_by_1_to_t_uint256(value) -> converted { + + value := cleanup_t_rational_2_by_1(value) converted := cleanup_t_uint256(value) + } function convert_t_rational_minus_1_by_1_to_t_int256(value) -> converted { + + value := cleanup_t_rational_minus_1_by_1(value) converted := cleanup_t_int256(value) + } function convert_t_rational_minus_2_by_1_to_t_int256(value) -> converted { + + value := cleanup_t_rational_minus_2_by_1(value) converted := cleanup_t_int256(value) + } /// @src 0:96:368 diff --git a/test/cmdlineTests/name_simplifier/output b/test/cmdlineTests/name_simplifier/output index 7d0fba09f..be3cb3780 100644 --- a/test/cmdlineTests/name_simplifier/output +++ b/test/cmdlineTests/name_simplifier/output @@ -48,7 +48,7 @@ object "C_59" { for { } lt(i, _4) { i := add(i, 1) } { if slt(sub(calldatasize(), src), _2) { revert(_1, _1) } - let value := allocate_memory_1228() + let value := allocate_memory_1236() mstore(value, calldataload(src)) mstore(dst, value) dst := add(dst, _2) @@ -79,7 +79,7 @@ object "C_59" { } tail := add(add(headStart, and(add(length, 31), not(31))), 96) } - function allocate_memory_1228() -> memPtr + function allocate_memory_1236() -> memPtr { memPtr := mload(64) let newFreePtr := add(memPtr, 32) diff --git a/test/cmdlineTests/yul_source_locations/output.json b/test/cmdlineTests/yul_source_locations/output.json index ae7d70556..6c2f0a129 100644 --- a/test/cmdlineTests/yul_source_locations/output.json +++ b/test/cmdlineTests/yul_source_locations/output.json @@ -53,6 +53,10 @@ object \"C_54\" { cleaned := value } + function cleanup_t_rational_42_by_1(value) -> cleaned { + cleaned := value + } + /// @src 0:175:223 function constructor_C_54(var__init_12) { @@ -74,11 +78,17 @@ object \"C_54\" { /// @src 0:79:428 function convert_t_int256_to_t_int256(value) -> converted { + + value := cleanup_t_int256(value) converted := cleanup_t_int256(value) + } function convert_t_rational_42_by_1_to_t_int256(value) -> converted { + + value := cleanup_t_rational_42_by_1(value) converted := cleanup_t_int256(value) + } function copy_arguments_for_constructor_20_object_C_54() -> ret_param_0 { @@ -261,6 +271,10 @@ object \"C_54\" { cleaned := value } + function cleanup_t_rational_41_by_1(value) -> cleaned { + cleaned := value + } + function cleanup_t_uint160(value) -> cleaned { cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff) } @@ -279,11 +293,17 @@ object \"C_54\" { } function convert_t_int256_to_t_int256(value) -> converted { + + value := cleanup_t_int256(value) converted := cleanup_t_int256(value) + } function convert_t_rational_41_by_1_to_t_int256(value) -> converted { + + value := cleanup_t_rational_41_by_1(value) converted := cleanup_t_int256(value) + } function convert_t_uint160_to_t_address(value) -> converted { @@ -291,7 +311,10 @@ object \"C_54\" { } function convert_t_uint160_to_t_uint160(value) -> converted { + + value := cleanup_t_uint160(value) converted := cleanup_t_uint160(value) + } function extract_from_storage_value_dynamict_int256(slot_value, offset) -> value { @@ -610,6 +633,14 @@ object \"D_72\" { cleaned := value } + function cleanup_t_rational_3_by_1(value) -> cleaned { + cleaned := value + } + + function cleanup_t_rational_42_by_1(value) -> cleaned { + cleaned := value + } + /// @src 0:175:223 function constructor_C_54(var__init_12) { @@ -652,15 +683,24 @@ object \"D_72\" { /// @src 1:91:166 function convert_t_int256_to_t_int256(value) -> converted { + + value := cleanup_t_int256(value) converted := cleanup_t_int256(value) + } function convert_t_rational_3_by_1_to_t_int256(value) -> converted { + + value := cleanup_t_rational_3_by_1(value) converted := cleanup_t_int256(value) + } function convert_t_rational_42_by_1_to_t_int256(value) -> converted { + + value := cleanup_t_rational_42_by_1(value) converted := cleanup_t_int256(value) + } function copy_arguments_for_constructor_71_object_D_72() -> ret_param_0 { @@ -865,6 +905,10 @@ object \"D_72\" { cleaned := value } + function cleanup_t_rational_41_by_1(value) -> cleaned { + cleaned := value + } + function cleanup_t_uint160(value) -> cleaned { cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff) } @@ -883,11 +927,17 @@ object \"D_72\" { } function convert_t_int256_to_t_int256(value) -> converted { + + value := cleanup_t_int256(value) converted := cleanup_t_int256(value) + } function convert_t_rational_41_by_1_to_t_int256(value) -> converted { + + value := cleanup_t_rational_41_by_1(value) converted := cleanup_t_int256(value) + } function convert_t_uint160_to_t_address(value) -> converted { @@ -895,7 +945,10 @@ object \"D_72\" { } function convert_t_uint160_to_t_uint160(value) -> converted { + + value := cleanup_t_uint160(value) converted := cleanup_t_uint160(value) + } function extract_from_storage_value_dynamict_int256(slot_value, offset) -> value { diff --git a/test/cmdlineTests/yul_string_format_ascii_bytes32_from_number/output.json b/test/cmdlineTests/yul_string_format_ascii_bytes32_from_number/output.json index 09e81312b..ab96590ac 100644 --- a/test/cmdlineTests/yul_string_format_ascii_bytes32_from_number/output.json +++ b/test/cmdlineTests/yul_string_format_ascii_bytes32_from_number/output.json @@ -93,7 +93,10 @@ object \"C_11\" { } function convert_t_rational_1633837924_by_1_to_t_bytes4(value) -> converted { - converted := shift_left_224(cleanup_t_rational_1633837924_by_1(value)) + + value := cleanup_t_rational_1633837924_by_1(value) + converted := cleanup_t_bytes4(shift_left_224(value)) + } /// @src 0:91:157 diff --git a/test/cmdlineTests/yul_string_format_hex/output.json b/test/cmdlineTests/yul_string_format_hex/output.json index e944cf5e1..d22360869 100644 --- a/test/cmdlineTests/yul_string_format_hex/output.json +++ b/test/cmdlineTests/yul_string_format_hex/output.json @@ -93,7 +93,10 @@ object \"C_11\" { } function convert_t_rational_2864434397_by_1_to_t_bytes4(value) -> converted { - converted := shift_left_224(cleanup_t_rational_2864434397_by_1(value)) + + value := cleanup_t_rational_2864434397_by_1(value) + converted := cleanup_t_bytes4(shift_left_224(value)) + } /// @src 0:91:157 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol index 52a57fdd0..fedc04d48 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol @@ -54,5 +54,5 @@ contract C { // f3() -> 0x20, 0xa0, 0x1, 0x60, 0x2, 0x3, "abc" // f4() -> 0x20, 0x160, 0x1, 0x80, 0xc0, 0x2, 0x3, "abc", 0x7, 0x40, 0x2, 0x2, 0x3 // gas irOptimized: 113296 -// gas legacy: 114728 +// gas legacy: 114830 // gas legacyOptimized: 112606 diff --git a/test/libsolidity/semanticTests/array/copying/copy_byte_array_to_storage.sol b/test/libsolidity/semanticTests/array/copying/copy_byte_array_to_storage.sol index e48d23e94..b3390bb96 100644 --- a/test/libsolidity/semanticTests/array/copying/copy_byte_array_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/copy_byte_array_to_storage.sol @@ -49,5 +49,5 @@ contract C { // ---- // f() -> 0xff // gas irOptimized: 121438 -// gas legacy: 126745 +// gas legacy: 127510 // gas legacyOptimized: 123476 diff --git a/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol b/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol index 03410a6fe..55cb26e1e 100644 --- a/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol +++ b/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol @@ -22,5 +22,5 @@ contract B { // ---- // f() -> 2, 3, 4, 5, 6, 1000, 1001, 1002, 1003, 1004 // gas irOptimized: 121038 -// gas legacy: 235167 +// gas legacy: 235269 // gas legacyOptimized: 133299 diff --git a/test/libsolidity/semanticTests/array/push/array_push_struct.sol b/test/libsolidity/semanticTests/array/push/array_push_struct.sol index 4b80a6e03..03a2c53b3 100644 --- a/test/libsolidity/semanticTests/array/push/array_push_struct.sol +++ b/test/libsolidity/semanticTests/array/push/array_push_struct.sol @@ -22,6 +22,6 @@ contract c { // compileViaYul: also // ---- // test() -> 2, 3, 4, 5 -// gas irOptimized: 137059 +// gas irOptimized: 137074 // gas legacy: 147484 // gas legacyOptimized: 146456 diff --git a/test/libsolidity/semanticTests/array/push/array_push_struct_from_calldata.sol b/test/libsolidity/semanticTests/array/push/array_push_struct_from_calldata.sol index b6788c076..fddefa5ea 100644 --- a/test/libsolidity/semanticTests/array/push/array_push_struct_from_calldata.sol +++ b/test/libsolidity/semanticTests/array/push/array_push_struct_from_calldata.sol @@ -19,5 +19,5 @@ contract c { // ---- // test((uint16,uint16,uint16[3],uint16[])): 0x20, 2, 3, 0, 0, 4, 0xC0, 4, 0, 0, 5, 0, 0 -> 2, 3, 4, 5 // gas irOptimized: 139100 -// gas legacy: 144322 +// gas legacy: 144835 // gas legacyOptimized: 139171 diff --git a/test/libsolidity/semanticTests/events/event_indexed_mixed.sol b/test/libsolidity/semanticTests/events/event_indexed_mixed.sol index e816a4961..cb4be7526 100644 --- a/test/libsolidity/semanticTests/events/event_indexed_mixed.sol +++ b/test/libsolidity/semanticTests/events/event_indexed_mixed.sol @@ -14,5 +14,5 @@ contract C { // deposit() -> // ~ emit E(uint256,uint256,uint256,bytes): #0x02, 0x01, 0x03, 0x60, 0x03, "def" // gas irOptimized: 23685 -// gas legacy: 24170 +// gas legacy: 24272 // gas legacyOptimized: 23753 diff --git a/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol b/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol index a2ff8bd75..271cb2be6 100644 --- a/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol +++ b/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol @@ -35,10 +35,10 @@ contract test { // compileViaYul: also // ---- // constructor() -// gas irOptimized: 500656 +// gas irOptimized: 527609 // gas legacy: 733634 // gas legacyOptimized: 478742 // prb_pi() -> 3141592656369545286 -// gas irOptimized: 63037 +// gas irOptimized: 62877 // gas legacy: 98903 // gas legacyOptimized: 75735 diff --git a/test/libsolidity/semanticTests/functionTypes/store_function.sol b/test/libsolidity/semanticTests/functionTypes/store_function.sol index 26f90dd89..feba6f588 100644 --- a/test/libsolidity/semanticTests/functionTypes/store_function.sol +++ b/test/libsolidity/semanticTests/functionTypes/store_function.sol @@ -29,5 +29,5 @@ contract C { // ---- // t() -> 9 // gas irOptimized: 99004 -// gas legacy: 158997 +// gas legacy: 159048 // gas legacyOptimized: 108916 diff --git a/test/libsolidity/semanticTests/inheritance/address_overload_resolution.sol b/test/libsolidity/semanticTests/inheritance/address_overload_resolution.sol index ca6bd0ca6..725c9f0fb 100644 --- a/test/libsolidity/semanticTests/inheritance/address_overload_resolution.sol +++ b/test/libsolidity/semanticTests/inheritance/address_overload_resolution.sol @@ -27,4 +27,4 @@ contract D { // gas legacy: 115012 // g() -> 5 // gas irOptimized: 78811 -// gas legacy: 115472 +// gas legacy: 115523 diff --git a/test/libsolidity/semanticTests/salted_create/salted_create_with_value.sol b/test/libsolidity/semanticTests/salted_create/salted_create_with_value.sol index fefd988d7..ef0994ee9 100644 --- a/test/libsolidity/semanticTests/salted_create/salted_create_with_value.sol +++ b/test/libsolidity/semanticTests/salted_create/salted_create_with_value.sol @@ -23,5 +23,5 @@ contract A { // ---- // f(), 10 ether -> 3007, 3008, 3009 // gas irOptimized: 270255 -// gas legacy: 422627 +// gas legacy: 422780 // gas legacyOptimized: 287856 diff --git a/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_nested_array_to_storage.sol b/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_nested_array_to_storage.sol index 96dd48904..5d4c0c30c 100644 --- a/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_nested_array_to_storage.sol +++ b/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_nested_array_to_storage.sol @@ -19,5 +19,5 @@ contract C { // ---- // f(uint32,(uint128,uint256[][2],uint32)): 55, 0x40, 77, 0x60, 88, 0x40, 0x40, 2, 1, 2 -> 55, 77, 1, 2, 88 // gas irOptimized: 203716 -// gas legacy: 208666 +// gas legacy: 208984 // gas legacyOptimized: 203583 diff --git a/test/libsolidity/semanticTests/various/external_types_in_calls.sol b/test/libsolidity/semanticTests/various/external_types_in_calls.sol index 4aee63b93..5c6e4d487 100644 --- a/test/libsolidity/semanticTests/various/external_types_in_calls.sol +++ b/test/libsolidity/semanticTests/various/external_types_in_calls.sol @@ -27,5 +27,5 @@ contract C { // compileViaYul: also // ---- // test() -> 9, 7 -// gas legacy: 125064 +// gas legacy: 127206 // t2() -> 9