From fdc6699159acac61333a43f8cb68b092509ec7e3 Mon Sep 17 00:00:00 2001 From: Nikola Matic Date: Fri, 4 Aug 2023 17:31:39 +0200 Subject: [PATCH] Rematerialize zero literals with default cleanup sequence Add unused pruner step to the end of the default cleanup sequence --- Changelog.md | 1 + docs/internals/optimizer.rst | 2 +- libsolidity/interface/OptimiserSettings.h | 2 +- test/cmdlineTests/name_simplifier/output | 6 +- .../cmdlineTests/optimizer_array_sload/output | 6 +- .../output.json | 160 ++++---- .../output.json | 16 +- .../output.json | 5 - .../strict_asm_optimizer_steps/output | 1 - .../viair_subobject_optimization/output | 78 ++-- .../output | 347 ------------------ .../yul_optimizer_steps_short_sequence/output | 3 +- test/libsolidity/gasTests/abiv2_optimised.sol | 4 +- .../abi_encode_calldata_slice.sol | 6 +- .../struct/struct_storage_ptr.sol | 2 +- .../abi_encode_calldata_slice.sol | 6 +- ...2_in_function_inherited_in_v1_contract.sol | 4 +- .../abiEncoderV2/calldata_array.sol | 2 +- .../abiEncoderV2/storage_array_encoding.sol | 2 +- .../abi_decode_simple_storage.sol | 2 +- .../array/array_memory_index_access.sol | 2 +- .../array/array_storage_index_zeroed_test.sol | 8 +- .../arrays_complex_from_and_to_storage.sol | 2 +- .../array/bytes_length_member.sol | 4 +- .../copying/array_copy_calldata_storage.sol | 2 +- .../copying/array_copy_cleanup_uint40.sol | 2 +- .../copying/array_copy_different_packing.sol | 2 +- .../array/copying/array_copy_nested_array.sol | 2 +- ...ay_copy_storage_storage_different_base.sol | 2 +- ..._storage_storage_different_base_nested.sol | 2 +- ...ay_copy_storage_storage_static_dynamic.sol | 2 +- .../copying/array_copy_target_leftover.sol | 2 +- .../copying/array_copy_target_simple.sol | 2 +- .../copying/array_copy_target_simple_2.sol | 2 +- .../array_nested_calldata_to_storage.sol | 2 +- .../array_nested_memory_to_storage.sol | 2 +- .../array_of_struct_calldata_to_storage.sol | 2 +- .../array_of_struct_memory_to_storage.sol | 2 +- ...ts_containing_arrays_memory_to_storage.sol | 2 +- .../array/copying/bytes_inside_mappings.sol | 4 +- .../copying/bytes_storage_to_storage.sol | 18 +- .../calldata_array_dynamic_to_storage.sol | 2 +- .../copying/calldata_array_to_mapping.sol | 2 +- .../copy_byte_array_in_struct_to_storage.sol | 4 +- .../copy_function_internal_storage_array.sol | 2 +- .../array/copying/copy_removes_bytes_data.sol | 4 +- .../copying/copying_bytes_multiassign.sol | 2 +- ...d_array_of_structs_calldata_to_storage.sol | 6 +- ...ted_array_of_structs_memory_to_storage.sol | 6 +- .../function_type_array_to_storage.sol | 4 +- .../memory_dyn_2d_bytes_to_storage.sol | 2 +- ...ested_array_element_storage_to_storage.sol | 2 +- ...d_array_of_structs_calldata_to_storage.sol | 6 +- ...ted_array_of_structs_memory_to_storage.sol | 6 +- ...amic_array_element_calldata_to_storage.sol | 2 +- .../array/copying/storage_memory_nested.sol | 2 +- .../copying/storage_memory_nested_bytes.sol | 2 +- .../storage_memory_nested_from_pointer.sol | 2 +- .../copying/storage_memory_packed_dyn.sol | 2 +- .../array/create_memory_array.sol | 2 +- .../array/delete/bytes_delete_element.sol | 2 +- .../array/fixed_arrays_as_return_type.sol | 2 +- .../array/function_array_cross_calls.sol | 2 +- ...nvalid_encoding_for_storage_byte_array.sol | 4 +- .../array/pop/array_pop_uint16_transition.sol | 2 +- .../array/pop/array_pop_uint24_transition.sol | 2 +- .../array/pop/byte_array_pop_masking_long.sol | 2 +- .../push/array_push_nested_from_calldata.sol | 2 +- .../array/push/array_push_struct.sol | 2 +- .../push/array_push_struct_from_calldata.sol | 4 +- .../array/push/nested_bytes_push.sol | 2 +- .../array/push/push_no_args_bytes.sol | 2 +- .../byte_array_to_storage_cleanup.sol | 4 +- .../copy_from_calldata_removes_bytes_data.sol | 4 +- .../constructor/arrays_in_constructors.sol | 4 +- .../bytes_in_constructors_packer.sol | 4 +- .../bytes_in_constructors_unpacker.sol | 4 +- .../constructor_static_array_argument.sol | 4 +- .../events/event_emit_from_other_contract.sol | 2 +- .../events/event_indexed_string.sol | 2 +- .../externalContracts/base64.sol | 6 +- .../externalContracts/deposit_contract.sol | 10 +- .../externalContracts/prbmath_signed.sol | 2 +- .../externalContracts/prbmath_unsigned.sol | 2 +- .../externalContracts/strings.sol | 4 +- .../creation_function_call_with_args.sol | 2 +- .../creation_function_call_with_salt.sol | 2 +- .../external_call_to_nonexisting.sol | 2 +- .../functionCall/failed_create.sol | 2 +- .../functionCall/gas_and_value_basic.sol | 2 +- .../gas_and_value_brace_syntax.sol | 2 +- .../immutable/multi_creation.sol | 2 +- .../inheritance/value_for_constructor.sol | 2 +- .../libraries/internal_types_in_library.sol | 2 +- .../using_library_mappings_public.sol | 2 +- .../using_library_mappings_return.sol | 2 +- .../salted_create_with_value.sol | 2 +- .../structs/copy_from_mapping.sol | 4 +- .../copy_substructures_from_mapping.sol | 2 +- .../structs/copy_substructures_to_mapping.sol | 10 +- .../semanticTests/structs/copy_to_mapping.sol | 12 +- ...truct_containing_bytes_copy_and_delete.sol | 8 +- .../userDefinedValueType/calldata.sol | 2 +- .../semanticTests/various/address_code.sol | 4 +- .../semanticTests/various/create_calldata.sol | 4 +- .../various/destructuring_assignment.sol | 2 +- .../semanticTests/various/selfdestruct.sol | 2 +- .../semanticTests/various/senders_balance.sol | 2 +- .../skip_dynamic_types_for_structs.sol | 2 +- .../semanticTests/various/value_complex.sol | 2 +- .../semanticTests/various/value_insane.sol | 2 +- .../viaYul/copy_struct_invalid_ir_bug.sol | 2 +- .../sizeLimits/bytecode_too_large.sol | 2 +- .../bytecode_too_large_byzantium.sol | 2 +- .../sizeLimits/combined_too_large_paris.sol | 6 +- .../combined_too_large_shanghai.sol | 8 +- .../initcode_too_large_shanghai.sol | 2 +- .../fullSuite/abi_example1.yul | 2 +- .../fullSuite/devcon_example.yul | 2 +- .../fullSuite/loopInvariantCodeMotion.yul | 2 +- .../fullSuite/name_cleaner_reserved.yul | 2 +- 121 files changed, 309 insertions(+), 666 deletions(-) diff --git a/Changelog.md b/Changelog.md index eb2f99fd8..cdabe189b 100644 --- a/Changelog.md +++ b/Changelog.md @@ -6,6 +6,7 @@ Language Features: Compiler Features: * Parser: Remove the experimental error recovery mode (``--error-recovery`` / ``settings.parserErrorRecovery``). * Yul Optimizer: If ``PUSH0`` is supported, favor zero literals over storing zero values in variables. + * Yul Optimizer: Run the ``Rematerializer`` and ``UnusedPruner`` steps at the end of the default clean-up sequence. Bugfixes: diff --git a/docs/internals/optimizer.rst b/docs/internals/optimizer.rst index ab37872ff..b3e144e94 100644 --- a/docs/internals/optimizer.rst +++ b/docs/internals/optimizer.rst @@ -338,7 +338,7 @@ You can override this sequence and supply your own using the ``--yul-optimizatio .. code-block:: bash - solc --optimize --ir-optimized --yul-optimizations 'dhfoD[xarrscLMcCTU]uljmul:fDnTOc' + solc --optimize --ir-optimized --yul-optimizations 'dhfoD[xarrscLMcCTU]uljmul:fDnTOcmu' The order of steps is significant and affects the quality of the output. Moreover, applying a step may uncover new optimization opportunities for others that were already applied, diff --git a/libsolidity/interface/OptimiserSettings.h b/libsolidity/interface/OptimiserSettings.h index 8b0299c47..9f2197d42 100644 --- a/libsolidity/interface/OptimiserSettings.h +++ b/libsolidity/interface/OptimiserSettings.h @@ -59,7 +59,7 @@ struct OptimiserSettings "]" "jmul[jul] VcTOcul jmul"; // Make source short and pretty - static char constexpr DefaultYulOptimiserCleanupSteps[] = "fDnTOc"; + static char constexpr DefaultYulOptimiserCleanupSteps[] = "fDnTOcmu"; /// No optimisations at all - not recommended. static OptimiserSettings none() diff --git a/test/cmdlineTests/name_simplifier/output b/test/cmdlineTests/name_simplifier/output index 936378bd3..ed4c6e5c0 100644 --- a/test/cmdlineTests/name_simplifier/output +++ b/test/cmdlineTests/name_simplifier/output @@ -101,7 +101,7 @@ object "C_59" { mstore(add(memPtr_1, _3), "longstringlongstringlongstringlo") mstore(add(memPtr_1, _9), "ngstringlongstringlongstringlong") let _11 := 96 - mstore(add(memPtr_1, _11), "stringlongstringlongstringlongst") + mstore(add(memPtr_1, 96), "stringlongstringlongstringlongst") mstore(add(memPtr_1, 128), "ring") let memPos := mload(_9) mstore(memPos, _10) @@ -113,8 +113,8 @@ object "C_59" { { mstore(add(add(memPos, i), _11), mload(add(add(memPtr_1, i), _3))) } - mstore(add(add(memPos, length), _11), 0) - return(memPos, add(sub(add(memPos, and(add(length, 31), _8)), memPos), _11)) + mstore(add(add(memPos, length), 96), 0) + return(memPos, add(sub(add(memPos, and(add(length, 31), _8)), memPos), 96)) } } revert(0, 0) diff --git a/test/cmdlineTests/optimizer_array_sload/output b/test/cmdlineTests/optimizer_array_sload/output index f2f95f15d..2698a60cf 100644 --- a/test/cmdlineTests/optimizer_array_sload/output +++ b/test/cmdlineTests/optimizer_array_sload/output @@ -19,7 +19,7 @@ object "Arraysum_34" { /// @src 0:80:429 "contract Arraysum {..." mstore(64, memoryguard(0x80)) let _1 := 4 - if iszero(lt(calldatasize(), _1)) + if iszero(lt(calldatasize(), 4)) { if eq(0x81d73423, shr(224, calldataload(0))) { @@ -27,8 +27,8 @@ object "Arraysum_34" { if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } let var_sum := 0 /// @src 0:368:378 "uint i = 0" - let var_i := /** @src 0:80:429 "contract Arraysum {..." */ var_sum - let _2 := sload(var_sum) + let var_i := /** @src 0:80:429 "contract Arraysum {..." */ 0 + let _2 := sload(0) /// @src 0:364:423 "for(uint i = 0; i < values.length; i++)..." for { } /** @src 0:380:397 "i < values.length" */ lt(var_i, _2) diff --git a/test/cmdlineTests/standard_debug_info_in_evm_asm_via_ir_location/output.json b/test/cmdlineTests/standard_debug_info_in_evm_asm_via_ir_location/output.json index 339df2093..143ad92c3 100644 --- a/test/cmdlineTests/standard_debug_info_in_evm_asm_via_ir_location/output.json +++ b/test/cmdlineTests/standard_debug_info_in_evm_asm_via_ir_location/output.json @@ -112,8 +112,8 @@ sub_0: assembly { dup1 revert tag_8: - jumpi(tag_12, callvalue) - jumpi(tag_12, slt(add(not(0x03), calldatasize), 0x00)) + jumpi(tag_26, callvalue) + jumpi(tag_26, slt(add(not(0x03), calldatasize), 0x00)) sload(0x00) sub(shl(0xff, 0x01), 0x01) dup2 @@ -122,36 +122,39 @@ sub_0: assembly { jumpi 0x01 add - swap1 - dup2 0x00 + dup2 + swap1 sstore - dup1 + dup2 mload shl(0xe4, 0x026121ff) /* \"C\":403:411 this.f() */ dup2 mstore - 0x20 - /* \"C\":403:407 this */ - dup2 /* \"C\":79:428 contract C... */ + swap2 + swap1 + /* \"C\":403:411 this.f() */ + 0x20 + /* \"C\":79:428 contract C... */ + dup4 0x04 - /* \"C\":403:407 this */ dup2 + /* \"C\":403:407 this */ address /* \"C\":403:411 this.f() */ gas staticcall - swap1 - dup2 + swap3 + dup4 iszero tag_16 jumpi /* \"C\":79:428 contract C... */ 0x00 /* \"C\":403:411 this.f() */ - swap2 + swap4 tag_18 jumpi /* \"C\":79:428 contract C... */ @@ -159,14 +162,14 @@ sub_0: assembly { /* \"C\":392:411 stateVar + this.f() */ pop tag_20 - /* \"C\":392:422 stateVar + this.f() + immutVar */ - tag_21 - /* \"C\":392:411 stateVar + this.f() */ - swap2 /* \"C\":403:411 this.f() */ 0x20 /* \"C\":392:411 stateVar + this.f() */ - swap5 + swap4 + /* \"C\":392:422 stateVar + this.f() + immutVar */ + tag_21 + /* \"C\":392:411 stateVar + this.f() */ + swap3 tag_1 jump\t// in tag_20: @@ -186,13 +189,10 @@ sub_0: assembly { return /* \"C\":403:411 this.f() */ tag_18: - swap1 + swap3 + pop 0x20 - returndatasize - dup2 - gt - tag_22 - jumpi + jumpi(tag_22, gt(0x20, returndatasize)) tag_23: /* \"C\":79:428 contract C... */ 0x1f @@ -200,12 +200,12 @@ sub_0: assembly { add not(0x1f) and - dup4 + dup5 add 0xffffffffffffffff dup2 gt - dup5 + dup6 dup3 lt or @@ -215,9 +215,9 @@ sub_0: assembly { 0x20 /* \"C\":79:428 contract C... */ swap2 - dup5 + dup6 swap2 - dup7 + dup6 mstore /* \"C\":403:411 this.f() */ dup2 @@ -227,26 +227,26 @@ sub_0: assembly { slt tag_26 jumpi - pop + swap2 mload + swap2 /* \"C\":392:411 stateVar + this.f() */ tag_20 /* \"C\":403:411 this.f() */ jump(tag_19) /* \"C\":79:428 contract C... */ tag_26: + 0x00 dup1 revert tag_24: + /* \"C\":117:119 41 */ shl(0xe0, 0x4e487b71) - dup4 + /* \"C\":79:428 contract C... */ + 0x00 mstore mstore(0x04, 0x41) - 0x24 - /* \"C\":117:119 41 */ - dup4 - /* \"C\":79:428 contract C... */ - revert + revert(0x00, 0x24) /* \"C\":403:411 this.f() */ tag_22: pop @@ -281,14 +281,10 @@ sub_0: assembly { /* \"C\":117:119 41 */ revert /* \"C\":79:428 contract C... */ - tag_12: - 0x00 - dup1 - revert tag_6: pop - jumpi(tag_12, callvalue) - jumpi(tag_12, slt(add(not(0x03), calldatasize), 0x00)) + jumpi(tag_26, callvalue) + jumpi(tag_26, slt(add(not(0x03), calldatasize), 0x00)) 0x20 swap1 sload(0x00) @@ -299,8 +295,8 @@ sub_0: assembly { mstore return tag_4: - jumpi(tag_12, callvalue) - jumpi(tag_12, slt(add(not(0x03), calldatasize), 0x00)) + jumpi(tag_26, callvalue) + jumpi(tag_26, slt(add(not(0x03), calldatasize), 0x00)) /* \"C\":290:298 immutVar */ immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") /* \"C\":117:119 41 */ @@ -481,8 +477,8 @@ sub_0: assembly { dup1 revert tag_8: - jumpi(tag_12, callvalue) - jumpi(tag_12, slt(add(not(0x03), calldatasize), 0x00)) + jumpi(tag_26, callvalue) + jumpi(tag_26, slt(add(not(0x03), calldatasize), 0x00)) sload(0x00) sub(shl(0xff, 0x01), 0x01) dup2 @@ -491,36 +487,39 @@ sub_0: assembly { jumpi 0x01 add - swap1 - dup2 0x00 + dup2 + swap1 sstore - dup1 + dup2 mload shl(0xe4, 0x026121ff) /* \"C\":403:411 this.f() */ dup2 mstore - 0x20 - /* \"C\":403:407 this */ - dup2 /* \"D\":91:166 contract D is C(3)... */ + swap2 + swap1 + /* \"C\":403:411 this.f() */ + 0x20 + /* \"D\":91:166 contract D is C(3)... */ + dup4 0x04 - /* \"C\":403:407 this */ dup2 + /* \"C\":403:407 this */ address /* \"C\":403:411 this.f() */ gas staticcall - swap1 - dup2 + swap3 + dup4 iszero tag_16 jumpi /* \"D\":91:166 contract D is C(3)... */ 0x00 /* \"C\":403:411 this.f() */ - swap2 + swap4 tag_18 jumpi /* \"D\":91:166 contract D is C(3)... */ @@ -528,14 +527,14 @@ sub_0: assembly { /* \"C\":392:411 stateVar + this.f() */ pop tag_20 - /* \"C\":392:422 stateVar + this.f() + immutVar */ - tag_21 - /* \"C\":392:411 stateVar + this.f() */ - swap2 /* \"C\":403:411 this.f() */ 0x20 /* \"C\":392:411 stateVar + this.f() */ - swap5 + swap4 + /* \"C\":392:422 stateVar + this.f() + immutVar */ + tag_21 + /* \"C\":392:411 stateVar + this.f() */ + swap3 tag_1 jump\t// in tag_20: @@ -555,13 +554,10 @@ sub_0: assembly { return /* \"C\":403:411 this.f() */ tag_18: - swap1 + swap3 + pop 0x20 - returndatasize - dup2 - gt - tag_22 - jumpi + jumpi(tag_22, gt(0x20, returndatasize)) tag_23: /* \"D\":91:166 contract D is C(3)... */ 0x1f @@ -569,12 +565,12 @@ sub_0: assembly { add not(0x1f) and - dup4 + dup5 add 0xffffffffffffffff dup2 gt - dup5 + dup6 dup3 lt or @@ -584,9 +580,9 @@ sub_0: assembly { 0x20 /* \"D\":91:166 contract D is C(3)... */ swap2 - dup5 + dup6 swap2 - dup7 + dup6 mstore /* \"C\":403:411 this.f() */ dup2 @@ -596,26 +592,26 @@ sub_0: assembly { slt tag_26 jumpi - pop + swap2 mload + swap2 /* \"C\":392:411 stateVar + this.f() */ tag_20 /* \"C\":403:411 this.f() */ jump(tag_19) /* \"D\":91:166 contract D is C(3)... */ tag_26: + 0x00 dup1 revert tag_24: + /* \"C\":117:119 41 */ shl(0xe0, 0x4e487b71) - dup4 + /* \"D\":91:166 contract D is C(3)... */ + 0x00 mstore mstore(0x04, 0x41) - 0x24 - /* \"C\":117:119 41 */ - dup4 - /* \"D\":91:166 contract D is C(3)... */ - revert + revert(0x00, 0x24) /* \"C\":403:411 this.f() */ tag_22: pop @@ -650,14 +646,10 @@ sub_0: assembly { /* \"C\":117:119 41 */ revert /* \"D\":91:166 contract D is C(3)... */ - tag_12: - 0x00 - dup1 - revert tag_6: pop - jumpi(tag_12, callvalue) - jumpi(tag_12, slt(add(not(0x03), calldatasize), 0x00)) + jumpi(tag_26, callvalue) + jumpi(tag_26, slt(add(not(0x03), calldatasize), 0x00)) 0x20 swap1 sload(0x00) @@ -668,8 +660,8 @@ sub_0: assembly { mstore return tag_4: - jumpi(tag_12, callvalue) - jumpi(tag_12, slt(add(not(0x03), calldatasize), 0x00)) + jumpi(tag_26, callvalue) + jumpi(tag_26, slt(add(not(0x03), calldatasize), 0x00)) /* \"C\":290:298 immutVar */ immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") /* \"C\":117:119 41 */ diff --git a/test/cmdlineTests/standard_debug_info_in_yul_location/output.json b/test/cmdlineTests/standard_debug_info_in_yul_location/output.json index c563f8805..267116272 100644 --- a/test/cmdlineTests/standard_debug_info_in_yul_location/output.json +++ b/test/cmdlineTests/standard_debug_info_in_yul_location/output.json @@ -714,19 +714,19 @@ object \"C_54\" { if _7 { let _8 := 32 - if gt(_8, returndatasize()) { _8 := returndatasize() } + if gt(32, returndatasize()) { _8 := returndatasize() } /// @src 0:79:435 \"contract C...\" let newFreePtr := add(_6, and(add(_8, 31), not(31))) if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _6)) { - mstore(expr, shl(224, 0x4e487b71)) + mstore(0, shl(224, 0x4e487b71)) mstore(4, 0x41) - revert(expr, 0x24) + revert(0, 0x24) } mstore(_2, newFreePtr) if slt(sub(/** @src 0:410:418 \"this.f()\" */ add(_6, _8), /** @src 0:79:435 \"contract C...\" */ _6), /** @src 0:410:418 \"this.f()\" */ 32) /// @src 0:79:435 \"contract C...\" - { revert(expr, expr) } + { revert(0, 0) } /// @src 0:410:418 \"this.f()\" expr := /** @src 0:79:435 \"contract C...\" */ mload(_6) } @@ -1559,19 +1559,19 @@ object \"D_72\" { if _7 { let _8 := 32 - if gt(_8, returndatasize()) { _8 := returndatasize() } + if gt(32, returndatasize()) { _8 := returndatasize() } /// @src 1:91:166 \"contract D is C(3)...\" let newFreePtr := add(_6, and(add(_8, 31), not(31))) if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _6)) { - mstore(expr, shl(224, 0x4e487b71)) + mstore(0, shl(224, 0x4e487b71)) mstore(4, 0x41) - revert(expr, 0x24) + revert(0, 0x24) } mstore(_2, newFreePtr) if slt(sub(/** @src 0:410:418 \"this.f()\" */ add(_6, _8), /** @src 1:91:166 \"contract D is C(3)...\" */ _6), /** @src 0:410:418 \"this.f()\" */ 32) /// @src 1:91:166 \"contract D is C(3)...\" - { revert(expr, expr) } + { revert(0, 0) } /// @src 0:410:418 \"this.f()\" expr := /** @src 1:91:166 \"contract D is C(3)...\" */ mload(_6) } diff --git a/test/cmdlineTests/standard_yul_stack_opt_disabled/output.json b/test/cmdlineTests/standard_yul_stack_opt_disabled/output.json index c381936ef..8d58cf320 100644 --- a/test/cmdlineTests/standard_yul_stack_opt_disabled/output.json +++ b/test/cmdlineTests/standard_yul_stack_opt_disabled/output.json @@ -9,21 +9,16 @@ { "assembly": " /* \"A\":16:17 */ 0x01 - dup1 /* \"A\":27:28 */ 0x00 /* \"A\":20:32 */ sstore /* \"A\":50:51 */ 0x02 - dup1 /* \"A\":61:63 */ 0x20 /* \"A\":54:67 */ sstore - /* \"A\":0:72 */ - pop - pop " } } diff --git a/test/cmdlineTests/strict_asm_optimizer_steps/output b/test/cmdlineTests/strict_asm_optimizer_steps/output index 8fb291b86..c10fb02fb 100644 --- a/test/cmdlineTests/strict_asm_optimizer_steps/output +++ b/test/cmdlineTests/strict_asm_optimizer_steps/output @@ -15,7 +15,6 @@ object "C_6" { code { { mstore(64, 128) - pop(iszero(lt(calldatasize(), 4))) sstore(0, iszero(calldatasize())) revert(0, 0) } diff --git a/test/cmdlineTests/viair_subobject_optimization/output b/test/cmdlineTests/viair_subobject_optimization/output index c9fefe051..4804d1384 100644 --- a/test/cmdlineTests/viair_subobject_optimization/output +++ b/test/cmdlineTests/viair_subobject_optimization/output @@ -117,24 +117,23 @@ sub_0: assembly { tag_3: jumpi(tag_7, callvalue) jumpi(tag_7, slt(add(not(0x03), calldatasize), 0x00)) + not(0x1f) /* "viair_subobject_optimization/input.sol":745:765 type(C).creationCode */ dataSize(sub_0) /* "viair_subobject_optimization/input.sol":669:772 contract D {... */ - swap1 - not(0x1f) - dup1 0x3f - dup5 + dup2 add - and dup3 - add - swap2 - dup1 + and dup4 + add + swap1 + dup4 + dup3 lt 0xffffffffffffffff - dup5 + dup4 gt or tag_9 @@ -142,55 +141,60 @@ sub_0: assembly { swap3 swap1 0x40 - swap3 - dup4 + swap1 + 0x40 mstore /* "viair_subobject_optimization/input.sol":745:765 type(C).creationCode */ - dup2 - dup5 + dup4 + dup3 mstore 0x20 - swap2 + swap4 dataOffset(sub_0) - dup4 - dup7 + 0x20 + dup5 add codecopy /* "viair_subobject_optimization/input.sol":669:772 contract D {... */ - dup3 - mload - swap4 - dup3 - dup6 + mload(0x40) swap4 dup5 + swap3 + /* "viair_subobject_optimization/input.sol":745:765 type(C).creationCode */ + 0x20 + /* "viair_subobject_optimization/input.sol":669:772 contract D {... */ + dup5 mstore - dup2 + dup1 mload - swap2 - dup3 - dup3 + swap3 + dup4 + /* "viair_subobject_optimization/input.sol":745:765 type(C).creationCode */ + 0x20 + /* "viair_subobject_optimization/input.sol":669:772 contract D {... */ dup7 add mstore 0x00 tag_11: - dup4 + dup5 dup2 lt tag_12 jumpi - pop - pop + dup6 + 0x40 + dup2 + dup10 + 0x1f + dup10 0x00 - dup5 - dup4 - add + dup6 + dup3 dup7 add + add mstore - pop - 0x1f add and dup2 @@ -200,22 +204,22 @@ sub_0: assembly { swap1 return tag_12: - dup2 + dup3 dup2 add - dup4 + dup5 add mload dup9 dup3 add - dup9 + dup4 add mstore dup8 swap6 pop - dup3 + dup4 add jump(tag_11) tag_9: diff --git a/test/cmdlineTests/yul_optimizer_steps_nested_brackets/output b/test/cmdlineTests/yul_optimizer_steps_nested_brackets/output index 1e19c3a5c..9687abf64 100644 --- a/test/cmdlineTests/yul_optimizer_steps_nested_brackets/output +++ b/test/cmdlineTests/yul_optimizer_steps_nested_brackets/output @@ -9,7 +9,6 @@ object "C_6" { { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() } - constructor_C() let _1 := allocate_unbounded() codecopy(_1, dataoffset("C_6_deployed"), datasize("C_6_deployed")) return(_1, datasize("C_6_deployed")) @@ -17,97 +16,10 @@ object "C_6" { function allocate_unbounded() -> memPtr { let memPtr_1 := mload(64) - let memPtr_2 := memPtr_1 - let memPtr_3 := memPtr_1 - let memPtr_4 := memPtr_1 - let memPtr_5 := memPtr_1 - let memPtr_6 := memPtr_1 - let memPtr_7 := memPtr_1 - let memPtr_8 := memPtr_1 - let memPtr_9 := memPtr_1 - let memPtr_10 := memPtr_1 - let memPtr_11 := memPtr_1 - let memPtr_12 := memPtr_1 - let memPtr_13 := memPtr_1 - let memPtr_14 := memPtr_1 - let memPtr_15 := memPtr_1 - let memPtr_16 := memPtr_1 - let memPtr_17 := memPtr_1 - let memPtr_18 := memPtr_1 - let memPtr_19 := memPtr_1 - let memPtr_20 := memPtr_1 - let memPtr_21 := memPtr_1 - let memPtr_22 := memPtr_1 - let memPtr_23 := memPtr_1 - let memPtr_24 := memPtr_1 - let memPtr_25 := memPtr_1 - let memPtr_26 := memPtr_1 - let memPtr_27 := memPtr_1 - let memPtr_28 := memPtr_1 - let memPtr_29 := memPtr_1 - let memPtr_30 := memPtr_1 - let memPtr_31 := memPtr_1 - let memPtr_32 := memPtr_1 - let memPtr_33 := memPtr_1 - let memPtr_34 := memPtr_1 - let memPtr_35 := memPtr_1 - let memPtr_36 := memPtr_1 - let memPtr_37 := memPtr_1 - let memPtr_38 := memPtr_1 - let memPtr_39 := memPtr_1 - let memPtr_40 := memPtr_1 - let memPtr_41 := memPtr_1 - let memPtr_42 := memPtr_1 - let memPtr_43 := memPtr_1 - let memPtr_44 := memPtr_1 - let memPtr_45 := memPtr_1 - let memPtr_46 := memPtr_1 - let memPtr_47 := memPtr_1 - let memPtr_48 := memPtr_1 - let memPtr_49 := memPtr_1 - let memPtr_50 := memPtr_1 - let memPtr_51 := memPtr_1 - let memPtr_52 := memPtr_1 - let memPtr_53 := memPtr_1 - let memPtr_54 := memPtr_1 - let memPtr_55 := memPtr_1 - let memPtr_56 := memPtr_1 - let memPtr_57 := memPtr_1 - let memPtr_58 := memPtr_1 - let memPtr_59 := memPtr_1 - let memPtr_60 := memPtr_1 - let memPtr_61 := memPtr_1 - let memPtr_62 := memPtr_1 - let memPtr_63 := memPtr_1 - let memPtr_64 := memPtr_1 - let memPtr_65 := memPtr_1 - let memPtr_66 := memPtr_1 - let memPtr_67 := memPtr_1 - let memPtr_68 := memPtr_1 - let memPtr_69 := memPtr_1 - let memPtr_70 := memPtr_1 - let memPtr_71 := memPtr_1 - let memPtr_72 := memPtr_1 - let memPtr_73 := memPtr_1 - let memPtr_74 := memPtr_1 - let memPtr_75 := memPtr_1 - let memPtr_76 := memPtr_1 - let memPtr_77 := memPtr_1 - let memPtr_78 := memPtr_1 - let memPtr_79 := memPtr_1 - let memPtr_80 := memPtr_1 - let memPtr_81 := memPtr_1 - let memPtr_82 := memPtr_1 - let memPtr_83 := memPtr_1 - let memPtr_84 := memPtr_1 - let memPtr_85 := memPtr_1 - let memPtr_86 := memPtr_1 memPtr := memPtr_1 } function revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() { revert(0, 0) } - function constructor_C() - { } } /// @use-src 0:"yul_optimizer_steps_nested_brackets/input.sol" object "C_6_deployed" { @@ -125,181 +37,11 @@ object "C_6" { function shift_right_unsigned(value) -> newValue { let newValue_1 := shr(224, value) - let newValue_2 := newValue_1 - let newValue_3 := newValue_1 - let newValue_4 := newValue_1 - let newValue_5 := newValue_1 - let newValue_6 := newValue_1 - let newValue_7 := newValue_1 - let newValue_8 := newValue_1 - let newValue_9 := newValue_1 - let newValue_10 := newValue_1 - let newValue_11 := newValue_1 - let newValue_12 := newValue_1 - let newValue_13 := newValue_1 - let newValue_14 := newValue_1 - let newValue_15 := newValue_1 - let newValue_16 := newValue_1 - let newValue_17 := newValue_1 - let newValue_18 := newValue_1 - let newValue_19 := newValue_1 - let newValue_20 := newValue_1 - let newValue_21 := newValue_1 - let newValue_22 := newValue_1 - let newValue_23 := newValue_1 - let newValue_24 := newValue_1 - let newValue_25 := newValue_1 - let newValue_26 := newValue_1 - let newValue_27 := newValue_1 - let newValue_28 := newValue_1 - let newValue_29 := newValue_1 - let newValue_30 := newValue_1 - let newValue_31 := newValue_1 - let newValue_32 := newValue_1 - let newValue_33 := newValue_1 - let newValue_34 := newValue_1 - let newValue_35 := newValue_1 - let newValue_36 := newValue_1 - let newValue_37 := newValue_1 - let newValue_38 := newValue_1 - let newValue_39 := newValue_1 - let newValue_40 := newValue_1 - let newValue_41 := newValue_1 - let newValue_42 := newValue_1 - let newValue_43 := newValue_1 - let newValue_44 := newValue_1 - let newValue_45 := newValue_1 - let newValue_46 := newValue_1 - let newValue_47 := newValue_1 - let newValue_48 := newValue_1 - let newValue_49 := newValue_1 - let newValue_50 := newValue_1 - let newValue_51 := newValue_1 - let newValue_52 := newValue_1 - let newValue_53 := newValue_1 - let newValue_54 := newValue_1 - let newValue_55 := newValue_1 - let newValue_56 := newValue_1 - let newValue_57 := newValue_1 - let newValue_58 := newValue_1 - let newValue_59 := newValue_1 - let newValue_60 := newValue_1 - let newValue_61 := newValue_1 - let newValue_62 := newValue_1 - let newValue_63 := newValue_1 - let newValue_64 := newValue_1 - let newValue_65 := newValue_1 - let newValue_66 := newValue_1 - let newValue_67 := newValue_1 - let newValue_68 := newValue_1 - let newValue_69 := newValue_1 - let newValue_70 := newValue_1 - let newValue_71 := newValue_1 - let newValue_72 := newValue_1 - let newValue_73 := newValue_1 - let newValue_74 := newValue_1 - let newValue_75 := newValue_1 - let newValue_76 := newValue_1 - let newValue_77 := newValue_1 - let newValue_78 := newValue_1 - let newValue_79 := newValue_1 - let newValue_80 := newValue_1 - let newValue_81 := newValue_1 - let newValue_82 := newValue_1 - let newValue_83 := newValue_1 - let newValue_84 := newValue_1 - let newValue_85 := newValue_1 - let newValue_86 := newValue_1 newValue := newValue_1 } function allocate_unbounded() -> memPtr { let memPtr_1 := mload(64) - let memPtr_2 := memPtr_1 - let memPtr_3 := memPtr_1 - let memPtr_4 := memPtr_1 - let memPtr_5 := memPtr_1 - let memPtr_6 := memPtr_1 - let memPtr_7 := memPtr_1 - let memPtr_8 := memPtr_1 - let memPtr_9 := memPtr_1 - let memPtr_10 := memPtr_1 - let memPtr_11 := memPtr_1 - let memPtr_12 := memPtr_1 - let memPtr_13 := memPtr_1 - let memPtr_14 := memPtr_1 - let memPtr_15 := memPtr_1 - let memPtr_16 := memPtr_1 - let memPtr_17 := memPtr_1 - let memPtr_18 := memPtr_1 - let memPtr_19 := memPtr_1 - let memPtr_20 := memPtr_1 - let memPtr_21 := memPtr_1 - let memPtr_22 := memPtr_1 - let memPtr_23 := memPtr_1 - let memPtr_24 := memPtr_1 - let memPtr_25 := memPtr_1 - let memPtr_26 := memPtr_1 - let memPtr_27 := memPtr_1 - let memPtr_28 := memPtr_1 - let memPtr_29 := memPtr_1 - let memPtr_30 := memPtr_1 - let memPtr_31 := memPtr_1 - let memPtr_32 := memPtr_1 - let memPtr_33 := memPtr_1 - let memPtr_34 := memPtr_1 - let memPtr_35 := memPtr_1 - let memPtr_36 := memPtr_1 - let memPtr_37 := memPtr_1 - let memPtr_38 := memPtr_1 - let memPtr_39 := memPtr_1 - let memPtr_40 := memPtr_1 - let memPtr_41 := memPtr_1 - let memPtr_42 := memPtr_1 - let memPtr_43 := memPtr_1 - let memPtr_44 := memPtr_1 - let memPtr_45 := memPtr_1 - let memPtr_46 := memPtr_1 - let memPtr_47 := memPtr_1 - let memPtr_48 := memPtr_1 - let memPtr_49 := memPtr_1 - let memPtr_50 := memPtr_1 - let memPtr_51 := memPtr_1 - let memPtr_52 := memPtr_1 - let memPtr_53 := memPtr_1 - let memPtr_54 := memPtr_1 - let memPtr_55 := memPtr_1 - let memPtr_56 := memPtr_1 - let memPtr_57 := memPtr_1 - let memPtr_58 := memPtr_1 - let memPtr_59 := memPtr_1 - let memPtr_60 := memPtr_1 - let memPtr_61 := memPtr_1 - let memPtr_62 := memPtr_1 - let memPtr_63 := memPtr_1 - let memPtr_64 := memPtr_1 - let memPtr_65 := memPtr_1 - let memPtr_66 := memPtr_1 - let memPtr_67 := memPtr_1 - let memPtr_68 := memPtr_1 - let memPtr_69 := memPtr_1 - let memPtr_70 := memPtr_1 - let memPtr_71 := memPtr_1 - let memPtr_72 := memPtr_1 - let memPtr_73 := memPtr_1 - let memPtr_74 := memPtr_1 - let memPtr_75 := memPtr_1 - let memPtr_76 := memPtr_1 - let memPtr_77 := memPtr_1 - let memPtr_78 := memPtr_1 - let memPtr_79 := memPtr_1 - let memPtr_80 := memPtr_1 - let memPtr_81 := memPtr_1 - let memPtr_82 := memPtr_1 - let memPtr_83 := memPtr_1 - let memPtr_84 := memPtr_1 - let memPtr_85 := memPtr_1 - let memPtr_86 := memPtr_1 memPtr := memPtr_1 } function revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() @@ -316,91 +58,6 @@ object "C_6" { function abi_encode_tuple(headStart) -> tail { let tail_1 := add(headStart, 0) - let tail_2 := tail_1 - let tail_3 := tail_1 - let tail_4 := tail_1 - let tail_5 := tail_1 - let tail_6 := tail_1 - let tail_7 := tail_1 - let tail_8 := tail_1 - let tail_9 := tail_1 - let tail_10 := tail_1 - let tail_11 := tail_1 - let tail_12 := tail_1 - let tail_13 := tail_1 - let tail_14 := tail_1 - let tail_15 := tail_1 - let tail_16 := tail_1 - let tail_17 := tail_1 - let tail_18 := tail_1 - let tail_19 := tail_1 - let tail_20 := tail_1 - let tail_21 := tail_1 - let tail_22 := tail_1 - let tail_23 := tail_1 - let tail_24 := tail_1 - let tail_25 := tail_1 - let tail_26 := tail_1 - let tail_27 := tail_1 - let tail_28 := tail_1 - let tail_29 := tail_1 - let tail_30 := tail_1 - let tail_31 := tail_1 - let tail_32 := tail_1 - let tail_33 := tail_1 - let tail_34 := tail_1 - let tail_35 := tail_1 - let tail_36 := tail_1 - let tail_37 := tail_1 - let tail_38 := tail_1 - let tail_39 := tail_1 - let tail_40 := tail_1 - let tail_41 := tail_1 - let tail_42 := tail_1 - let tail_43 := tail_1 - let tail_44 := tail_1 - let tail_45 := tail_1 - let tail_46 := tail_1 - let tail_47 := tail_1 - let tail_48 := tail_1 - let tail_49 := tail_1 - let tail_50 := tail_1 - let tail_51 := tail_1 - let tail_52 := tail_1 - let tail_53 := tail_1 - let tail_54 := tail_1 - let tail_55 := tail_1 - let tail_56 := tail_1 - let tail_57 := tail_1 - let tail_58 := tail_1 - let tail_59 := tail_1 - let tail_60 := tail_1 - let tail_61 := tail_1 - let tail_62 := tail_1 - let tail_63 := tail_1 - let tail_64 := tail_1 - let tail_65 := tail_1 - let tail_66 := tail_1 - let tail_67 := tail_1 - let tail_68 := tail_1 - let tail_69 := tail_1 - let tail_70 := tail_1 - let tail_71 := tail_1 - let tail_72 := tail_1 - let tail_73 := tail_1 - let tail_74 := tail_1 - let tail_75 := tail_1 - let tail_76 := tail_1 - let tail_77 := tail_1 - let tail_78 := tail_1 - let tail_79 := tail_1 - let tail_80 := tail_1 - let tail_81 := tail_1 - let tail_82 := tail_1 - let tail_83 := tail_1 - let tail_84 := tail_1 - let tail_85 := tail_1 - let tail_86 := tail_1 tail := tail_1 } function external_fun_f() @@ -410,16 +67,12 @@ object "C_6" { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() } abi_decode(4, calldatasize()) - fun_f() let memPos := allocate_unbounded() let memEnd := abi_encode_tuple(memPos) return(memPos, sub(memEnd, memPos)) } function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74() { revert(0, 0) } - /// @ast-id 5 @src 0:74:101 "function f() public pure {}" - function fun_f() - { } } data ".metadata" hex"" } diff --git a/test/cmdlineTests/yul_optimizer_steps_short_sequence/output b/test/cmdlineTests/yul_optimizer_steps_short_sequence/output index 0a4a2c5a2..dc77ce3c5 100644 --- a/test/cmdlineTests/yul_optimizer_steps_short_sequence/output +++ b/test/cmdlineTests/yul_optimizer_steps_short_sequence/output @@ -6,8 +6,7 @@ object "C_8" { /// @src 0:80:221 "contract C {..." mstore(64, memoryguard(0x80)) /// @src 0:129:213 "assembly (\"memory-safe\") {..." - let usr$a := 0 - revert(usr$a, usr$a) + revert(0, 0) } } /// @use-src 0:"yul_optimizer_steps_short_sequence/input.sol" diff --git a/test/libsolidity/gasTests/abiv2_optimised.sol b/test/libsolidity/gasTests/abiv2_optimised.sol index 608d1c8ba..1ab8803d2 100644 --- a/test/libsolidity/gasTests/abiv2_optimised.sol +++ b/test/libsolidity/gasTests/abiv2_optimised.sol @@ -17,9 +17,9 @@ contract C { // optimize-yul: true // ---- // creation: -// codeDepositCost: 638600 +// codeDepositCost: 639000 // executionCost: 668 -// totalCost: 639268 +// totalCost: 639668 // external: // a(): 2283 // b(uint256): 4649 diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_calldata_slice.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_calldata_slice.sol index fe38d8078..53bc3faba 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_calldata_slice.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_calldata_slice.sol @@ -59,10 +59,10 @@ contract C { // EVMVersion: >homestead // ---- // test_bytes() -> -// gas irOptimized: 360827 +// gas irOptimized: 360863 // gas legacy: 411269 // gas legacyOptimized: 317754 // test_uint256() -> -// gas irOptimized: 509533 +// gas irOptimized: 509677 // gas legacy: 577469 -// gas legacyOptimized: 440931 +// gas legacyOptimized: 441003 diff --git a/test/libsolidity/semanticTests/abiEncoderV1/struct/struct_storage_ptr.sol b/test/libsolidity/semanticTests/abiEncoderV1/struct/struct_storage_ptr.sol index 9edb07a18..efffab86c 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/struct/struct_storage_ptr.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/struct/struct_storage_ptr.sol @@ -24,6 +24,6 @@ contract C { // ---- // library: L // f() -> 8, 7, 1, 2, 7, 12 -// gas irOptimized: 166467 +// gas irOptimized: 166475 // gas legacy: 169283 // gas legacyOptimized: 167248 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_calldata_slice.sol b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_calldata_slice.sol index beb283664..975e9f477 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_calldata_slice.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_calldata_slice.sol @@ -60,10 +60,10 @@ contract C { // EVMVersion: >homestead // ---- // test_bytes() -> -// gas irOptimized: 360827 +// gas irOptimized: 360863 // gas legacy: 411269 // gas legacyOptimized: 317754 // test_uint256() -> -// gas irOptimized: 509533 +// gas irOptimized: 509677 // gas legacy: 577469 -// gas legacyOptimized: 440931 +// gas legacyOptimized: 441003 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2_in_function_inherited_in_v1_contract.sol b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2_in_function_inherited_in_v1_contract.sol index 07e517b2d..55f7991de 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2_in_function_inherited_in_v1_contract.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2_in_function_inherited_in_v1_contract.sol @@ -30,6 +30,6 @@ contract C is B { } // ---- // test() -> 77 -// gas irOptimized: 110325 +// gas irOptimized: 110348 // gas legacy: 151866 -// gas legacyOptimized: 110359 +// gas legacyOptimized: 110373 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/calldata_array.sol b/test/libsolidity/semanticTests/abiEncoderV2/calldata_array.sol index bd8517a95..12920a70a 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/calldata_array.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/calldata_array.sol @@ -20,6 +20,6 @@ contract C { // f(uint256[][1]): 32, 32, 0 -> true // f(uint256[][1]): 32, 32, 1, 42 -> true // f(uint256[][1]): 32, 32, 8, 421, 422, 423, 424, 425, 426, 427, 428 -> true -// gas irOptimized: 126849 +// gas irOptimized: 126851 // gas legacy: 139800 // gas legacyOptimized: 119092 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/storage_array_encoding.sol b/test/libsolidity/semanticTests/abiEncoderV2/storage_array_encoding.sol index 6685776d0..330756753 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/storage_array_encoding.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/storage_array_encoding.sol @@ -18,7 +18,7 @@ contract C { // EVMVersion: >homestead // ---- // h(uint256[2][]): 0x20, 3, 123, 124, 223, 224, 323, 324 -> 32, 256, 0x20, 3, 123, 124, 223, 224, 323, 324 -// gas irOptimized: 180808 +// gas irOptimized: 180720 // gas legacy: 184830 // gas legacyOptimized: 181493 // i(uint256[2][2]): 123, 124, 223, 224 -> 32, 128, 123, 124, 223, 224 diff --git a/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol b/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol index c0c2fbfe3..c06d2b24c 100644 --- a/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol +++ b/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol @@ -8,6 +8,6 @@ contract C { } // ---- // f(bytes): 0x20, 0x80, 0x21, 0x40, 0x7, "abcdefg" -> 0x21, 0x40, 0x7, "abcdefg" -// gas irOptimized: 135662 +// gas irOptimized: 135661 // gas legacy: 137278 // gas legacyOptimized: 136048 diff --git a/test/libsolidity/semanticTests/array/array_memory_index_access.sol b/test/libsolidity/semanticTests/array/array_memory_index_access.sol index 1e75afeff..e8b6cd48f 100644 --- a/test/libsolidity/semanticTests/array/array_memory_index_access.sol +++ b/test/libsolidity/semanticTests/array/array_memory_index_access.sol @@ -26,7 +26,7 @@ contract C { // index(uint256): 10 -> true // index(uint256): 20 -> true // index(uint256): 0xFF -> true -// gas irOptimized: 135060 +// gas irOptimized: 135066 // gas legacy: 241703 // gas legacyOptimized: 151613 // accessIndex(uint256,int256): 10, 1 -> 2 diff --git a/test/libsolidity/semanticTests/array/array_storage_index_zeroed_test.sol b/test/libsolidity/semanticTests/array/array_storage_index_zeroed_test.sol index 836901963..8a8c9a7c2 100644 --- a/test/libsolidity/semanticTests/array/array_storage_index_zeroed_test.sol +++ b/test/libsolidity/semanticTests/array/array_storage_index_zeroed_test.sol @@ -52,18 +52,18 @@ contract C { // ---- // test_zeroed_indicies(uint256): 1 -> // test_zeroed_indicies(uint256): 5 -> -// gas irOptimized: 131804 +// gas irOptimized: 131809 // gas legacy: 132804 // gas legacyOptimized: 130649 // test_zeroed_indicies(uint256): 10 -> -// gas irOptimized: 225692 +// gas irOptimized: 225696 // gas legacy: 227786 // gas legacyOptimized: 223830 // test_zeroed_indicies(uint256): 15 -> -// gas irOptimized: 323700 +// gas irOptimized: 323704 // gas legacy: 326902 // gas legacyOptimized: 321206 // test_zeroed_indicies(uint256): 0xFF -> -// gas irOptimized: 5112496 +// gas irOptimized: 5112500 // gas legacy: 5165874 // gas legacyOptimized: 5062182 diff --git a/test/libsolidity/semanticTests/array/arrays_complex_from_and_to_storage.sol b/test/libsolidity/semanticTests/array/arrays_complex_from_and_to_storage.sol index 715e8a589..95280054a 100644 --- a/test/libsolidity/semanticTests/array/arrays_complex_from_and_to_storage.sol +++ b/test/libsolidity/semanticTests/array/arrays_complex_from_and_to_storage.sol @@ -12,7 +12,7 @@ contract Test { } // ---- // set(uint24[3][]): 0x20, 0x06, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12 -> 0x06 -// gas irOptimized: 186554 +// gas irOptimized: 186557 // gas legacy: 211054 // gas legacyOptimized: 206042 // data(uint256,uint256): 0x02, 0x02 -> 0x09 diff --git a/test/libsolidity/semanticTests/array/bytes_length_member.sol b/test/libsolidity/semanticTests/array/bytes_length_member.sol index 750467a21..0a3c58b3a 100644 --- a/test/libsolidity/semanticTests/array/bytes_length_member.sol +++ b/test/libsolidity/semanticTests/array/bytes_length_member.sol @@ -13,7 +13,7 @@ contract c { // ---- // getLength() -> 0 // set(): 1, 2 -> true -// gas irOptimized: 110392 +// gas irOptimized: 110393 // gas legacy: 110952 -// gas legacyOptimized: 110579 +// gas legacyOptimized: 110576 // getLength() -> 68 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_calldata_storage.sol b/test/libsolidity/semanticTests/array/copying/array_copy_calldata_storage.sol index 7d5219878..80ecd3e1c 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_calldata_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_calldata_storage.sol @@ -20,7 +20,7 @@ contract c { } // ---- // store(uint256[9],uint8[3][]): 21, 22, 23, 24, 25, 26, 27, 28, 29, 0x140, 4, 1, 2, 3, 11, 12, 13, 21, 22, 23, 31, 32, 33 -> 32 -// gas irOptimized: 648319 +// gas irOptimized: 648315 // gas legacy: 694356 // gas legacyOptimized: 693864 // retrieve() -> 9, 28, 9, 28, 4, 3, 32 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_cleanup_uint40.sol b/test/libsolidity/semanticTests/array/copying/array_copy_cleanup_uint40.sol index a06ee7f89..600f00a98 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_cleanup_uint40.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_cleanup_uint40.sol @@ -46,6 +46,6 @@ contract C { } // ---- // f() -> true -// gas irOptimized: 117261 +// gas irOptimized: 117264 // gas legacy: 124660 // gas legacyOptimized: 122801 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_different_packing.sol b/test/libsolidity/semanticTests/array/copying/array_copy_different_packing.sol index f039ce0be..2d6198006 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_different_packing.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_different_packing.sol @@ -18,6 +18,6 @@ contract c { } // ---- // test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x05000000000000000000000000000000000000000000000000 -// gas irOptimized: 208053 +// gas irOptimized: 208074 // gas legacy: 221769 // gas legacyOptimized: 220611 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_nested_array.sol b/test/libsolidity/semanticTests/array/copying/array_copy_nested_array.sol index 5e4adaa49..737e4b32b 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_nested_array.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_nested_array.sol @@ -12,6 +12,6 @@ contract c { } // ---- // test(uint256[2][]): 32, 3, 7, 8, 9, 10, 11, 12 -> 10 -// gas irOptimized: 689654 +// gas irOptimized: 689656 // gas legacy: 686178 // gas legacyOptimized: 685628 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base.sol index 911653b37..d477dc6cf 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base.sol @@ -17,6 +17,6 @@ contract c { } // ---- // test() -> 5, 4 -// gas irOptimized: 205045 +// gas irOptimized: 205044 // gas legacy: 213863 // gas legacyOptimized: 212902 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base_nested.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base_nested.sol index f75338bb7..057119586 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base_nested.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base_nested.sol @@ -21,6 +21,6 @@ contract c { } // ---- // test() -> 3, 4 -// gas irOptimized: 169586 +// gas irOptimized: 169565 // gas legacy: 175424 // gas legacyOptimized: 172535 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_dynamic.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_dynamic.sol index 13cd7ed0c..971469dec 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_dynamic.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_dynamic.sol @@ -11,6 +11,6 @@ contract c { } // ---- // test() -> 9, 4 -// gas irOptimized: 123136 +// gas irOptimized: 123135 // gas legacy: 123567 // gas legacyOptimized: 123202 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover.sol b/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover.sol index 74d2ab909..b2af9191d 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover.sol @@ -17,6 +17,6 @@ contract c { } // ---- // test() -> 0xffffffff, 0x0000000000000000000000000a00090008000700060005000400030002000100, 0x0000000000000000000000000000000000000000000000000000000000000000 -// gas irOptimized: 104534 +// gas irOptimized: 104526 // gas legacy: 166874 // gas legacyOptimized: 145474 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_target_simple.sol b/test/libsolidity/semanticTests/array/copying/array_copy_target_simple.sol index b22905989..db66a5508 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_target_simple.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_target_simple.sol @@ -18,6 +18,6 @@ contract c { } // ---- // test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x0 -// gas irOptimized: 273564 +// gas irOptimized: 273563 // gas legacy: 283666 // gas legacyOptimized: 282023 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_target_simple_2.sol b/test/libsolidity/semanticTests/array/copying/array_copy_target_simple_2.sol index ad4c5818b..bf1e1bc1b 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_target_simple_2.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_target_simple_2.sol @@ -18,6 +18,6 @@ contract c { } // ---- // test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x00 -// gas irOptimized: 233271 +// gas irOptimized: 233255 // gas legacy: 236523 // gas legacyOptimized: 235592 diff --git a/test/libsolidity/semanticTests/array/copying/array_nested_calldata_to_storage.sol b/test/libsolidity/semanticTests/array/copying/array_nested_calldata_to_storage.sol index ad79a5ec5..919e83298 100644 --- a/test/libsolidity/semanticTests/array/copying/array_nested_calldata_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_nested_calldata_to_storage.sol @@ -42,6 +42,6 @@ contract c { // test2(uint256[][2]): 0x20, 0x40, 0x40, 2, 23, 42 -> 2, 65 // gas irOptimized: 157544 // test3(uint256[2][]): 0x20, 2, 23, 42, 23, 42 -> 2, 65 -// gas irOptimized: 134629 +// gas irOptimized: 134634 // test4(uint256[2][2]): 23, 42, 23, 42 -> 65 // gas irOptimized: 111252 diff --git a/test/libsolidity/semanticTests/array/copying/array_nested_memory_to_storage.sol b/test/libsolidity/semanticTests/array/copying/array_nested_memory_to_storage.sol index 1bc50ab80..eb4b1bbb9 100644 --- a/test/libsolidity/semanticTests/array/copying/array_nested_memory_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_nested_memory_to_storage.sol @@ -44,6 +44,6 @@ contract Test { // test1() -> 3 // test2() -> 6 // test3() -> 24 -// gas irOptimized: 141223 +// gas irOptimized: 141225 // gas legacy: 142238 // gas legacyOptimized: 141365 diff --git a/test/libsolidity/semanticTests/array/copying/array_of_struct_calldata_to_storage.sol b/test/libsolidity/semanticTests/array/copying/array_of_struct_calldata_to_storage.sol index b908649a2..546a6e49e 100644 --- a/test/libsolidity/semanticTests/array/copying/array_of_struct_calldata_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_of_struct_calldata_to_storage.sol @@ -17,4 +17,4 @@ contract C { // compileViaYul: true // ---- // f((uint128,uint64,uint128)[]): 0x20, 3, 0, 0, 12, 0, 11, 0, 10, 0, 0 -> 10, 11, 12 -// gas irOptimized: 119691 +// gas irOptimized: 119704 diff --git a/test/libsolidity/semanticTests/array/copying/array_of_struct_memory_to_storage.sol b/test/libsolidity/semanticTests/array/copying/array_of_struct_memory_to_storage.sol index 32deb9e06..38e26e480 100644 --- a/test/libsolidity/semanticTests/array/copying/array_of_struct_memory_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_of_struct_memory_to_storage.sol @@ -19,4 +19,4 @@ contract C { // compileViaYul: true // ---- // f() -> 10, 11, 12 -// gas irOptimized: 118360 +// gas irOptimized: 118362 diff --git a/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_memory_to_storage.sol b/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_memory_to_storage.sol index a38848294..510e7c9a4 100644 --- a/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_memory_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_memory_to_storage.sol @@ -26,4 +26,4 @@ contract C { // compileViaYul: true // ---- // f() -> 3, 3, 3, 1 -// gas irOptimized: 181894 +// gas irOptimized: 181890 diff --git a/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol b/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol index c20d536e2..19e5ddebd 100644 --- a/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol +++ b/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol @@ -7,11 +7,11 @@ contract c { // set(uint256): 1, 2 -> true // gas irOptimized: 110558 // gas legacy: 111312 -// gas legacyOptimized: 110744 +// gas legacyOptimized: 110741 // set(uint256): 2, 2, 3, 4, 5 -> true // gas irOptimized: 177509 // gas legacy: 178314 -// gas legacyOptimized: 177719 +// gas legacyOptimized: 177716 // storageEmpty -> 0 // copy(uint256,uint256): 1, 2 -> true // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/array/copying/bytes_storage_to_storage.sol b/test/libsolidity/semanticTests/array/copying/bytes_storage_to_storage.sol index 4b91f666c..968f637a4 100644 --- a/test/libsolidity/semanticTests/array/copying/bytes_storage_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/bytes_storage_to_storage.sol @@ -17,25 +17,25 @@ contract c { // ---- // f(uint256): 0 -> 0x20, 0x00 // f(uint256): 31 -> 0x20, 0x1f, 0x0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e00 -// gas irOptimized: 109839 +// gas irOptimized: 109219 // gas legacy: 123948 // gas legacyOptimized: 118948 // f(uint256): 32 -> 0x20, 0x20, 1780731860627700044960722568376592200742329637303199754547598369979440671 -// gas irOptimized: 124049 +// gas irOptimized: 123858 // gas legacy: 140362 -// gas legacyOptimized: 135386 +// gas legacyOptimized: 135384 // f(uint256): 33 -> 0x20, 33, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x2000000000000000000000000000000000000000000000000000000000000000 -// gas irOptimized: 130665 +// gas irOptimized: 130468 // gas legacy: 147916 -// gas legacyOptimized: 142278 +// gas legacyOptimized: 142276 // f(uint256): 63 -> 0x20, 0x3f, 1780731860627700044960722568376592200742329637303199754547598369979440671, 14532552714582660066924456880521368950258152170031413196862950297402215316992 -// gas irOptimized: 139545 +// gas irOptimized: 139168 // gas legacy: 171136 -// gas legacyOptimized: 161538 +// gas legacyOptimized: 161536 // f(uint256): 12 -> 0x20, 0x0c, 0x0102030405060708090a0b0000000000000000000000000000000000000000 // gas legacy: 59345 // gas legacyOptimized: 57279 // f(uint256): 129 -> 0x20, 0x81, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f, 29063324697304692433803953038474361308315562010425523193971352996434451193439, 0x606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f, -57896044618658097711785492504343953926634992332820282019728792003956564819968 -// gas irOptimized: 442421 +// gas irOptimized: 441648 // gas legacy: 505021 -// gas legacyOptimized: 486997 +// gas legacyOptimized: 486995 diff --git a/test/libsolidity/semanticTests/array/copying/calldata_array_dynamic_to_storage.sol b/test/libsolidity/semanticTests/array/copying/calldata_array_dynamic_to_storage.sol index 2dfde7afa..706232d58 100644 --- a/test/libsolidity/semanticTests/array/copying/calldata_array_dynamic_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/calldata_array_dynamic_to_storage.sol @@ -9,6 +9,6 @@ contract C { } // ---- // f(uint256[]): 0x20, 0x03, 0x1, 0x2, 0x3 -> 0x1 -// gas irOptimized: 110962 +// gas irOptimized: 110968 // gas legacy: 111551 // gas legacyOptimized: 111339 diff --git a/test/libsolidity/semanticTests/array/copying/calldata_array_to_mapping.sol b/test/libsolidity/semanticTests/array/copying/calldata_array_to_mapping.sol index 64b8cd930..e6bf7671a 100644 --- a/test/libsolidity/semanticTests/array/copying/calldata_array_to_mapping.sol +++ b/test/libsolidity/semanticTests/array/copying/calldata_array_to_mapping.sol @@ -14,4 +14,4 @@ contract C { // compileViaYul: true // ---- // from_calldata(uint8[][]): 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 -// gas irOptimized: 139685 +// gas irOptimized: 139683 diff --git a/test/libsolidity/semanticTests/array/copying/copy_byte_array_in_struct_to_storage.sol b/test/libsolidity/semanticTests/array/copying/copy_byte_array_in_struct_to_storage.sol index fdcc18835..5482f615f 100644 --- a/test/libsolidity/semanticTests/array/copying/copy_byte_array_in_struct_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/copy_byte_array_in_struct_to_storage.sol @@ -35,11 +35,11 @@ contract C { } // ---- // f() -> 0x40, 0x80, 6, 0x6162636465660000000000000000000000000000000000000000000000000000, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000 -// gas irOptimized: 179734 +// gas irOptimized: 179750 // gas legacy: 181001 // gas legacyOptimized: 180018 // g() -> 0x40, 0xc0, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000, 0x11, 0x3132333435363738393233343536373839000000000000000000000000000000 -// gas irOptimized: 106663 +// gas irOptimized: 106679 // gas legacy: 109720 // gas legacyOptimized: 106932 // h() -> 0x40, 0x60, 0x00, 0x00 diff --git a/test/libsolidity/semanticTests/array/copying/copy_function_internal_storage_array.sol b/test/libsolidity/semanticTests/array/copying/copy_function_internal_storage_array.sol index 8ee78ab9b..fb2177901 100644 --- a/test/libsolidity/semanticTests/array/copying/copy_function_internal_storage_array.sol +++ b/test/libsolidity/semanticTests/array/copying/copy_function_internal_storage_array.sol @@ -15,6 +15,6 @@ contract C { } // ---- // test() -> 7 -// gas irOptimized: 122456 +// gas irOptimized: 122455 // gas legacy: 205176 // gas legacyOptimized: 204971 diff --git a/test/libsolidity/semanticTests/array/copying/copy_removes_bytes_data.sol b/test/libsolidity/semanticTests/array/copying/copy_removes_bytes_data.sol index 752dd6494..85c396fb4 100644 --- a/test/libsolidity/semanticTests/array/copying/copy_removes_bytes_data.sol +++ b/test/libsolidity/semanticTests/array/copying/copy_removes_bytes_data.sol @@ -7,9 +7,9 @@ contract c { } // ---- // set(): 1, 2, 3, 4, 5 -> true -// gas irOptimized: 177375 +// gas irOptimized: 177376 // gas legacy: 177954 -// gas legacyOptimized: 177553 +// gas legacyOptimized: 177550 // storageEmpty -> 0 // reset() -> true // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/copying/copying_bytes_multiassign.sol b/test/libsolidity/semanticTests/array/copying/copying_bytes_multiassign.sol index 4bf021094..58b5dd045 100644 --- a/test/libsolidity/semanticTests/array/copying/copying_bytes_multiassign.sol +++ b/test/libsolidity/semanticTests/array/copying/copying_bytes_multiassign.sol @@ -20,7 +20,7 @@ contract sender { // (): 7 -> // gas irOptimized: 110831 // gas legacy: 111388 -// gas legacyOptimized: 111070 +// gas legacyOptimized: 111065 // val() -> 0 // forward(bool): true -> true // val() -> 0x80 diff --git a/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_calldata_to_storage.sol b/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_calldata_to_storage.sol index 0562be2e2..ea5625f21 100644 --- a/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_calldata_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_calldata_to_storage.sol @@ -31,8 +31,8 @@ contract C { // compileViaYul: true // ---- // test1((uint8[],uint8[2])[][][]): 0x20, 1, 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -> 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -// gas irOptimized: 327847 +// gas irOptimized: 327874 // test2((uint8[],uint8[2])[][1][]): 0x20, 2, 0x40, 0x0160, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13, 0x20, 1, 0x20, 0x60, 31, 37, 2, 23, 29 -> 0x20, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13 -// gas irOptimized: 140870 +// gas irOptimized: 140879 // test3((uint8[],uint8[2])[1][][2]): 0x20, 0x40, 0x60, 0, 2, 0x40, 288, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -> 0x20, 2, 0x40, 288, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -// gas irOptimized: 188517 +// gas irOptimized: 188535 diff --git a/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_memory_to_storage.sol b/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_memory_to_storage.sol index 74dfa2d7a..96f24f77d 100644 --- a/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_memory_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_memory_to_storage.sol @@ -31,8 +31,8 @@ contract C { // compileViaYul: true // ---- // test1((uint8[],uint8[2])[][][]): 0x20, 1, 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -> 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -// gas irOptimized: 332666 +// gas irOptimized: 332660 // test2((uint8[],uint8[2])[][1][]): 0x20, 2, 0x40, 0x0160, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13, 0x20, 1, 0x20, 0x60, 31, 37, 2, 23, 29 -> 0x20, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13 -// gas irOptimized: 145152 +// gas irOptimized: 145150 // test3((uint8[],uint8[2])[1][][2]): 0x20, 0x40, 0x60, 0, 2, 0x40, 288, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -> 0x20, 2, 0x40, 288, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -// gas irOptimized: 192602 +// gas irOptimized: 192598 diff --git a/test/libsolidity/semanticTests/array/copying/function_type_array_to_storage.sol b/test/libsolidity/semanticTests/array/copying/function_type_array_to_storage.sol index a357147c5..275a0fca1 100644 --- a/test/libsolidity/semanticTests/array/copying/function_type_array_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/function_type_array_to_storage.sol @@ -46,11 +46,11 @@ contract C { } // ---- // test() -> 0x20, 0x14, "[a called][b called]" -// gas irOptimized: 116633 +// gas irOptimized: 116645 // gas legacy: 118936 // gas legacyOptimized: 116975 // test2() -> 0x20, 0x14, "[b called][a called]" // test3() -> 0x20, 0x14, "[b called][a called]" -// gas irOptimized: 103243 +// gas irOptimized: 103246 // gas legacy: 102745 // gas legacyOptimized: 101669 diff --git a/test/libsolidity/semanticTests/array/copying/memory_dyn_2d_bytes_to_storage.sol b/test/libsolidity/semanticTests/array/copying/memory_dyn_2d_bytes_to_storage.sol index 1dd321d45..599d23c80 100644 --- a/test/libsolidity/semanticTests/array/copying/memory_dyn_2d_bytes_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/memory_dyn_2d_bytes_to_storage.sol @@ -18,6 +18,6 @@ contract C { } // ---- // f() -> 3 -// gas irOptimized: 128264 +// gas irOptimized: 128094 // gas legacy: 130584 // gas legacyOptimized: 129028 diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_element_storage_to_storage.sol b/test/libsolidity/semanticTests/array/copying/nested_array_element_storage_to_storage.sol index ad8cbbb2a..f85b8eb9f 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_element_storage_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_element_storage_to_storage.sol @@ -70,7 +70,7 @@ contract C { } // ---- // test1() -> -// gas irOptimized: 150460 +// gas irOptimized: 150468 // gas legacy: 150949 // gas legacyOptimized: 150906 // test2() -> FAILURE diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_calldata_to_storage.sol b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_calldata_to_storage.sol index 27046de2b..844a86304 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_calldata_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_calldata_to_storage.sol @@ -29,8 +29,8 @@ contract C { // compileViaYul: true // ---- // test1((uint8[],uint8[2])[][]): 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -> 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -// gas irOptimized: 304720 +// gas irOptimized: 304747 // test2((uint8[],uint8[2])[][1]): 0x20, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13 -> 0x20, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13 -// gas irOptimized: 116455 +// gas irOptimized: 116464 // test3((uint8[],uint8[2])[1][]): 0x20, 2, 0x40, 0x0120, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -> 0x20, 2, 0x40, 0x0120, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -// gas irOptimized: 188006 +// gas irOptimized: 188024 diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_memory_to_storage.sol b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_memory_to_storage.sol index 2ebf29221..209a6ee69 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_memory_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_memory_to_storage.sol @@ -29,8 +29,8 @@ contract C { // compileViaYul: true // ---- // test1((uint8[],uint8[2])[][]): 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -> 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -// gas irOptimized: 309077 +// gas irOptimized: 309074 // test2((uint8[],uint8[2])[][1]): 0x20, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13 -> 0x20, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13 -// gas irOptimized: 118258 +// gas irOptimized: 118256 // test3((uint8[],uint8[2])[1][]): 0x20, 2, 0x40, 0x0120, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -> 0x20, 2, 0x40, 0x0120, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -// gas irOptimized: 190997 +// gas irOptimized: 190993 diff --git a/test/libsolidity/semanticTests/array/copying/nested_dynamic_array_element_calldata_to_storage.sol b/test/libsolidity/semanticTests/array/copying/nested_dynamic_array_element_calldata_to_storage.sol index c32f7bf6b..dfb7c27ac 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_dynamic_array_element_calldata_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_dynamic_array_element_calldata_to_storage.sol @@ -32,5 +32,5 @@ contract C { // test(uint8[][][]): 0x20, 2, 0x40, 0x60, 0, 2, 0x40, 0x80, 1, 7, 2, 8, 9 // gas irOptimized: 138040 // test2(uint8[][]): 0x20, 2, 0x40, 0x80, 1, 7, 2, 8, 9 -// gas irOptimized: 164248 +// gas irOptimized: 164246 // gas legacyOptimized: 120228 diff --git a/test/libsolidity/semanticTests/array/copying/storage_memory_nested.sol b/test/libsolidity/semanticTests/array/copying/storage_memory_nested.sol index f6079f1a8..7c2f0e55e 100644 --- a/test/libsolidity/semanticTests/array/copying/storage_memory_nested.sol +++ b/test/libsolidity/semanticTests/array/copying/storage_memory_nested.sol @@ -17,6 +17,6 @@ contract C { } // ---- // f() -> 1, 2, 3, 4, 5, 6, 7 -// gas irOptimized: 205881 +// gas irOptimized: 205879 // gas legacy: 212237 // gas legacyOptimized: 211425 diff --git a/test/libsolidity/semanticTests/array/copying/storage_memory_nested_bytes.sol b/test/libsolidity/semanticTests/array/copying/storage_memory_nested_bytes.sol index d394b6582..211477c55 100644 --- a/test/libsolidity/semanticTests/array/copying/storage_memory_nested_bytes.sol +++ b/test/libsolidity/semanticTests/array/copying/storage_memory_nested_bytes.sol @@ -11,6 +11,6 @@ contract C { } // ---- // f() -> 0x20, 0x02, 0x40, 0x80, 3, 0x6162630000000000000000000000000000000000000000000000000000000000, 0x99, 44048183304486788312148433451363384677562265908331949128489393215789685032262, 32241931068525137014058842823026578386641954854143559838526554899205067598957, 49951309422467613961193228765530489307475214998374779756599339590522149884499, 0x54555658595a6162636465666768696a6b6c6d6e6f707172737475767778797a, 0x4142434445464748494a4b4c4d4e4f5051525354555658595a00000000000000 -// gas irOptimized: 202735 +// gas irOptimized: 202731 // gas legacy: 204798 // gas legacyOptimized: 203357 diff --git a/test/libsolidity/semanticTests/array/copying/storage_memory_nested_from_pointer.sol b/test/libsolidity/semanticTests/array/copying/storage_memory_nested_from_pointer.sol index ce4e31769..cda6d129a 100644 --- a/test/libsolidity/semanticTests/array/copying/storage_memory_nested_from_pointer.sol +++ b/test/libsolidity/semanticTests/array/copying/storage_memory_nested_from_pointer.sol @@ -18,6 +18,6 @@ contract C { } // ---- // f() -> 1, 2, 3, 4, 5, 6, 7 -// gas irOptimized: 205881 +// gas irOptimized: 205879 // gas legacy: 212242 // gas legacyOptimized: 211430 diff --git a/test/libsolidity/semanticTests/array/copying/storage_memory_packed_dyn.sol b/test/libsolidity/semanticTests/array/copying/storage_memory_packed_dyn.sol index bfda8d7af..5617e2fcc 100644 --- a/test/libsolidity/semanticTests/array/copying/storage_memory_packed_dyn.sol +++ b/test/libsolidity/semanticTests/array/copying/storage_memory_packed_dyn.sol @@ -13,6 +13,6 @@ contract C { } // ---- // f() -> 2, 3, 4 -// gas irOptimized: 109698 +// gas irOptimized: 109702 // gas legacy: 126129 // gas legacyOptimized: 120622 diff --git a/test/libsolidity/semanticTests/array/create_memory_array.sol b/test/libsolidity/semanticTests/array/create_memory_array.sol index ecfecb9c0..d507f080f 100644 --- a/test/libsolidity/semanticTests/array/create_memory_array.sol +++ b/test/libsolidity/semanticTests/array/create_memory_array.sol @@ -18,6 +18,6 @@ contract C { } // ---- // f() -> "A", 8, 4, "B" -// gas irOptimized: 125819 +// gas irOptimized: 125822 // gas legacy: 121382 // gas legacyOptimized: 115488 diff --git a/test/libsolidity/semanticTests/array/delete/bytes_delete_element.sol b/test/libsolidity/semanticTests/array/delete/bytes_delete_element.sol index 499289820..146206ae0 100644 --- a/test/libsolidity/semanticTests/array/delete/bytes_delete_element.sol +++ b/test/libsolidity/semanticTests/array/delete/bytes_delete_element.sol @@ -16,6 +16,6 @@ contract c { } // ---- // test1() -> true -// gas irOptimized: 206386 +// gas irOptimized: 206388 // gas legacy: 254056 // gas legacyOptimized: 246892 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 79c0f8fbf..dd9098573 100644 --- a/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol +++ b/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol @@ -18,6 +18,6 @@ contract B { } // ---- // f() -> 2, 3, 4, 5, 6, 1000, 1001, 1002, 1003, 1004 -// gas irOptimized: 114204 +// gas irOptimized: 114404 // gas legacy: 230001 // gas legacyOptimized: 130637 diff --git a/test/libsolidity/semanticTests/array/function_array_cross_calls.sol b/test/libsolidity/semanticTests/array/function_array_cross_calls.sol index e91608966..fe72091af 100644 --- a/test/libsolidity/semanticTests/array/function_array_cross_calls.sol +++ b/test/libsolidity/semanticTests/array/function_array_cross_calls.sol @@ -42,6 +42,6 @@ contract C { } // ---- // test() -> 5, 6, 7 -// gas irOptimized: 256077 +// gas irOptimized: 256288 // gas legacy: 441556 // gas legacyOptimized: 279321 diff --git a/test/libsolidity/semanticTests/array/invalid_encoding_for_storage_byte_array.sol b/test/libsolidity/semanticTests/array/invalid_encoding_for_storage_byte_array.sol index 4d8422ecd..ddf67aa90 100644 --- a/test/libsolidity/semanticTests/array/invalid_encoding_for_storage_byte_array.sol +++ b/test/libsolidity/semanticTests/array/invalid_encoding_for_storage_byte_array.sol @@ -40,9 +40,9 @@ contract C { // copyFromStorageShort() // x() -> 0x20, 3, 0x6162630000000000000000000000000000000000000000000000000000000000 // copyFromStorageLong() -// gas irOptimized: 121104 +// gas irOptimized: 121106 // gas legacy: 121904 -// gas legacyOptimized: 121400 +// gas legacyOptimized: 121398 // x() -> 0x20, 0x25, 0x3132333435363738393031323334353637383930313233343536373839303132, 0x3334353637000000000000000000000000000000000000000000000000000000 // copyToStorage() // x() -> 0x20, 0x25, 0x3132333435363738393031323334353637383930313233343536373839303132, 0x3334353637000000000000000000000000000000000000000000000000000000 diff --git a/test/libsolidity/semanticTests/array/pop/array_pop_uint16_transition.sol b/test/libsolidity/semanticTests/array/pop/array_pop_uint16_transition.sol index a999ba513..1b69ab336 100644 --- a/test/libsolidity/semanticTests/array/pop/array_pop_uint16_transition.sol +++ b/test/libsolidity/semanticTests/array/pop/array_pop_uint16_transition.sol @@ -18,7 +18,7 @@ contract c { } // ---- // test() -> 38, 28, 18 -// gas irOptimized: 148543 +// gas irOptimized: 148538 // gas legacy: 151184 // gas legacyOptimized: 142418 // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/pop/array_pop_uint24_transition.sol b/test/libsolidity/semanticTests/array/pop/array_pop_uint24_transition.sol index c28e1b91c..d2e5995c0 100644 --- a/test/libsolidity/semanticTests/array/pop/array_pop_uint24_transition.sol +++ b/test/libsolidity/semanticTests/array/pop/array_pop_uint24_transition.sol @@ -18,7 +18,7 @@ contract c { } // ---- // test() -> 20, 10 -// gas irOptimized: 126072 +// gas irOptimized: 126068 // gas legacy: 127216 // gas legacyOptimized: 122224 // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/pop/byte_array_pop_masking_long.sol b/test/libsolidity/semanticTests/array/pop/byte_array_pop_masking_long.sol index 07bad3a26..95156f5c6 100644 --- a/test/libsolidity/semanticTests/array/pop/byte_array_pop_masking_long.sol +++ b/test/libsolidity/semanticTests/array/pop/byte_array_pop_masking_long.sol @@ -9,6 +9,6 @@ contract c { } // ---- // test() -> 0x20, 33, 0x303030303030303030303030303030303030303030303030303030303030303, 0x0300000000000000000000000000000000000000000000000000000000000000 -// gas irOptimized: 107976 +// gas irOptimized: 107962 // gas legacy: 125420 // gas legacyOptimized: 122472 diff --git a/test/libsolidity/semanticTests/array/push/array_push_nested_from_calldata.sol b/test/libsolidity/semanticTests/array/push/array_push_nested_from_calldata.sol index 66af798b9..a010a9938 100644 --- a/test/libsolidity/semanticTests/array/push/array_push_nested_from_calldata.sol +++ b/test/libsolidity/semanticTests/array/push/array_push_nested_from_calldata.sol @@ -12,6 +12,6 @@ contract C { } // ---- // f(uint120[]): 0x20, 3, 1, 2, 3 -> 1 -// gas irOptimized: 112813 +// gas irOptimized: 112812 // gas legacy: 113659 // gas legacyOptimized: 113482 diff --git a/test/libsolidity/semanticTests/array/push/array_push_struct.sol b/test/libsolidity/semanticTests/array/push/array_push_struct.sol index bc09edeb5..06c5db88b 100644 --- a/test/libsolidity/semanticTests/array/push/array_push_struct.sol +++ b/test/libsolidity/semanticTests/array/push/array_push_struct.sol @@ -20,6 +20,6 @@ contract c { } // ---- // test() -> 2, 3, 4, 5 -// gas irOptimized: 135082 +// gas irOptimized: 135103 // gas legacy: 147443 // gas legacyOptimized: 146434 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 bce81a868..4a33f816d 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 @@ -16,6 +16,6 @@ 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: 137031 +// gas irOptimized: 137061 // gas legacy: 142423 -// gas legacyOptimized: 137993 +// gas legacyOptimized: 137991 diff --git a/test/libsolidity/semanticTests/array/push/nested_bytes_push.sol b/test/libsolidity/semanticTests/array/push/nested_bytes_push.sol index a21e1ba21..30ed47920 100644 --- a/test/libsolidity/semanticTests/array/push/nested_bytes_push.sol +++ b/test/libsolidity/semanticTests/array/push/nested_bytes_push.sol @@ -13,6 +13,6 @@ contract C { } // ---- // f() -> -// gas irOptimized: 179110 +// gas irOptimized: 179112 // gas legacy: 181014 // gas legacyOptimized: 180422 diff --git a/test/libsolidity/semanticTests/array/push/push_no_args_bytes.sol b/test/libsolidity/semanticTests/array/push/push_no_args_bytes.sol index 162f49817..860c74337 100644 --- a/test/libsolidity/semanticTests/array/push/push_no_args_bytes.sol +++ b/test/libsolidity/semanticTests/array/push/push_no_args_bytes.sol @@ -21,7 +21,7 @@ contract C { // ---- // l() -> 0 // g(uint256): 70 -> -// gas irOptimized: 182707 +// gas irOptimized: 182328 // gas legacy: 183445 // gas legacyOptimized: 178995 // l() -> 70 diff --git a/test/libsolidity/semanticTests/byte_array_to_storage_cleanup.sol b/test/libsolidity/semanticTests/byte_array_to_storage_cleanup.sol index 95d3b916f..dc77f0dff 100644 --- a/test/libsolidity/semanticTests/byte_array_to_storage_cleanup.sol +++ b/test/libsolidity/semanticTests/byte_array_to_storage_cleanup.sol @@ -28,9 +28,9 @@ contract C { // compileViaYul: also // ---- // constructor() -> -// gas irOptimized: 442530 +// gas irOptimized: 443406 // gas legacy: 711299 -// gas legacyOptimized: 481296 +// gas legacyOptimized: 482382 // h() -> 0x20, 0x40, 0x00, 0 // ~ emit ev(uint256[],uint256): 0x40, 0x21, 0x02, 0x00, 0x00 // g() -> 0x20, 0x40, 0, 0x00 diff --git a/test/libsolidity/semanticTests/calldata/copy_from_calldata_removes_bytes_data.sol b/test/libsolidity/semanticTests/calldata/copy_from_calldata_removes_bytes_data.sol index c87f6bfcf..aedf5ada4 100644 --- a/test/libsolidity/semanticTests/calldata/copy_from_calldata_removes_bytes_data.sol +++ b/test/libsolidity/semanticTests/calldata/copy_from_calldata_removes_bytes_data.sol @@ -9,9 +9,9 @@ contract c { // EVMVersion: >=byzantium // ---- // (): 1, 2, 3, 4, 5 -> -// gas irOptimized: 155131 +// gas irOptimized: 155130 // gas legacy: 155473 -// gas legacyOptimized: 155298 +// gas legacyOptimized: 155295 // checkIfDataIsEmpty() -> false // sendMessage() -> true, 0x40, 0 // checkIfDataIsEmpty() -> true diff --git a/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol b/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol index f9038fb76..3d9c1ffec 100644 --- a/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol +++ b/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol @@ -24,6 +24,6 @@ contract Creator { } // ---- // f(uint256,address[]): 7, 0x40, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 -> 7, 8 -// gas irOptimized: 424508 +// gas irOptimized: 424526 // gas legacy: 581443 -// gas legacyOptimized: 444588 +// gas legacyOptimized: 444599 diff --git a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol index 3361fa310..067a64e0e 100644 --- a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol +++ b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol @@ -24,6 +24,6 @@ contract Creator { } // ---- // f(uint256,bytes): 7, 0x40, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" -> 7, "h" -// gas irOptimized: 275487 +// gas irOptimized: 275102 // gas legacy: 418462 -// gas legacyOptimized: 291760 +// gas legacyOptimized: 291960 diff --git a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol index b77793c0f..0665cb807 100644 --- a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol +++ b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol @@ -8,8 +8,8 @@ contract Test { } // ---- // constructor(): 7, 0x40, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" -> -// gas irOptimized: 268145 +// gas irOptimized: 269225 // gas legacy: 311324 -// gas legacyOptimized: 258388 +// gas legacyOptimized: 258604 // m_x() -> 7 // m_s() -> 0x20, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" diff --git a/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol b/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol index 4698d26ee..22acd1cc3 100644 --- a/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol +++ b/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol @@ -9,9 +9,9 @@ contract C { } // ---- // constructor(): 1, 2, 3, 4 -> -// gas irOptimized: 170999 +// gas irOptimized: 171015 // gas legacy: 218378 -// gas legacyOptimized: 176195 +// gas legacyOptimized: 176211 // a() -> 1 // b(uint256): 0 -> 2 // b(uint256): 1 -> 3 diff --git a/test/libsolidity/semanticTests/events/event_emit_from_other_contract.sol b/test/libsolidity/semanticTests/events/event_emit_from_other_contract.sol index 5b8827ce7..f8b5141b9 100644 --- a/test/libsolidity/semanticTests/events/event_emit_from_other_contract.sol +++ b/test/libsolidity/semanticTests/events/event_emit_from_other_contract.sol @@ -15,7 +15,7 @@ contract C { } // ---- // constructor() -> -// gas irOptimized: 165398 +// gas irOptimized: 165386 // gas legacy: 244800 // gas legacyOptimized: 171615 // deposit(bytes32), 18 wei: 0x1234 -> diff --git a/test/libsolidity/semanticTests/events/event_indexed_string.sol b/test/libsolidity/semanticTests/events/event_indexed_string.sol index dfd9dd399..a503d44f5 100644 --- a/test/libsolidity/semanticTests/events/event_indexed_string.sol +++ b/test/libsolidity/semanticTests/events/event_indexed_string.sol @@ -19,4 +19,4 @@ contract C { // ~ emit E(string,uint256[4]): #0xa7fb06bb999a5eb9aff9e0779953f4e1e4ce58044936c2f51c7fb879b85c08bd, #0xe755d8cc1a8cde16a2a31160dcd8017ac32d7e2f13215b29a23cdae40a78aa81 // gas irOptimized: 330920 // gas legacy: 387608 -// gas legacyOptimized: 373772 +// gas legacyOptimized: 373771 diff --git a/test/libsolidity/semanticTests/externalContracts/base64.sol b/test/libsolidity/semanticTests/externalContracts/base64.sol index fd7288c8f..1e366f75f 100644 --- a/test/libsolidity/semanticTests/externalContracts/base64.sol +++ b/test/libsolidity/semanticTests/externalContracts/base64.sol @@ -33,9 +33,9 @@ contract test { // EVMVersion: >=constantinople // ---- // constructor() -// gas irOptimized: 406907 +// gas irOptimized: 406679 // gas legacy: 737652 -// gas legacyOptimized: 526820 +// gas legacyOptimized: 527036 // encode_inline_asm(bytes): 0x20, 0 -> 0x20, 0 // encode_inline_asm(bytes): 0x20, 1, "f" -> 0x20, 4, "Zg==" // encode_inline_asm(bytes): 0x20, 2, "fo" -> 0x20, 4, "Zm8=" @@ -55,6 +55,6 @@ contract test { // gas legacy: 1672031 // gas legacyOptimized: 1199031 // encode_no_asm_large() -// gas irOptimized: 3276081 +// gas irOptimized: 3257081 // gas legacy: 4705075 // gas legacyOptimized: 2890075 diff --git a/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol b/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol index 5e815fad4..e51eb414a 100644 --- a/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol +++ b/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol @@ -176,7 +176,7 @@ contract DepositContract is IDepositContract, ERC165 { } // ---- // constructor() -// gas irOptimized: 1391860 +// gas irOptimized: 1397699 // gas legacy: 2391952 // gas legacyOptimized: 1752320 // supportsInterface(bytes4): 0x0 -> 0 @@ -184,27 +184,27 @@ contract DepositContract is IDepositContract, ERC165 { // supportsInterface(bytes4): 0x01ffc9a700000000000000000000000000000000000000000000000000000000 -> true # ERC-165 id # // supportsInterface(bytes4): 0x8564090700000000000000000000000000000000000000000000000000000000 -> true # the deposit interface id # // get_deposit_root() -> 0xd70a234731285c6804c2a4f56711ddb8c82c99740f207854891028af34e27e5e -// gas irOptimized: 116864 +// gas irOptimized: 116863 // gas legacy: 151981 // gas legacyOptimized: 124447 // get_deposit_count() -> 0x20, 8, 0 # TODO: check balance and logs after each deposit # // deposit(bytes,bytes,bytes,bytes32), 32 ether: 0 -> FAILURE # Empty input # // get_deposit_root() -> 0xd70a234731285c6804c2a4f56711ddb8c82c99740f207854891028af34e27e5e -// gas irOptimized: 116864 +// gas irOptimized: 116863 // gas legacy: 151981 // gas legacyOptimized: 124447 // get_deposit_count() -> 0x20, 8, 0 // deposit(bytes,bytes,bytes,bytes32), 1 ether: 0x80, 0xe0, 0x120, 0xaa4a8d0b7d9077248630f1a4701ae9764e42271d7f22b7838778411857fd349e, 0x30, 0x933ad9491b62059dd065b560d256d8957a8c402cc6e8d8ee7290ae11e8f73292, 0x67a8811c397529dac52ae1342ba58c9500000000000000000000000000000000, 0x20, 0x00f50428677c60f997aadeab24aabf7fceaef491c96a52b463ae91f95611cf71, 0x60, 0xa29d01cc8c6296a8150e515b5995390ef841dc18948aa3e79be6d7c1851b4cbb, 0x5d6ff49fa70b9c782399506a22a85193151b9b691245cebafd2063012443c132, 0x4b6c36debaedefb7b2d71b0503ffdc00150aaffd42e63358238ec888901738b8 -> # txhash: 0x7085c586686d666e8bb6e9477a0f0b09565b2060a11f1c4209d3a52295033832 # // ~ emit DepositEvent(bytes,bytes,bytes,bytes,bytes): 0xa0, 0x0100, 0x0140, 0x0180, 0x0200, 0x30, 0x933ad9491b62059dd065b560d256d8957a8c402cc6e8d8ee7290ae11e8f73292, 0x67a8811c397529dac52ae1342ba58c9500000000000000000000000000000000, 0x20, 0xf50428677c60f997aadeab24aabf7fceaef491c96a52b463ae91f95611cf71, 0x08, 0xca9a3b00000000000000000000000000000000000000000000000000000000, 0x60, 0xa29d01cc8c6296a8150e515b5995390ef841dc18948aa3e79be6d7c1851b4cbb, 0x5d6ff49fa70b9c782399506a22a85193151b9b691245cebafd2063012443c132, 0x4b6c36debaedefb7b2d71b0503ffdc00150aaffd42e63358238ec888901738b8, 0x08, 0x00 // get_deposit_root() -> 0x2089653123d9c721215120b6db6738ba273bbc5228ac093b1f983badcdc8a438 -// gas irOptimized: 116849 +// gas irOptimized: 116848 // gas legacy: 151990 // gas legacyOptimized: 124459 // get_deposit_count() -> 0x20, 8, 0x0100000000000000000000000000000000000000000000000000000000000000 // deposit(bytes,bytes,bytes,bytes32), 32 ether: 0x80, 0xe0, 0x120, 0xdbd986dc85ceb382708cf90a3500f500f0a393c5ece76963ac3ed72eccd2c301, 0x30, 0xb2ce0f79f90e7b3a113ca5783c65756f96c4b4673c2b5c1eb4efc22280259441, 0x06d601211e8866dc5b50dc48a244dd7c00000000000000000000000000000000, 0x20, 0x00344b6c73f71b11c56aba0d01b7d8ad83559f209d0a4101a515f6ad54c89771, 0x60, 0x945caaf82d18e78c033927d51f452ebcd76524497b91d7a11219cb3db6a1d369, 0x7595fc095ce489e46b2ef129591f2f6d079be4faaf345a02c5eb133c072e7c56, 0x0c6c3617eee66b4b878165c502357d49485326bc6b31bc96873f308c8f19c09d -> # txhash: 0x404d8e109822ce448e68f45216c12cb051b784d068fbe98317ab8e50c58304ac # // ~ emit DepositEvent(bytes,bytes,bytes,bytes,bytes): 0xa0, 0x0100, 0x0140, 0x0180, 0x0200, 0x30, 0xb2ce0f79f90e7b3a113ca5783c65756f96c4b4673c2b5c1eb4efc22280259441, 0x06d601211e8866dc5b50dc48a244dd7c00000000000000000000000000000000, 0x20, 0x344b6c73f71b11c56aba0d01b7d8ad83559f209d0a4101a515f6ad54c89771, 0x08, 0x40597307000000000000000000000000000000000000000000000000000000, 0x60, 0x945caaf82d18e78c033927d51f452ebcd76524497b91d7a11219cb3db6a1d369, 0x7595fc095ce489e46b2ef129591f2f6d079be4faaf345a02c5eb133c072e7c56, 0x0c6c3617eee66b4b878165c502357d49485326bc6b31bc96873f308c8f19c09d, 0x08, 0x0100000000000000000000000000000000000000000000000000000000000000 // get_deposit_root() -> 0x40255975859377d912c53aa853245ebd939bdd2b33a28e084babdcc1ed8238ee -// gas irOptimized: 116849 +// gas irOptimized: 116848 // gas legacy: 151990 // gas legacyOptimized: 124459 // get_deposit_count() -> 0x20, 8, 0x0200000000000000000000000000000000000000000000000000000000000000 diff --git a/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol b/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol index 8bb2b37c4..8d0a99382 100644 --- a/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol +++ b/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol @@ -48,7 +48,7 @@ contract test { } // ---- // constructor() -// gas irOptimized: 1849535 +// gas irOptimized: 1847920 // gas legacy: 2430726 // gas legacyOptimized: 1854979 // div(int256,int256): 3141592653589793238, 88714123 -> 35412542528203691288251815328 diff --git a/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol b/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol index 1ecfc154a..2442493d7 100644 --- a/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol +++ b/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol @@ -48,7 +48,7 @@ contract test { } // ---- // constructor() -// gas irOptimized: 1723666 +// gas irOptimized: 1722598 // gas legacy: 2210160 // gas legacyOptimized: 1734152 // div(uint256,uint256): 3141592653589793238, 88714123 -> 35412542528203691288251815328 diff --git a/test/libsolidity/semanticTests/externalContracts/strings.sol b/test/libsolidity/semanticTests/externalContracts/strings.sol index 41820c8a4..817f6702e 100644 --- a/test/libsolidity/semanticTests/externalContracts/strings.sol +++ b/test/libsolidity/semanticTests/externalContracts/strings.sol @@ -49,9 +49,9 @@ contract test { } // ---- // constructor() -// gas irOptimized: 633020 +// gas irOptimized: 634316 // gas legacy: 1065857 -// gas legacyOptimized: 725207 +// gas legacyOptimized: 725423 // toSlice(string): 0x20, 11, "hello world" -> 11, 0xa0 // gas irOptimized: 22660 // gas legacy: 23190 diff --git a/test/libsolidity/semanticTests/functionCall/creation_function_call_with_args.sol b/test/libsolidity/semanticTests/functionCall/creation_function_call_with_args.sol index cbbded9d5..39592f4a4 100644 --- a/test/libsolidity/semanticTests/functionCall/creation_function_call_with_args.sol +++ b/test/libsolidity/semanticTests/functionCall/creation_function_call_with_args.sol @@ -15,7 +15,7 @@ contract D { } // ---- // constructor(): 2 -> -// gas irOptimized: 193567 +// gas irOptimized: 192703 // gas legacy: 241234 // gas legacyOptimized: 192961 // f() -> 2 diff --git a/test/libsolidity/semanticTests/functionCall/creation_function_call_with_salt.sol b/test/libsolidity/semanticTests/functionCall/creation_function_call_with_salt.sol index e6b4ae90b..3850a0be7 100644 --- a/test/libsolidity/semanticTests/functionCall/creation_function_call_with_salt.sol +++ b/test/libsolidity/semanticTests/functionCall/creation_function_call_with_salt.sol @@ -17,7 +17,7 @@ contract D { // EVMVersion: >=constantinople // ---- // constructor(): 2 -> -// gas irOptimized: 193730 +// gas irOptimized: 192866 // gas legacy: 241606 // gas legacyOptimized: 193193 // f() -> 2 diff --git a/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting.sol b/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting.sol index 86d3dcc8f..a1c74cf89 100644 --- a/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting.sol +++ b/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting.sol @@ -22,7 +22,7 @@ contract C { } // ---- // constructor(), 1 ether -> -// gas irOptimized: 265110 +// gas irOptimized: 262355 // gas legacy: 441442 // gas legacyOptimized: 292862 // f(uint256): 0 -> FAILURE diff --git a/test/libsolidity/semanticTests/functionCall/failed_create.sol b/test/libsolidity/semanticTests/functionCall/failed_create.sol index 6460794ad..091e5a77a 100644 --- a/test/libsolidity/semanticTests/functionCall/failed_create.sol +++ b/test/libsolidity/semanticTests/functionCall/failed_create.sol @@ -17,7 +17,7 @@ contract C { // EVMVersion: >=byzantium // ---- // constructor(), 20 wei -// gas irOptimized: 171806 +// gas irOptimized: 166148 // gas legacy: 285547 // gas legacyOptimized: 168515 // f(uint256): 20 -> 0x137aa4dfc0911524504fcd4d98501f179bc13b4a diff --git a/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol b/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol index 6ebab90ff..79a829aa7 100644 --- a/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol +++ b/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol @@ -38,7 +38,7 @@ contract test { } // ---- // constructor(), 20 wei -> -// gas irOptimized: 253950 +// gas irOptimized: 252642 // gas legacy: 391588 // gas legacyOptimized: 268089 // sendAmount(uint256): 5 -> 5 diff --git a/test/libsolidity/semanticTests/functionCall/gas_and_value_brace_syntax.sol b/test/libsolidity/semanticTests/functionCall/gas_and_value_brace_syntax.sol index 1cb5e0d54..71b6ebb2c 100644 --- a/test/libsolidity/semanticTests/functionCall/gas_and_value_brace_syntax.sol +++ b/test/libsolidity/semanticTests/functionCall/gas_and_value_brace_syntax.sol @@ -37,7 +37,7 @@ contract test { } // ---- // constructor(), 20 wei -> -// gas irOptimized: 253950 +// gas irOptimized: 252642 // gas legacy: 391588 // gas legacyOptimized: 268089 // sendAmount(uint256): 5 -> 5 diff --git a/test/libsolidity/semanticTests/immutable/multi_creation.sol b/test/libsolidity/semanticTests/immutable/multi_creation.sol index 4302b42e1..145c32add 100644 --- a/test/libsolidity/semanticTests/immutable/multi_creation.sol +++ b/test/libsolidity/semanticTests/immutable/multi_creation.sol @@ -27,7 +27,7 @@ contract C { } // ---- // f() -> 3, 7, 5 -// gas irOptimized: 124024 +// gas irOptimized: 124021 // gas legacy: 148528 // gas legacyOptimized: 123971 // x() -> 7 diff --git a/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol b/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol index 3866d3be0..d8fd8766f 100644 --- a/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol +++ b/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol @@ -39,7 +39,7 @@ contract Main { } // ---- // constructor(), 22 wei -> -// gas irOptimized: 262320 +// gas irOptimized: 261888 // gas legacy: 392786 // gas legacyOptimized: 261633 // getFlag() -> true diff --git a/test/libsolidity/semanticTests/libraries/internal_types_in_library.sol b/test/libsolidity/semanticTests/libraries/internal_types_in_library.sol index 3da10930c..5aeff319c 100644 --- a/test/libsolidity/semanticTests/libraries/internal_types_in_library.sol +++ b/test/libsolidity/semanticTests/libraries/internal_types_in_library.sol @@ -22,6 +22,6 @@ contract Test { // ---- // library: Lib // f() -> 4, 0x11 -// gas irOptimized: 112046 +// gas irOptimized: 112064 // gas legacy: 135413 // gas legacyOptimized: 119325 diff --git a/test/libsolidity/semanticTests/libraries/using_library_mappings_public.sol b/test/libsolidity/semanticTests/libraries/using_library_mappings_public.sol index 1f06908e2..b3e06c5bc 100644 --- a/test/libsolidity/semanticTests/libraries/using_library_mappings_public.sol +++ b/test/libsolidity/semanticTests/libraries/using_library_mappings_public.sol @@ -19,6 +19,6 @@ contract Test { // ---- // library: Lib // f() -> 1, 0, 0x2a, 0x17, 0, 0x63 -// gas irOptimized: 119642 +// gas irOptimized: 119635 // gas legacy: 124674 // gas legacyOptimized: 119669 diff --git a/test/libsolidity/semanticTests/libraries/using_library_mappings_return.sol b/test/libsolidity/semanticTests/libraries/using_library_mappings_return.sol index e26ccacb9..e9d855969 100644 --- a/test/libsolidity/semanticTests/libraries/using_library_mappings_return.sol +++ b/test/libsolidity/semanticTests/libraries/using_library_mappings_return.sol @@ -17,6 +17,6 @@ contract Test { // ---- // library: Lib // f() -> 1, 0, 0x2a, 0x17, 0, 0x63 -// gas irOptimized: 120200 +// gas irOptimized: 120194 // gas legacy: 125109 // gas legacyOptimized: 120128 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 34180fa69..c4db17474 100644 --- a/test/libsolidity/semanticTests/salted_create/salted_create_with_value.sol +++ b/test/libsolidity/semanticTests/salted_create/salted_create_with_value.sol @@ -21,6 +21,6 @@ contract A { // EVMVersion: >=constantinople // ---- // f(), 10 ether -> 3007, 3008, 3009 -// gas irOptimized: 253035 +// gas irOptimized: 253005 // gas legacy: 381063 // gas legacyOptimized: 279694 diff --git a/test/libsolidity/semanticTests/structs/copy_from_mapping.sol b/test/libsolidity/semanticTests/structs/copy_from_mapping.sol index 75898d316..1d1783a16 100644 --- a/test/libsolidity/semanticTests/structs/copy_from_mapping.sol +++ b/test/libsolidity/semanticTests/structs/copy_from_mapping.sol @@ -36,8 +36,8 @@ contract C { } // ---- // to_state() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 121487 +// gas irOptimized: 121481 // gas legacy: 123069 -// gas legacyOptimized: 121759 +// gas legacyOptimized: 121756 // to_storage() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 // to_memory() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 diff --git a/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol b/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol index 902cc80e5..a1b0999ff 100644 --- a/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol +++ b/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol @@ -46,6 +46,6 @@ contract C { // to_state() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 // gas irOptimized: 121598 // gas legacy: 123208 -// gas legacyOptimized: 121766 +// gas legacyOptimized: 121763 // to_storage() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 // to_memory() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 diff --git a/test/libsolidity/semanticTests/structs/copy_substructures_to_mapping.sol b/test/libsolidity/semanticTests/structs/copy_substructures_to_mapping.sol index 66716e400..b88466113 100644 --- a/test/libsolidity/semanticTests/structs/copy_substructures_to_mapping.sol +++ b/test/libsolidity/semanticTests/structs/copy_substructures_to_mapping.sol @@ -52,14 +52,14 @@ contract C { } // ---- // from_memory() -> 0x20, 0x60, 0xa0, 0x15, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 123034 +// gas irOptimized: 123039 // gas legacy: 130227 -// gas legacyOptimized: 128761 +// gas legacyOptimized: 128758 // from_state() -> 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 // gas irOptimized: 121709 // gas legacy: 123282 -// gas legacyOptimized: 121871 +// gas legacyOptimized: 121868 // from_calldata((bytes,uint16[],uint16)): 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -> 0x20, 0x60, 0xa0, 0x15, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 115131 +// gas irOptimized: 115130 // gas legacy: 122516 -// gas legacyOptimized: 120807 +// gas legacyOptimized: 120804 diff --git a/test/libsolidity/semanticTests/structs/copy_to_mapping.sol b/test/libsolidity/semanticTests/structs/copy_to_mapping.sol index 30df195d8..e6b569922 100644 --- a/test/libsolidity/semanticTests/structs/copy_to_mapping.sol +++ b/test/libsolidity/semanticTests/structs/copy_to_mapping.sol @@ -47,16 +47,16 @@ contract C { // from_state() -> 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 // gas irOptimized: 121686 // gas legacy: 123144 -// gas legacyOptimized: 121811 +// gas legacyOptimized: 121808 // from_storage() -> 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 // gas irOptimized: 121731 // gas legacy: 123193 -// gas legacyOptimized: 121863 +// gas legacyOptimized: 121860 // from_memory() -> 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 122942 +// gas irOptimized: 122947 // gas legacy: 130088 -// gas legacyOptimized: 128757 +// gas legacyOptimized: 128754 // from_calldata((bytes,uint16[],uint16)): 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -> 0x20, 0x60, 0xa0, 21, 3, 0x666f6f0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 115046 +// gas irOptimized: 115045 // gas legacy: 118301 -// gas legacyOptimized: 115435 +// gas legacyOptimized: 115432 diff --git a/test/libsolidity/semanticTests/structs/struct_containing_bytes_copy_and_delete.sol b/test/libsolidity/semanticTests/structs/struct_containing_bytes_copy_and_delete.sol index c8437300d..856edc27b 100644 --- a/test/libsolidity/semanticTests/structs/struct_containing_bytes_copy_and_delete.sol +++ b/test/libsolidity/semanticTests/structs/struct_containing_bytes_copy_and_delete.sol @@ -23,17 +23,17 @@ contract c { // ---- // storageEmpty -> 1 // set(uint256,bytes,uint256): 12, 0x60, 13, 33, "12345678901234567890123456789012", "3" -> true -// gas irOptimized: 133582 +// gas irOptimized: 133592 // gas legacy: 134628 -// gas legacyOptimized: 133874 +// gas legacyOptimized: 133871 // test(uint256): 32 -> "3" // storageEmpty -> 0 // copy() -> true // storageEmpty -> 1 // set(uint256,bytes,uint256): 12, 0x60, 13, 33, "12345678901234567890123456789012", "3" -> true -// gas irOptimized: 133582 +// gas irOptimized: 133592 // gas legacy: 134628 -// gas legacyOptimized: 133874 +// gas legacyOptimized: 133871 // storageEmpty -> 0 // del() -> true // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/userDefinedValueType/calldata.sol b/test/libsolidity/semanticTests/userDefinedValueType/calldata.sol index 2e85c3463..f9c2d333a 100644 --- a/test/libsolidity/semanticTests/userDefinedValueType/calldata.sol +++ b/test/libsolidity/semanticTests/userDefinedValueType/calldata.sol @@ -49,7 +49,7 @@ contract C { } // ---- // test_f() -> true -// gas irOptimized: 122388 +// gas irOptimized: 122393 // gas legacy: 126030 // gas legacyOptimized: 123120 // test_g() -> true diff --git a/test/libsolidity/semanticTests/various/address_code.sol b/test/libsolidity/semanticTests/various/address_code.sol index 606737746..80daf116c 100644 --- a/test/libsolidity/semanticTests/various/address_code.sol +++ b/test/libsolidity/semanticTests/various/address_code.sol @@ -14,9 +14,9 @@ contract C { } // ---- // constructor() -> -// gas irOptimized: 172853 +// gas irOptimized: 173273 // gas legacy: 241796 -// gas legacyOptimized: 153454 +// gas legacyOptimized: 153670 // initCode() -> 0x20, 0 // f() -> true // g() -> 0 diff --git a/test/libsolidity/semanticTests/various/create_calldata.sol b/test/libsolidity/semanticTests/various/create_calldata.sol index b40b0eab4..c3d038136 100644 --- a/test/libsolidity/semanticTests/various/create_calldata.sol +++ b/test/libsolidity/semanticTests/various/create_calldata.sol @@ -8,7 +8,7 @@ contract C { } // ---- // constructor(): 42 -> -// gas irOptimized: 144924 +// gas irOptimized: 145578 // gas legacy: 173845 -// gas legacyOptimized: 137677 +// gas legacyOptimized: 137877 // s() -> 0x20, 0 diff --git a/test/libsolidity/semanticTests/various/destructuring_assignment.sol b/test/libsolidity/semanticTests/various/destructuring_assignment.sol index 9fe9a8a74..b8236e2cd 100644 --- a/test/libsolidity/semanticTests/various/destructuring_assignment.sol +++ b/test/libsolidity/semanticTests/various/destructuring_assignment.sol @@ -33,6 +33,6 @@ contract C { } // ---- // f(bytes): 0x20, 0x5, "abcde" -> 0 -// gas irOptimized: 241841 +// gas irOptimized: 241837 // gas legacy: 243284 // gas legacyOptimized: 242420 diff --git a/test/libsolidity/semanticTests/various/selfdestruct.sol b/test/libsolidity/semanticTests/various/selfdestruct.sol index 366bac41d..6aa42cb14 100644 --- a/test/libsolidity/semanticTests/various/selfdestruct.sol +++ b/test/libsolidity/semanticTests/various/selfdestruct.sol @@ -30,7 +30,7 @@ contract D { } // ---- // constructor(), 1 ether -> -// gas irOptimized: 186970 +// gas irOptimized: 186958 // gas legacy: 255973 // gas legacyOptimized: 178919 // c() -> 0x137aa4dfc0911524504fcd4d98501f179bc13b4a diff --git a/test/libsolidity/semanticTests/various/senders_balance.sol b/test/libsolidity/semanticTests/various/senders_balance.sol index 37d6919db..6628454db 100644 --- a/test/libsolidity/semanticTests/various/senders_balance.sol +++ b/test/libsolidity/semanticTests/various/senders_balance.sol @@ -16,7 +16,7 @@ contract D { } // ---- // constructor(), 27 wei -> -// gas irOptimized: 168729 +// gas irOptimized: 167865 // gas legacy: 218459 // gas legacyOptimized: 167292 // f() -> 27 diff --git a/test/libsolidity/semanticTests/various/skip_dynamic_types_for_structs.sol b/test/libsolidity/semanticTests/various/skip_dynamic_types_for_structs.sol index e6b9a6aae..ce8946c55 100644 --- a/test/libsolidity/semanticTests/various/skip_dynamic_types_for_structs.sol +++ b/test/libsolidity/semanticTests/various/skip_dynamic_types_for_structs.sol @@ -19,6 +19,6 @@ contract C { } // ---- // g() -> 2, 6 -// gas irOptimized: 178487 +// gas irOptimized: 178475 // gas legacy: 180839 // gas legacyOptimized: 179374 diff --git a/test/libsolidity/semanticTests/various/value_complex.sol b/test/libsolidity/semanticTests/various/value_complex.sol index 880dfbc20..9f262fbde 100644 --- a/test/libsolidity/semanticTests/various/value_complex.sol +++ b/test/libsolidity/semanticTests/various/value_complex.sol @@ -19,7 +19,7 @@ contract test { } // ---- // constructor(), 20 wei -> -// gas irOptimized: 173055 +// gas irOptimized: 172407 // gas legacy: 252296 // gas legacyOptimized: 180352 // sendAmount(uint256): 5 -> 8 diff --git a/test/libsolidity/semanticTests/various/value_insane.sol b/test/libsolidity/semanticTests/various/value_insane.sol index 897b9faba..1e591050c 100644 --- a/test/libsolidity/semanticTests/various/value_insane.sol +++ b/test/libsolidity/semanticTests/various/value_insane.sol @@ -18,7 +18,7 @@ contract test { } // ---- // constructor(), 20 wei -> -// gas irOptimized: 173919 +// gas irOptimized: 173271 // gas legacy: 253820 // gas legacyOptimized: 180784 // sendAmount(uint256): 5 -> 8 diff --git a/test/libsolidity/semanticTests/viaYul/copy_struct_invalid_ir_bug.sol b/test/libsolidity/semanticTests/viaYul/copy_struct_invalid_ir_bug.sol index ed5ecf3ed..5a85ba075 100644 --- a/test/libsolidity/semanticTests/viaYul/copy_struct_invalid_ir_bug.sol +++ b/test/libsolidity/semanticTests/viaYul/copy_struct_invalid_ir_bug.sol @@ -21,6 +21,6 @@ contract C { } // ---- // f() -> -// gas irOptimized: 112980 +// gas irOptimized: 112969 // gas legacy: 112890 // gas legacyOptimized: 112580 diff --git a/test/libsolidity/syntaxTests/sizeLimits/bytecode_too_large.sol b/test/libsolidity/syntaxTests/sizeLimits/bytecode_too_large.sol index 36aa0c076..21c48cc43 100644 --- a/test/libsolidity/syntaxTests/sizeLimits/bytecode_too_large.sol +++ b/test/libsolidity/syntaxTests/sizeLimits/bytecode_too_large.sol @@ -9,4 +9,4 @@ contract test { // ==== // EVMVersion: >=shanghai // ---- -// Warning 5574: (21-27154): Contract code size is 27186 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. +// Warning 5574: (21-27154): Contract code size is 27187 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. diff --git a/test/libsolidity/syntaxTests/sizeLimits/bytecode_too_large_byzantium.sol b/test/libsolidity/syntaxTests/sizeLimits/bytecode_too_large_byzantium.sol index 4f3239c22..67dee4cad 100644 --- a/test/libsolidity/syntaxTests/sizeLimits/bytecode_too_large_byzantium.sol +++ b/test/libsolidity/syntaxTests/sizeLimits/bytecode_too_large_byzantium.sol @@ -7,4 +7,4 @@ contract test { // ==== // EVMVersion: =byzantium // ---- -// Warning 5574: (0-27133): Contract code size is 27220 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. +// Warning 5574: (0-27133): Contract code size is 27221 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. diff --git a/test/libsolidity/syntaxTests/sizeLimits/combined_too_large_paris.sol b/test/libsolidity/syntaxTests/sizeLimits/combined_too_large_paris.sol index 82a3415d0..0a97c87df 100644 --- a/test/libsolidity/syntaxTests/sizeLimits/combined_too_large_paris.sol +++ b/test/libsolidity/syntaxTests/sizeLimits/combined_too_large_paris.sol @@ -26,6 +26,6 @@ contract test { // ==== // EVMVersion: =paris // ---- -// Warning 5574: (0-27130): Contract code size is 27192 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. -// Warning 5574: (27132-27224): Contract code size is 27218 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. -// Warning 5574: (27226-27319): Contract code size is 27218 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. +// Warning 5574: (0-27130): Contract code size is 27193 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. +// Warning 5574: (27132-27224): Contract code size is 27219 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. +// Warning 5574: (27226-27319): Contract code size is 27219 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. diff --git a/test/libsolidity/syntaxTests/sizeLimits/combined_too_large_shanghai.sol b/test/libsolidity/syntaxTests/sizeLimits/combined_too_large_shanghai.sol index 4854b0a64..3fc466db3 100644 --- a/test/libsolidity/syntaxTests/sizeLimits/combined_too_large_shanghai.sol +++ b/test/libsolidity/syntaxTests/sizeLimits/combined_too_large_shanghai.sol @@ -26,7 +26,7 @@ contract test { // ==== // EVMVersion: =shanghai // ---- -// Warning 5574: (0-27130): Contract code size is 27186 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. -// Warning 5574: (27132-27224): Contract code size is 27212 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. -// Warning 5574: (27226-27319): Contract code size is 27211 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. -// Warning 3860: (27321-27398): Contract initcode size is 54626 bytes and exceeds 49152 bytes (a limit introduced in Shanghai). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. +// Warning 5574: (0-27130): Contract code size is 27187 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. +// Warning 5574: (27132-27224): Contract code size is 27213 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. +// Warning 5574: (27226-27319): Contract code size is 27212 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. +// Warning 3860: (27321-27398): Contract initcode size is 54628 bytes and exceeds 49152 bytes (a limit introduced in Shanghai). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. diff --git a/test/libsolidity/syntaxTests/sizeLimits/initcode_too_large_shanghai.sol b/test/libsolidity/syntaxTests/sizeLimits/initcode_too_large_shanghai.sol index 1f648c630..f82434d5d 100644 --- a/test/libsolidity/syntaxTests/sizeLimits/initcode_too_large_shanghai.sol +++ b/test/libsolidity/syntaxTests/sizeLimits/initcode_too_large_shanghai.sol @@ -27,4 +27,4 @@ contract test { // ==== // EVMVersion: =shanghai // ---- -// Warning 3860: (20321-20415): Contract initcode size is 60893 bytes and exceeds 49152 bytes (a limit introduced in Shanghai). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. +// Warning 3860: (20321-20415): Contract initcode size is 60896 bytes and exceeds 49152 bytes (a limit introduced in Shanghai). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. diff --git a/test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul b/test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul index 8a453e004..2abdf6d9c 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul @@ -493,7 +493,7 @@ // function abi_decode_array_array_uint256_memory_dyn(offset, end) -> array // { // let _1 := 0x1f -// if iszero(slt(add(offset, _1), end)) { revert(0, 0) } +// if iszero(slt(add(offset, 0x1f), end)) { revert(0, 0) } // let length := calldataload(offset) // array := allocateMemory(array_allocation_size_array_address_dyn_memory(length)) // let dst := array diff --git a/test/libyul/yulOptimizerTests/fullSuite/devcon_example.yul b/test/libyul/yulOptimizerTests/fullSuite/devcon_example.yul index 9cdf20193..fe06f1629 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/devcon_example.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/devcon_example.yul @@ -24,7 +24,7 @@ // let _1 := calldataload(0) // let sum := 0 // let length := calldataload(_1) -// let i := sum +// let i := 0 // for { } lt(i, length) { i := add(i, 1) } // { // sum := add(sum, calldataload(add(add(_1, shl(5, i)), 0x20))) diff --git a/test/libyul/yulOptimizerTests/fullSuite/loopInvariantCodeMotion.yul b/test/libyul/yulOptimizerTests/fullSuite/loopInvariantCodeMotion.yul index 5bd34186e..86329c327 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/loopInvariantCodeMotion.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/loopInvariantCodeMotion.yul @@ -27,7 +27,7 @@ // let _1 := calldataload(0) // let sum := 0 // let length := calldataload(_1) -// let i := sum +// let i := 0 // let _2 := calldataload(7) // for { } lt(i, length) { i := add(i, 1) } // { diff --git a/test/libyul/yulOptimizerTests/fullSuite/name_cleaner_reserved.yul b/test/libyul/yulOptimizerTests/fullSuite/name_cleaner_reserved.yul index 851ccbce2..05cf04a71 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/name_cleaner_reserved.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/name_cleaner_reserved.yul @@ -29,6 +29,6 @@ // { // if calldataload(0) { pop(mstore_(x)) } // y := 8 -// sstore(y, calldataload(y)) +// sstore(8, calldataload(8)) // } // }