From e6ac59aa4bddfa5b24dac9f7ff39ba1690bc0e90 Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Tue, 11 Mar 2025 03:46:09 +0100 Subject: [PATCH 1/5] Hack isoltest to always enforce gas costs and update for EOFv1 gas costs. --- test/libsolidity/SemanticTest.cpp | 4 ++-- test/libsolidity/SemanticTest.h | 6 +++--- .../abi_decode_simple_storage.sol | 2 +- .../abiEncoderV1/abi_decode_v2_storage.sol | 2 +- .../abiEncoderV1/abi_encode_calldata_slice.sol | 4 ++-- .../abiEncoderV1/struct/struct_storage_ptr.sol | 2 +- .../abiEncoderV2/abi_encode_calldata_slice.sol | 4 ++-- .../abiEncoderV2/abi_encode_v2.sol | 2 +- ...v2_in_function_inherited_in_v1_contract.sol | 4 ++-- .../calldata_overlapped_dynamic_arrays.sol | 2 +- .../abiEncoderV2/storage_array_encoding.sol | 4 ++-- .../array/array_storage_index_access.sol | 18 +++++++++--------- .../array_storage_index_boundary_test.sol | 4 ++-- .../array/array_storage_index_zeroed_test.sol | 8 ++++---- .../array/array_storage_length_access.sol | 2 +- .../array/array_storage_push_empty.sol | 4 ++-- ...array_storage_push_empty_length_address.sol | 4 ++-- .../array/array_storage_push_pop.sol | 4 ++-- .../arrays_complex_from_and_to_storage.sol | 2 +- .../array/byte_array_transitional_2.sol | 2 +- .../array/bytes_length_member.sol | 2 +- .../array/constant_var_as_array_length.sol | 4 ++-- .../copying/array_copy_calldata_storage.sol | 2 +- .../copying/array_copy_cleanup_uint40.sol | 2 +- .../array/copying/array_copy_clear_storage.sol | 2 +- .../copying/array_copy_different_packing.sol | 2 +- .../copying/array_copy_including_array.sol | 4 ++-- .../array/copying/array_copy_nested_array.sol | 2 +- ...ray_copy_storage_storage_different_base.sol | 2 +- ...y_storage_storage_different_base_nested.sol | 2 +- .../array_copy_storage_storage_dyn_dyn.sol | 2 +- ...ay_copy_storage_storage_dynamic_dynamic.sol | 2 +- ...ray_copy_storage_storage_static_dynamic.sol | 2 +- ...rray_copy_storage_storage_static_static.sol | 2 +- .../array_copy_storage_storage_struct.sol | 2 +- .../array_copy_storage_to_memory_nested.sol | 2 +- .../array/copying/array_copy_target_simple.sol | 2 +- .../copying/array_copy_target_simple_2.sol | 2 +- .../copying/array_elements_to_mapping.sol | 2 +- .../array_nested_calldata_to_storage.sol | 8 ++++---- .../copying/array_nested_memory_to_storage.sol | 4 ++-- ...ion_external_storage_to_storage_dynamic.sol | 2 +- ...to_storage_dynamic_different_mutability.sol | 2 +- .../array_of_struct_calldata_to_storage.sol | 2 +- .../array_of_struct_memory_to_storage.sol | 2 +- ...s_containing_arrays_calldata_to_storage.sol | 2 +- ...cts_containing_arrays_memory_to_storage.sol | 2 +- .../array_storage_multi_items_per_slot.sol | 2 +- .../array/copying/array_to_mapping.sol | 2 +- .../array/copying/bytes_inside_mappings.sol | 4 ++-- .../array/copying/bytes_storage_to_storage.sol | 8 ++++---- .../calldata_array_dynamic_to_storage.sol | 2 +- .../copying/calldata_array_to_mapping.sol | 2 +- ...anup_during_multi_element_per_slot_copy.sol | 4 ++-- .../copy_byte_array_in_struct_to_storage.sol | 4 ++-- .../copying/copy_byte_array_to_storage.sol | 2 +- .../copy_function_internal_storage_array.sol | 2 +- .../array/copying/copy_removes_bytes_data.sol | 2 +- .../copying/copying_bytes_multiassign.sol | 2 +- ...ed_array_of_structs_calldata_to_storage.sol | 6 +++--- ...sted_array_of_structs_memory_to_storage.sol | 6 +++--- .../copying/function_type_array_to_storage.sol | 4 ++-- .../copying/memory_dyn_2d_bytes_to_storage.sol | 2 +- ...nested_array_element_storage_to_storage.sol | 6 +++--- ...ed_array_of_structs_calldata_to_storage.sol | 6 +++--- ...sted_array_of_structs_memory_to_storage.sol | 6 +++--- ...ted_array_of_structs_storage_to_storage.sol | 4 ++-- ...namic_array_element_calldata_to_storage.sol | 4 ++-- .../array/copying/storage_memory_nested.sol | 2 +- .../copying/storage_memory_nested_bytes.sol | 2 +- .../storage_memory_nested_from_pointer.sol | 2 +- .../copying/storage_memory_nested_struct.sol | 2 +- .../copying/storage_memory_packed_dyn.sol | 2 +- .../array/create_memory_array.sol | 2 +- .../array/delete/bytes_delete_element.sol | 2 +- .../array/dynamic_array_cleanup.sol | 2 +- .../array/dynamic_arrays_in_storage.sol | 2 +- .../array/dynamic_multi_array_cleanup.sol | 2 +- .../array/fixed_array_cleanup.sol | 2 +- .../array/fixed_arrays_as_return_type.sol | 4 ++-- .../array/function_array_cross_calls.sol | 4 ++-- ...invalid_encoding_for_storage_byte_array.sol | 2 +- .../array/nested_calldata_storage.sol | 2 +- .../array/nested_calldata_storage2.sol | 2 +- .../array/pop/array_pop_array_transition.sol | 2 +- .../array/pop/array_pop_uint16_transition.sol | 2 +- .../array/pop/array_pop_uint24_transition.sol | 2 +- .../pop/byte_array_pop_long_storage_empty.sol | 2 +- ...rray_pop_long_storage_empty_garbage_ref.sol | 2 +- .../array/pop/byte_array_pop_masking_long.sol | 2 +- .../semanticTests/array/push/array_push.sol | 2 +- .../push/array_push_nested_from_calldata.sol | 2 +- .../array/push/array_push_struct.sol | 2 +- .../push/array_push_struct_from_calldata.sol | 2 +- .../array/push/byte_array_push_transition.sol | 2 +- .../array/push/nested_bytes_push.sol | 2 +- .../array/push/push_no_args_2d.sol | 4 ++-- .../array/push/push_no_args_bytes.sol | 2 +- .../semanticTests/array/reusing_memory.sol | 4 ++-- .../copy_from_calldata_removes_bytes_data.sol | 2 +- .../cleanup/byte_array_to_storage_cleanup.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 ++-- .../constructor/no_callvalue_check.sol | 4 ++-- .../errors/small_error_optimization.sol | 4 ++-- .../events/event_dynamic_array_storage.sol | 2 +- .../events/event_dynamic_array_storage_v2.sol | 2 +- .../event_dynamic_nested_array_storage_v2.sol | 2 +- .../events/event_indexed_string.sol | 2 +- .../externalContracts/FixedFeeRegistrar.sol | 4 ++-- .../semanticTests/externalContracts/base64.sol | 8 ++++---- .../externalContracts/deposit_contract.sol | 12 ++++++------ .../externalContracts/prbmath_signed.sol | 4 ++-- .../externalContracts/prbmath_unsigned.sol | 4 ++-- .../externalContracts/ramanujan_pi.sol | 4 ++-- .../semanticTests/externalContracts/snark.sol | 4 ++-- .../externalContracts/strings.sol | 6 +++--- .../creation_function_call_with_args.sol | 4 ++-- .../creation_function_call_with_salt.sol | 4 ++-- .../eof/external_call_to_nonexisting.sol | 4 ++-- .../functionCall/failed_create.sol | 6 +++--- .../mapping_array_internal_argument.sol | 2 +- .../immutable/immutable_tag_too_large_bug.sol | 4 ++-- .../semanticTests/immutable/multi_creation.sol | 4 ++-- ...tructor_with_params_diamond_inheritance.sol | 4 ++-- ...ited_function_calldata_memory_interface.sol | 3 ++- .../inheritance/value_for_constructor.sol | 4 ++-- .../transient_storage_low_level_calls.sol | 4 ++-- .../tstore_hidden_staticcall.sol | 2 +- .../libraries/internal_types_in_library.sol | 2 +- .../using_library_mappings_public.sol | 2 +- .../using_library_mappings_return.sol | 2 +- .../operator_making_pure_external_call.sol | 6 ++++-- .../operator_making_view_external_call.sol | 6 ++++-- .../eof/salted_create_with_value.sol | 2 ++ .../saltedCreate/salted_create.sol | 4 ++-- .../storage/empty_nonempty_empty.sol | 2 +- .../storage/packed_storage_structs_bytes.sol | 2 +- .../storageLayoutSpecifier/constructor.sol | 4 ++-- .../storageLayoutSpecifier/delete.sol | 2 +- .../dynamic_array_storage_end.sol | 6 +++--- .../mapping_storage_end.sol | 4 ++-- .../multiple_inheritance.sol | 2 +- .../state_variable_dynamic_array.sol | 4 ++-- .../state_variable_mapping.sol | 2 +- .../storage_reference_array.sol | 2 +- ...ata_struct_with_nested_array_to_storage.sol | 2 +- .../conversion/recursive_storage_memory.sol | 2 +- .../structs/copy_from_mapping.sol | 2 +- .../structs/copy_struct_array_from_storage.sol | 2 +- .../copy_substructures_from_mapping.sol | 2 +- .../structs/copy_substructures_to_mapping.sol | 6 +++--- .../semanticTests/structs/copy_to_mapping.sol | 8 ++++---- .../structs/memory_structs_nested_load.sol | 2 +- ...struct_containing_bytes_copy_and_delete.sol | 4 ++-- .../semanticTests/structs/struct_copy.sol | 4 ++-- .../structs/struct_copy_via_local.sol | 2 +- .../struct_delete_storage_with_array.sol | 4 ++-- .../struct_memory_to_storage_function_ptr.sol | 2 +- .../semanticTests/structs/structs.sol | 2 +- .../mapping/copy_from_mapping_to_mapping.sol | 2 +- .../userDefinedValueType/calldata.sol | 4 ++-- .../userDefinedValueType/erc20.sol | 4 ++-- .../various/destructuring_assignment.sol | 2 +- .../various/different_call_type_transient.sol | 2 +- .../various/eof/create_calldata.sol | 2 ++ .../semanticTests/various/erc20.sol | 4 ++-- .../various/many_subassemblies.sol | 4 ++-- .../semanticTests/various/senders_balance.sol | 4 ++-- .../various/skip_dynamic_types_for_structs.sol | 2 +- .../various/staticcall_for_view_and_pure.sol | 6 ++---- .../various/swap_in_storage_overwrite.sol | 2 +- .../viaYul/copy_struct_invalid_ir_bug.sol | 2 +- test/tools/IsolTestOptions.cpp | 2 +- 176 files changed, 288 insertions(+), 281 deletions(-) diff --git a/test/libsolidity/SemanticTest.cpp b/test/libsolidity/SemanticTest.cpp index 1b66dd60fffb..b11f72f608f7 100644 --- a/test/libsolidity/SemanticTest.cpp +++ b/test/libsolidity/SemanticTest.cpp @@ -61,7 +61,7 @@ SemanticTest::SemanticTest( langutil::EVMVersion _evmVersion, std::optional _eofVersion, std::vector const& _vmPaths, - bool _enforceGasCost, + bool, u256 _enforceGasCostMinValue ): SolidityExecutionFramework(_evmVersion, _eofVersion, _vmPaths, false), @@ -70,7 +70,7 @@ SemanticTest::SemanticTest( m_lineOffset(m_reader.lineNumber()), m_builtins(makeBuiltins()), m_sideEffectHooks(makeSideEffectHooks()), - m_enforceGasCost(_enforceGasCost), + m_enforceGasCost(true), m_enforceGasCostMinValue(std::move(_enforceGasCostMinValue)) { static std::set const compileViaYulAllowedValues{"also", "true", "false"}; diff --git a/test/libsolidity/SemanticTest.h b/test/libsolidity/SemanticTest.h index efc2b59030e6..ad752863d8dd 100644 --- a/test/libsolidity/SemanticTest.h +++ b/test/libsolidity/SemanticTest.h @@ -62,7 +62,7 @@ class SemanticTest: public SolidityExecutionFramework, public EVMVersionRestrict _options.evmVersion, _options.eofVersion, _options.vmPaths, - _options.enforceGasCost, + true, _options.enforceGasCostMinValue ); } @@ -72,7 +72,7 @@ class SemanticTest: public SolidityExecutionFramework, public EVMVersionRestrict langutil::EVMVersion _evmVersion, std::optional _eofVersion, std::vector const& _vmPaths, - bool _enforceGasCost = false, + bool _enforceGasCost = true, u256 _enforceGasCostMinValue = 100000 ); @@ -122,7 +122,7 @@ class SemanticTest: public SolidityExecutionFramework, public EVMVersionRestrict bool m_runWithABIEncoderV1Only = false; bool m_allowNonExistingFunctions = false; bool m_gasCostFailure = false; - bool m_enforceGasCost = false; + bool m_enforceGasCost = true; RequiresYulOptimizer m_requiresYulOptimizer{}; u256 m_enforceGasCostMinValue; }; diff --git a/test/libsolidity/semanticTests/abiEncodeDecode/abi_decode_simple_storage.sol b/test/libsolidity/semanticTests/abiEncodeDecode/abi_decode_simple_storage.sol index 54ce693d5ca4..f753a3966fd1 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: 135499 +// gas irOptimized: 134891 // gas legacy: 137095 // gas legacyOptimized: 135823 diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol index 5c3bcba971c2..496d21fea2f4 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol @@ -21,6 +21,6 @@ contract C { } // ---- // f() -> 0x20, 0x8, 0x40, 0x3, 0x9, 0xa, 0xb -// gas irOptimized: 203167 +// gas irOptimized: 202222 // gas legacy: 206263 // gas legacyOptimized: 203172 diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_calldata_slice.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_calldata_slice.sol index a6a4f8fd870d..681fab9cf5b8 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: 314884 +// gas irOptimized: 214026 // gas legacy: 305816 // gas legacyOptimized: 253573 // test_uint256() -> -// gas irOptimized: 448346 +// gas irOptimized: 299243 // gas legacy: 421304 // gas legacyOptimized: 351544 diff --git a/test/libsolidity/semanticTests/abiEncoderV1/struct/struct_storage_ptr.sol b/test/libsolidity/semanticTests/abiEncoderV1/struct/struct_storage_ptr.sol index ed983c77b506..035f9cff5731 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: 166761 +// gas irOptimized: 166571 // gas legacy: 169273 // gas legacyOptimized: 167243 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_calldata_slice.sol b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_calldata_slice.sol index 0c59c33c4b32..45a6602abc48 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: 314884 +// gas irOptimized: 214026 // gas legacy: 305816 // gas legacyOptimized: 253573 // test_uint256() -> -// gas irOptimized: 448346 +// gas irOptimized: 299243 // gas legacy: 421304 // gas legacyOptimized: 351544 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol index edfe075ddd79..4b657d5fd81b 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol @@ -50,6 +50,6 @@ contract C { // f2() -> 0x20, 0xa0, 0x1, 0x60, 0x2, 0x3, "abc" // f3() -> 0x20, 0xa0, 0x1, 0x60, 0x2, 0x3, "abc" // f4() -> 0x20, 0x160, 0x1, 0x80, 0xc0, 0x2, 0x3, "abc", 0x7, 0x40, 0x2, 0x2, 0x3 -// gas irOptimized: 111816 +// gas irOptimized: 111630 // gas legacy: 113890 // gas legacyOptimized: 111658 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 bb3ad1aad1a9..45da877de37c 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,8 +30,8 @@ contract C is B { } // ---- // test() -> 77 -// gas irOptimized: 55117 -// gas irOptimized code: 56800 +// gas irOptimized: 54683 +// gas irOptimized code: 68600 // gas legacy: 57266 // gas legacy code: 94600 // gas legacyOptimized: 55195 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/calldata_overlapped_dynamic_arrays.sol b/test/libsolidity/semanticTests/abiEncoderV2/calldata_overlapped_dynamic_arrays.sol index aa1e494c2133..84c153fa84eb 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/calldata_overlapped_dynamic_arrays.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/calldata_overlapped_dynamic_arrays.sol @@ -33,7 +33,7 @@ contract C { // f_which(uint256[],uint256[2],uint256): 0x40, 1, 2, 1, 5, 6 -> 0x20, 0x40, 5, 2 // f_which(uint256[],uint256[2],uint256): 0x40, 1, 2, 1 -> FAILURE // f_storage(uint256[],uint256[2]): 0x20, 1, 2 -> 0x20, 0x60, 0x20, 1, 2 -// gas irOptimized: 111409 +// gas irOptimized: 111052 // gas legacy: 112707 // gas legacyOptimized: 111845 // f_storage(uint256[],uint256[2]): 0x40, 1, 2, 5, 6 -> 0x20, 0x80, 0x20, 2, 5, 6 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/storage_array_encoding.sol b/test/libsolidity/semanticTests/abiEncoderV2/storage_array_encoding.sol index 9599af6c8815..3e8f5231e547 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/storage_array_encoding.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/storage_array_encoding.sol @@ -18,10 +18,10 @@ 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: 180080 +// gas irOptimized: 179483 // gas legacy: 184233 // gas legacyOptimized: 180856 // i(uint256[2][2]): 123, 124, 223, 224 -> 32, 128, 123, 124, 223, 224 -// gas irOptimized: 112031 +// gas irOptimized: 111767 // gas legacy: 115091 // gas legacyOptimized: 112657 diff --git a/test/libsolidity/semanticTests/array/array_storage_index_access.sol b/test/libsolidity/semanticTests/array/array_storage_index_access.sol index 325323c5cb84..a771fa71a542 100644 --- a/test/libsolidity/semanticTests/array/array_storage_index_access.sol +++ b/test/libsolidity/semanticTests/array/array_storage_index_access.sol @@ -16,38 +16,38 @@ contract C { // ---- // test_indices(uint256): 1 -> // test_indices(uint256): 129 -> -// gas irOptimized: 3017687 +// gas irOptimized: 2994583 // gas legacy: 3038668 // gas legacyOptimized: 2995964 // test_indices(uint256): 5 -> -// gas irOptimized: 579670 +// gas irOptimized: 573884 // gas legacy: 573821 // gas legacyOptimized: 571847 // test_indices(uint256): 10 -> -// gas irOptimized: 157953 +// gas irOptimized: 156398 // gas legacy: 160122 // gas legacyOptimized: 156996 // test_indices(uint256): 15 -> -// gas irOptimized: 172733 +// gas irOptimized: 170593 // gas legacy: 175987 // gas legacyOptimized: 171596 // test_indices(uint256): 0xFF -> -// gas irOptimized: 5673823 +// gas irOptimized: 5629033 // gas legacy: 5715762 // gas legacyOptimized: 5632556 // test_indices(uint256): 1000 -> -// gas irOptimized: 18173005 +// gas irOptimized: 18009740 // gas legacy: 18347824 // gas legacyOptimized: 18037248 // test_indices(uint256): 129 -> -// gas irOptimized: 4166279 +// gas irOptimized: 4117214 // gas legacy: 4140124 // gas legacyOptimized: 4108272 // test_indices(uint256): 128 -> -// gas irOptimized: 405522 +// gas irOptimized: 390418 // gas legacy: 433512 // gas legacyOptimized: 400909 // test_indices(uint256): 1 -> -// gas irOptimized: 583437 +// gas irOptimized: 577899 // gas legacy: 576726 // gas legacyOptimized: 575542 diff --git a/test/libsolidity/semanticTests/array/array_storage_index_boundary_test.sol b/test/libsolidity/semanticTests/array/array_storage_index_boundary_test.sol index 712a7cdebebb..c4596879bf82 100644 --- a/test/libsolidity/semanticTests/array/array_storage_index_boundary_test.sol +++ b/test/libsolidity/semanticTests/array/array_storage_index_boundary_test.sol @@ -16,11 +16,11 @@ contract C { // test_boundary_check(uint256,uint256): 1, 1 -> FAILURE, hex"4e487b71", 0x32 // test_boundary_check(uint256,uint256): 10, 10 -> FAILURE, hex"4e487b71", 0x32 // test_boundary_check(uint256,uint256): 256, 256 -> FAILURE, hex"4e487b71", 0x32 -// gas irOptimized: 147246 +// gas irOptimized: 131914 // gas legacy: 133632 // gas legacyOptimized: 114353 // test_boundary_check(uint256,uint256): 256, 255 -> 0 -// gas irOptimized: 149422 +// gas irOptimized: 134079 // gas legacy: 135948 // gas legacyOptimized: 116532 // test_boundary_check(uint256,uint256): 256, 0xFFFF -> FAILURE, hex"4e487b71", 0x32 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 cdd6b70f559d..189c3b2a3c10 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_indices(uint256): 1 -> // test_zeroed_indices(uint256): 5 -> -// gas irOptimized: 133763 +// gas irOptimized: 133067 // gas legacy: 131664 // gas legacyOptimized: 129990 // test_zeroed_indices(uint256): 10 -> -// gas irOptimized: 228556 +// gas irOptimized: 227154 // gas legacy: 225215 // gas legacyOptimized: 222351 // test_zeroed_indices(uint256): 15 -> -// gas irOptimized: 327360 +// gas irOptimized: 325290 // gas legacy: 322899 // gas legacyOptimized: 318907 // test_zeroed_indices(uint256): 0xFF -> -// gas irOptimized: 5180120 +// gas irOptimized: 5137150 // gas legacy: 5093135 // gas legacyOptimized: 5020523 diff --git a/test/libsolidity/semanticTests/array/array_storage_length_access.sol b/test/libsolidity/semanticTests/array/array_storage_length_access.sol index 47fddc5547bc..f9de92af030d 100644 --- a/test/libsolidity/semanticTests/array/array_storage_length_access.sol +++ b/test/libsolidity/semanticTests/array/array_storage_length_access.sol @@ -16,7 +16,7 @@ contract C { // gas legacy: 128571 // gas legacyOptimized: 110143 // set_get_length(uint256): 0xFFF -> 0xFFF -// gas irOptimized: 1209116 +// gas irOptimized: 1066987 // gas legacy: 1689548 // gas legacyOptimized: 1393535 // set_get_length(uint256): 0xFFFFF -> FAILURE # Out-of-gas # diff --git a/test/libsolidity/semanticTests/array/array_storage_push_empty.sol b/test/libsolidity/semanticTests/array/array_storage_push_empty.sol index b6965f62b2d7..3f5295f1b0dc 100644 --- a/test/libsolidity/semanticTests/array/array_storage_push_empty.sol +++ b/test/libsolidity/semanticTests/array/array_storage_push_empty.sol @@ -12,11 +12,11 @@ contract C { // EVMVersion: >=petersburg // ---- // pushEmpty(uint256): 128 -// gas irOptimized: 410745 +// gas irOptimized: 396227 // gas legacy: 400519 // gas legacyOptimized: 388804 // pushEmpty(uint256): 256 -// gas irOptimized: 698285 +// gas irOptimized: 677239 // gas legacy: 684859 // gas legacyOptimized: 671480 // pushEmpty(uint256): 38869 -> FAILURE # out-of-gas # diff --git a/test/libsolidity/semanticTests/array/array_storage_push_empty_length_address.sol b/test/libsolidity/semanticTests/array/array_storage_push_empty_length_address.sol index 607e1ecd3547..ba7814834629 100644 --- a/test/libsolidity/semanticTests/array/array_storage_push_empty_length_address.sol +++ b/test/libsolidity/semanticTests/array/array_storage_push_empty_length_address.sol @@ -21,11 +21,11 @@ contract C { // gas legacy: 77730 // gas legacyOptimized: 77162 // set_get_length(uint256): 0xFF -> 0xFF -// gas irOptimized: 168565 +// gas irOptimized: 152695 // gas legacy: 696850 // gas legacyOptimized: 134488 // set_get_length(uint256): 0xFFF -> 0xFFF -// gas irOptimized: 1908127 +// gas irOptimized: 1669987 // gas legacy: 9857362 // gas legacyOptimized: 1393660 // set_get_length(uint256): 0xFFFFF -> FAILURE # Out-of-gas # diff --git a/test/libsolidity/semanticTests/array/array_storage_push_pop.sol b/test/libsolidity/semanticTests/array/array_storage_push_pop.sol index a4c7d34d7fef..4c4a309764d1 100644 --- a/test/libsolidity/semanticTests/array/array_storage_push_pop.sol +++ b/test/libsolidity/semanticTests/array/array_storage_push_pop.sol @@ -17,11 +17,11 @@ contract C { // gas legacy: 105722 // gas legacyOptimized: 103508 // set_get_length(uint256): 0xFF -> 0 -// gas irOptimized: 833586 +// gas irOptimized: 807517 // gas legacy: 807764 // gas legacyOptimized: 784467 // set_get_length(uint256): 0xFFF -> 0 -// gas irOptimized: 13029438 +// gas irOptimized: 12611689 // gas legacy: 12608096 // gas legacyOptimized: 12239199 // set_get_length(uint256): 0xFFFF -> FAILURE # Out-of-gas # 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 a9d08ec0c0cb..6f7aa212298e 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: 185216 +// gas irOptimized: 183981 // gas legacy: 211054 // gas legacyOptimized: 206077 // data(uint256,uint256): 0x02, 0x02 -> 0x09 diff --git a/test/libsolidity/semanticTests/array/byte_array_transitional_2.sol b/test/libsolidity/semanticTests/array/byte_array_transitional_2.sol index e83cc545809d..25196ae8039e 100644 --- a/test/libsolidity/semanticTests/array/byte_array_transitional_2.sol +++ b/test/libsolidity/semanticTests/array/byte_array_transitional_2.sol @@ -17,6 +17,6 @@ contract c { } // ---- // test() -> 0 -// gas irOptimized: 122717 +// gas irOptimized: 113251 // gas legacy: 147108 // gas legacyOptimized: 144200 diff --git a/test/libsolidity/semanticTests/array/bytes_length_member.sol b/test/libsolidity/semanticTests/array/bytes_length_member.sol index 5159538bc1de..bdb051e575d0 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: 110422 +// gas irOptimized: 110210 // gas legacy: 110951 // gas legacyOptimized: 110576 // getLength() -> 68 diff --git a/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol b/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol index 342f3218fcb4..f3f6dd076276 100644 --- a/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol +++ b/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol @@ -8,8 +8,8 @@ contract C { } // ---- // constructor(): 1, 2, 3 -> -// gas irOptimized: 124991 -// gas irOptimized code: 14800 +// gas irOptimized: 88320 +// gas irOptimized code: 19600 // gas legacy: 134317 // gas legacy code: 46200 // gas legacyOptimized: 127166 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 ecfe565f12cb..237bdd271d7d 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: 647725 +// gas irOptimized: 646608 // gas legacy: 694354 // gas legacyOptimized: 693849 // 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 d65f4f37c104..dd0936377cc2 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: 122541 +// gas irOptimized: 121929 // gas legacy: 124643 // gas legacyOptimized: 122801 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_clear_storage.sol b/test/libsolidity/semanticTests/array/copying/array_copy_clear_storage.sol index e9f1448a27b1..2c54668ec2ab 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_clear_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_clear_storage.sol @@ -13,6 +13,6 @@ contract C { } // ---- // f() -> 0 -// gas irOptimized: 108229 +// gas irOptimized: 108263 // gas legacy: 108216 // gas legacyOptimized: 107625 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 ee564d01a2d9..0cc97f69f9fa 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: 208415 +// gas irOptimized: 207712 // gas legacy: 220711 // gas legacyOptimized: 220097 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_including_array.sol b/test/libsolidity/semanticTests/array/copying/array_copy_including_array.sol index bb621fcc84b5..616b0fda9455 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_including_array.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_including_array.sol @@ -35,12 +35,12 @@ contract c { } // ---- // test() -> 0x02000202 -// gas irOptimized: 4549676 +// gas irOptimized: 4486744 // gas legacy: 4475394 // gas legacyOptimized: 4447665 // storageEmpty -> 1 // clear() -> 0, 0 -// gas irOptimized: 4478184 +// gas irOptimized: 4426720 // gas legacy: 4407185 // gas legacyOptimized: 4381337 // storageEmpty -> 1 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 2d325a804bfa..752562d0611d 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: 689552 +// gas irOptimized: 687639 // gas legacy: 686176 // gas legacyOptimized: 685611 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 54639df55d66..3809aa72ea61 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: 205667 +// gas irOptimized: 205369 // gas legacy: 213863 // gas legacyOptimized: 212901 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 ad745ff4203f..b18080e5d38c 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: 169669 +// gas irOptimized: 170083 // gas legacy: 175415 // gas legacyOptimized: 172533 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dyn_dyn.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dyn_dyn.sol index a38685404dc7..f9192f4cdb4c 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dyn_dyn.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dyn_dyn.sol @@ -15,7 +15,7 @@ contract c { // ---- // setData1(uint256,uint256,uint256): 10, 5, 4 -> // copyStorageStorage() -> -// gas irOptimized: 111350 +// gas irOptimized: 111123 // gas legacy: 109272 // gas legacyOptimized: 109262 // getData2(uint256): 5 -> 10, 4 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dynamic_dynamic.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dynamic_dynamic.sol index 83df3aef8f43..a2e1034d509d 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dynamic_dynamic.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dynamic_dynamic.sol @@ -17,6 +17,6 @@ contract c { } // ---- // test() -> 5, 4 -// gas irOptimized: 253591 +// gas irOptimized: 253338 // gas legacy: 250892 // gas legacyOptimized: 250045 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 94e57c96da7b..59189b8aafe0 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: 123180 +// gas irOptimized: 122941 // gas legacy: 123566 // gas legacyOptimized: 123202 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_static.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_static.sol index d1f2cbdedcde..f959340eae07 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_static.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_static.sol @@ -14,6 +14,6 @@ contract c { } // ---- // test() -> 8, 0 -// gas irOptimized: 196251 +// gas irOptimized: 195461 // gas legacy: 194842 // gas legacyOptimized: 194281 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_struct.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_struct.sol index e638f2dad10c..38097f64cb61 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_struct.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_struct.sol @@ -17,7 +17,7 @@ contract c { } // ---- // test() -> 4, 5 -// gas irOptimized: 190628 +// gas irOptimized: 190042 // gas legacy: 190828 // gas legacyOptimized: 189657 // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_to_memory_nested.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_to_memory_nested.sol index 120e728843ac..211276ad9de1 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_to_memory_nested.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_to_memory_nested.sol @@ -15,6 +15,6 @@ contract C { } // ---- // f() -> 0x20, 2, 0x40, 0xa0, 2, 0, 1, 2, 2, 3 -// gas irOptimized: 161793 +// gas irOptimized: 161146 // gas legacy: 162200 // gas legacyOptimized: 159953 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 27fb9f0c5736..3394be810c2b 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: 273543 +// gas irOptimized: 273074 // gas legacy: 282601 // gas legacyOptimized: 281510 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 980e414d1451..c4e008fead84 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: 232995 +// gas irOptimized: 232648 // gas legacy: 235694 // gas legacyOptimized: 235193 diff --git a/test/libsolidity/semanticTests/array/copying/array_elements_to_mapping.sol b/test/libsolidity/semanticTests/array/copying/array_elements_to_mapping.sol index becc3d4cdefd..5a40d2575d34 100644 --- a/test/libsolidity/semanticTests/array/copying/array_elements_to_mapping.sol +++ b/test/libsolidity/semanticTests/array/copying/array_elements_to_mapping.sol @@ -52,7 +52,7 @@ contract C { } // ---- // from_storage() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 -// gas irOptimized: 149868 +// gas irOptimized: 148273 // gas legacy: 150737 // gas legacyOptimized: 148690 // from_storage_ptr() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 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 5d4e5b45e4a9..567d36e67fb3 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 @@ -38,10 +38,10 @@ contract c { // compileViaYul: true // ---- // test1(uint256[][]): 0x20, 2, 0x40, 0x40, 2, 23, 42 -> 2, 65 -// gas irOptimized: 181029 +// gas irOptimized: 180215 // test2(uint256[][2]): 0x20, 0x40, 0x40, 2, 23, 42 -> 2, 65 -// gas irOptimized: 157604 +// gas irOptimized: 157178 // test3(uint256[2][]): 0x20, 2, 23, 42, 23, 42 -> 2, 65 -// gas irOptimized: 134801 +// gas irOptimized: 134405 // test4(uint256[2][2]): 23, 42, 23, 42 -> 65 -// gas irOptimized: 111177 +// gas irOptimized: 111036 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 b892ec991ce3..ab3ed7703286 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 @@ -38,12 +38,12 @@ contract Test { } // ---- // test() -> 24 -// gas irOptimized: 226734 +// gas irOptimized: 225759 // gas legacy: 227083 // gas legacyOptimized: 226529 // test1() -> 3 // test2() -> 6 // test3() -> 24 -// gas irOptimized: 141319 +// gas irOptimized: 140911 // gas legacy: 142238 // gas legacyOptimized: 141365 diff --git a/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic.sol b/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic.sol index ab3c172d3399..7d453daab944 100644 --- a/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic.sol +++ b/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic.sol @@ -45,7 +45,7 @@ contract C { } // ---- // copyExternalStorageArrayOfFunctionType() -> true -// gas irOptimized: 104566 +// gas irOptimized: 104257 // gas legacy: 108554 // gas legacyOptimized: 102405 // copyInternalArrayOfFunctionType() -> true diff --git a/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic_different_mutability.sol b/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic_different_mutability.sol index 2bb3bcf333e3..271a1074d3e3 100644 --- a/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic_different_mutability.sol +++ b/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic_different_mutability.sol @@ -48,7 +48,7 @@ contract C { } // ---- // copyExternalStorageArraysOfFunctionType() -> true -// gas irOptimized: 104238 +// gas irOptimized: 104008 // gas legacy: 108295 // gas legacyOptimized: 102162 // copyInternalArrayOfFunctionType() -> true 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 3147401cfa1d..500e21cc10a0 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: 120747 +// gas irOptimized: 120161 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 5b3fe1f7016f..6e213e82e80f 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: 118796 +// gas irOptimized: 119079 diff --git a/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_calldata_to_storage.sol b/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_calldata_to_storage.sol index 09037719a6f0..f97670eb0d1e 100644 --- a/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_calldata_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_calldata_to_storage.sol @@ -23,4 +23,4 @@ contract C { // compileViaYul: true // ---- // f((uint256[])[]): 0x20, 3, 0x60, 0x60, 0x60, 0x20, 3, 1, 2, 3 -> 3, 1 -// gas irOptimized: 327456 +// gas irOptimized: 324374 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 355c268f2514..315196e25859 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: 181928 +// gas irOptimized: 180607 diff --git a/test/libsolidity/semanticTests/array/copying/array_storage_multi_items_per_slot.sol b/test/libsolidity/semanticTests/array/copying/array_storage_multi_items_per_slot.sol index 3578f0a81e73..1fd45b4459c8 100644 --- a/test/libsolidity/semanticTests/array/copying/array_storage_multi_items_per_slot.sol +++ b/test/libsolidity/semanticTests/array/copying/array_storage_multi_items_per_slot.sol @@ -12,6 +12,6 @@ contract C { } // ---- // f() -> 1, 2, 3 -// gas irOptimized: 131939 +// gas irOptimized: 133205 // gas legacy: 134605 // gas legacyOptimized: 131938 diff --git a/test/libsolidity/semanticTests/array/copying/array_to_mapping.sol b/test/libsolidity/semanticTests/array/copying/array_to_mapping.sol index c5519e83aa43..1fd90f3f22f2 100644 --- a/test/libsolidity/semanticTests/array/copying/array_to_mapping.sol +++ b/test/libsolidity/semanticTests/array/copying/array_to_mapping.sol @@ -37,7 +37,7 @@ contract C { } // ---- // from_storage() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 -// gas irOptimized: 147755 +// gas irOptimized: 146444 // gas legacy: 148892 // gas legacyOptimized: 146917 // from_storage_ptr() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 diff --git a/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol b/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol index 90012eed4c77..b1b842bfc9d8 100644 --- a/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol +++ b/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol @@ -5,11 +5,11 @@ contract c { } // ---- // set(uint256): 1, 2 -> true -// gas irOptimized: 110550 +// gas irOptimized: 110343 // gas legacy: 111310 // gas legacyOptimized: 110741 // set(uint256): 2, 2, 3, 4, 5 -> true -// gas irOptimized: 177501 +// gas irOptimized: 177234 // gas legacy: 178312 // gas legacyOptimized: 177716 // 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 fe758fe8fd13..1658a831826a 100644 --- a/test/libsolidity/semanticTests/array/copying/bytes_storage_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/bytes_storage_to_storage.sol @@ -21,21 +21,21 @@ contract c { // gas legacy: 112904 // gas legacyOptimized: 112647 // f(uint256): 32 -> 0x20, 0x20, 1780731860627700044960722568376592200742329637303199754547598369979440671 -// gas irOptimized: 117825 +// gas irOptimized: 108032 // gas legacy: 128964 // gas legacyOptimized: 128854 // f(uint256): 33 -> 0x20, 33, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x2000000000000000000000000000000000000000000000000000000000000000 -// gas irOptimized: 124091 +// gas irOptimized: 113986 // gas legacy: 136092 // gas legacyOptimized: 135469 // f(uint256): 63 -> 0x20, 0x3f, 1780731860627700044960722568376592200742329637303199754547598369979440671, 14532552714582660066924456880521368950258152170031413196862950297402215316992 -// gas irOptimized: 127151 +// gas irOptimized: 108316 // gas legacy: 148692 // gas legacyOptimized: 148699 // f(uint256): 12 -> 0x20, 0x0c, 0x0102030405060708090a0b0000000000000000000000000000000000000000 // gas legacy: 59345 // gas legacyOptimized: 57279 // f(uint256): 129 -> 0x20, 0x81, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f, 29063324697304692433803953038474361308315562010425523193971352996434451193439, 0x606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f, -57896044618658097711785492504343953926634992332820282019728792003956564819968 -// gas irOptimized: 416918 +// gas irOptimized: 378684 // gas legacy: 458997 // gas legacyOptimized: 460664 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 3df22c725192..fe2ce5d4412b 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: 111084 +// gas irOptimized: 110803 // gas legacy: 111548 // gas legacyOptimized: 111321 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 48460586d280..03bddaeff30f 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: 139587 +// gas irOptimized: 138171 diff --git a/test/libsolidity/semanticTests/array/copying/cleanup_during_multi_element_per_slot_copy.sol b/test/libsolidity/semanticTests/array/copying/cleanup_during_multi_element_per_slot_copy.sol index e6284072d1f9..21b6429ac3f2 100644 --- a/test/libsolidity/semanticTests/array/copying/cleanup_during_multi_element_per_slot_copy.sol +++ b/test/libsolidity/semanticTests/array/copying/cleanup_during_multi_element_per_slot_copy.sol @@ -16,8 +16,8 @@ contract C { } // ---- // constructor() -// gas irOptimized: 90065 -// gas irOptimized code: 149000 +// gas irOptimized: 43601 +// gas irOptimized code: 175800 // gas legacy: 89553 // gas legacy code: 126200 // gas legacyOptimized: 83556 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 787973c5f0e5..dcb33f997a8e 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: 179405 +// gas irOptimized: 178740 // gas legacy: 180675 // gas legacyOptimized: 179686 // g() -> 0x40, 0xc0, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000, 0x11, 0x3132333435363738393233343536373839000000000000000000000000000000 -// gas irOptimized: 106338 +// gas irOptimized: 105591 // gas legacy: 109415 // gas legacyOptimized: 106600 // h() -> 0x40, 0x60, 0x00, 0x00 diff --git a/test/libsolidity/semanticTests/array/copying/copy_byte_array_to_storage.sol b/test/libsolidity/semanticTests/array/copying/copy_byte_array_to_storage.sol index fc274bf47b28..6677feb7f1b4 100644 --- a/test/libsolidity/semanticTests/array/copying/copy_byte_array_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/copy_byte_array_to_storage.sol @@ -46,6 +46,6 @@ contract C { } // ---- // f() -> 0xff -// gas irOptimized: 143857 +// gas irOptimized: 143148 // gas legacy: 153404 // gas legacyOptimized: 146676 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 7db82f891dfb..d2c0c38a0aed 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: 122459 +// gas irOptimized: 122025 // 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 46216e912ce4..3bae89dcd295 100644 --- a/test/libsolidity/semanticTests/array/copying/copy_removes_bytes_data.sol +++ b/test/libsolidity/semanticTests/array/copying/copy_removes_bytes_data.sol @@ -7,7 +7,7 @@ contract c { } // ---- // set(): 1, 2, 3, 4, 5 -> true -// gas irOptimized: 177344 +// gas irOptimized: 177101 // gas legacy: 177953 // gas legacyOptimized: 177550 // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/array/copying/copying_bytes_multiassign.sol b/test/libsolidity/semanticTests/array/copying/copying_bytes_multiassign.sol index ce4344e871db..77d2c0ad0398 100644 --- a/test/libsolidity/semanticTests/array/copying/copying_bytes_multiassign.sol +++ b/test/libsolidity/semanticTests/array/copying/copying_bytes_multiassign.sol @@ -18,7 +18,7 @@ contract sender { } // ---- // (): 7 -> -// gas irOptimized: 110822 +// gas irOptimized: 110511 // gas legacy: 111388 // gas legacyOptimized: 111065 // val() -> 0 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 672e7435f1a9..bba096b23dd3 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: 327921 +// gas irOptimized: 324505 // 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: 141162 +// gas irOptimized: 139883 // 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: 188442 +// gas irOptimized: 186247 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 f232d8aba9d4..c9b2c7d9c842 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: 332567 +// gas irOptimized: 327644 // 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: 145409 +// gas irOptimized: 142828 // 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: 192248 +// gas irOptimized: 188869 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 640046a11a4f..43c04d8ace9a 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: 116518 +// gas irOptimized: 114853 // gas legacy: 118841 // gas legacyOptimized: 116843 // test2() -> 0x20, 0x14, "[b called][a called]" // test3() -> 0x20, 0x14, "[b called][a called]" -// gas irOptimized: 103144 +// gas irOptimized: 102154 // gas legacy: 102654 // gas legacyOptimized: 101556 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 8a4d870b22f8..ef21e274fe76 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: 128296 +// gas irOptimized: 124666 // gas legacy: 129077 // gas legacyOptimized: 128210 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 f3934fec0f6f..8764faf609b3 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,15 +70,15 @@ contract C { } // ---- // test1() -> -// gas irOptimized: 150488 +// gas irOptimized: 149912 // gas legacy: 150949 // gas legacyOptimized: 150906 // test2() -> FAILURE -// gas irOptimized: 150389 +// gas irOptimized: 150117 // gas legacy: 150672 // gas legacyOptimized: 150575 // test3() -> -// gas irOptimized: 124300 +// gas irOptimized: 123931 // gas legacy: 125333 // gas legacyOptimized: 125127 // test4() -> 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 7621b2477e03..5b4d9f17e1fb 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: 304788 +// gas irOptimized: 301359 // 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: 116653 +// gas irOptimized: 115401 // 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: 187994 +// gas irOptimized: 185705 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 8ec3f77691b5..4ab40fc49980 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: 309072 +// gas irOptimized: 304225 // 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: 118314 +// gas irOptimized: 116554 // 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: 191045 +// gas irOptimized: 187779 diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_storage_to_storage.sol b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_storage_to_storage.sol index d0d1691597ee..276966db9c61 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_storage_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_storage_to_storage.sol @@ -63,7 +63,7 @@ contract C { // compileViaYul: true // ---- // test1() -// gas irOptimized: 123195 +// gas irOptimized: 122849 // test2() -// gas irOptimized: 123018 +// gas irOptimized: 122894 // test3() 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 57b3dc521f65..9b509a518411 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 @@ -30,7 +30,7 @@ contract C { // compileViaYul: true // ---- // test(uint8[][][]): 0x20, 2, 0x40, 0x60, 0, 2, 0x40, 0x80, 1, 7, 2, 8, 9 -// gas irOptimized: 137897 +// gas irOptimized: 137272 // test2(uint8[][]): 0x20, 2, 0x40, 0x80, 1, 7, 2, 8, 9 -// gas irOptimized: 164482 +// gas irOptimized: 163311 // 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 2a486d256355..fd905fb583b7 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: 206440 +// gas irOptimized: 206128 // gas legacy: 211758 // gas legacyOptimized: 211179 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 e5a6ae53b2da..cee95dd9222c 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: 202083 +// gas irOptimized: 201476 // gas legacy: 204327 // gas legacyOptimized: 202899 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 5ec2cbcf43dc..e8e734cf4d3b 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: 206440 +// gas irOptimized: 206128 // gas legacy: 211770 // gas legacyOptimized: 211191 diff --git a/test/libsolidity/semanticTests/array/copying/storage_memory_nested_struct.sol b/test/libsolidity/semanticTests/array/copying/storage_memory_nested_struct.sol index b37aa96ea6e0..2aa6210b0a68 100644 --- a/test/libsolidity/semanticTests/array/copying/storage_memory_nested_struct.sol +++ b/test/libsolidity/semanticTests/array/copying/storage_memory_nested_struct.sol @@ -24,6 +24,6 @@ contract C { } // ---- // f() -> 11, 0x0c, 1, 0x15, 22, 4 -// gas irOptimized: 291212 +// gas irOptimized: 290233 // gas legacy: 293398 // gas legacyOptimized: 290218 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 a8a1b36e1bf1..2242b2bcf562 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: 114338 +// gas irOptimized: 113603 // gas legacy: 122231 // gas legacyOptimized: 118409 diff --git a/test/libsolidity/semanticTests/array/create_memory_array.sol b/test/libsolidity/semanticTests/array/create_memory_array.sol index 00f32a6e0860..2165320d9880 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: 136664 +// gas irOptimized: 127777 // gas legacy: 121380 // 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 f776626ae8e3..c92216449c84 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: 218449 +// gas irOptimized: 207664 // gas legacy: 242263 // gas legacyOptimized: 241182 diff --git a/test/libsolidity/semanticTests/array/dynamic_array_cleanup.sol b/test/libsolidity/semanticTests/array/dynamic_array_cleanup.sol index b2be566a9df1..b13967d401a0 100644 --- a/test/libsolidity/semanticTests/array/dynamic_array_cleanup.sol +++ b/test/libsolidity/semanticTests/array/dynamic_array_cleanup.sol @@ -14,7 +14,7 @@ contract c { // ---- // storageEmpty -> 1 // fill() -> -// gas irOptimized: 519494 +// gas irOptimized: 518047 // gas legacy: 518943 // gas legacyOptimized: 515555 // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol b/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol index f96473739fa5..6027ad431390 100644 --- a/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol +++ b/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol @@ -41,7 +41,7 @@ contract c { // ---- // getLengths() -> 0, 0 // setLengths(uint256,uint256): 48, 49 -> -// gas irOptimized: 112674 +// gas irOptimized: 107763 // gas legacy: 108272 // gas legacyOptimized: 100268 // getLengths() -> 48, 49 diff --git a/test/libsolidity/semanticTests/array/dynamic_multi_array_cleanup.sol b/test/libsolidity/semanticTests/array/dynamic_multi_array_cleanup.sol index 2db14a939e5a..8f7aeab63f41 100644 --- a/test/libsolidity/semanticTests/array/dynamic_multi_array_cleanup.sol +++ b/test/libsolidity/semanticTests/array/dynamic_multi_array_cleanup.sol @@ -16,7 +16,7 @@ contract c { // ---- // storageEmpty -> 1 // fill() -> 8 -// gas irOptimized: 122985 +// gas irOptimized: 122229 // gas legacy: 121602 // gas legacyOptimized: 120589 // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol b/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol index ebe2186fd60f..1c0405aa4d49 100644 --- a/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol +++ b/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol @@ -10,7 +10,7 @@ contract c { // ---- // storageEmpty -> 1 // fill() -> -// gas irOptimized: 465013 +// gas irOptimized: 464480 // gas legacy: 468825 // gas legacyOptimized: 466238 // storageEmpty -> 0 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 e4bf3a7197e7..adec72b966ca 100644 --- a/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol +++ b/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol @@ -18,8 +18,8 @@ contract B { } // ---- // f() -> 2, 3, 4, 5, 6, 1000, 1001, 1002, 1003, 1004 -// gas irOptimized: 59212 -// gas irOptimized code: 56600 +// gas irOptimized: 57989 +// gas irOptimized code: 59800 // gas legacy: 68001 // gas legacy code: 162000 // gas legacyOptimized: 59997 diff --git a/test/libsolidity/semanticTests/array/function_array_cross_calls.sol b/test/libsolidity/semanticTests/array/function_array_cross_calls.sol index f3dea83bfbab..0e0f0b2f0105 100644 --- a/test/libsolidity/semanticTests/array/function_array_cross_calls.sol +++ b/test/libsolidity/semanticTests/array/function_array_cross_calls.sol @@ -42,8 +42,8 @@ contract C { } // ---- // test() -> 5, 6, 7 -// gas irOptimized: 86484 -// gas irOptimized code: 161200 +// gas irOptimized: 84282 +// gas irOptimized code: 175600 // gas legacy: 97551 // gas legacy code: 342800 // gas legacyOptimized: 87808 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 95df74b4d77b..2955ec9c0bea 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,7 +40,7 @@ contract C { // copyFromStorageShort() // x() -> 0x20, 3, 0x6162630000000000000000000000000000000000000000000000000000000000 // copyFromStorageLong() -// gas irOptimized: 121095 +// gas irOptimized: 120667 // gas legacy: 121904 // gas legacyOptimized: 121388 // x() -> 0x20, 0x25, 0x3132333435363738393031323334353637383930313233343536373839303132, 0x3334353637000000000000000000000000000000000000000000000000000000 diff --git a/test/libsolidity/semanticTests/array/nested_calldata_storage.sol b/test/libsolidity/semanticTests/array/nested_calldata_storage.sol index 7cc9753bec8f..ddb9a012f7c3 100644 --- a/test/libsolidity/semanticTests/array/nested_calldata_storage.sol +++ b/test/libsolidity/semanticTests/array/nested_calldata_storage.sol @@ -8,6 +8,6 @@ contract C { // compileViaYul: true // ---- // i(uint256[][2]): 0x20, 0x40, 0xC0, 3, 0x0A01, 0x0A02, 0x0A03, 4, 0x0B01, 0x0B02, 0x0B03, 0x0B04 -// gas irOptimized: 223100 +// gas irOptimized: 222766 // tmp_i(uint256,uint256): 0, 0 -> 0x0A01 // tmp_i(uint256,uint256): 1, 0 -> 0x0B01 diff --git a/test/libsolidity/semanticTests/array/nested_calldata_storage2.sol b/test/libsolidity/semanticTests/array/nested_calldata_storage2.sol index f8db31b54cc8..5176487a8a7d 100644 --- a/test/libsolidity/semanticTests/array/nested_calldata_storage2.sol +++ b/test/libsolidity/semanticTests/array/nested_calldata_storage2.sol @@ -8,6 +8,6 @@ contract C { // compileViaYul: true // ---- // i(uint256[][]): 0x20, 2, 0x40, 0xC0, 3, 0x0A01, 0x0A02, 0x0A03, 4, 0x0B01, 0x0B02, 0x0B03, 0x0B04 -// gas irOptimized: 245506 +// gas irOptimized: 245114 // tmp_i(uint256,uint256): 0, 0 -> 0x0A01 // tmp_i(uint256,uint256): 1, 0 -> 0x0B01 diff --git a/test/libsolidity/semanticTests/array/pop/array_pop_array_transition.sol b/test/libsolidity/semanticTests/array/pop/array_pop_array_transition.sol index 96fb11a2dc94..589813e58d69 100644 --- a/test/libsolidity/semanticTests/array/pop/array_pop_array_transition.sol +++ b/test/libsolidity/semanticTests/array/pop/array_pop_array_transition.sol @@ -23,7 +23,7 @@ contract c { } // ---- // test() -> 1, 2, 3 -// gas irOptimized: 1828226 +// gas irOptimized: 1819702 // gas legacy: 1822464 // gas legacyOptimized: 1813404 // storageEmpty -> 1 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 0c68ab70c600..726a98858a64 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: 148380 +// gas irOptimized: 143889 // gas legacy: 151182 // 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 86165dde2844..03e15028b233 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: 125889 +// gas irOptimized: 123064 // gas legacy: 127215 // gas legacyOptimized: 122224 // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty.sol b/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty.sol index 18afa649c8c5..d0ec4cadc764 100644 --- a/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty.sol +++ b/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty.sol @@ -16,7 +16,7 @@ contract c { } // ---- // test() -> true -// gas irOptimized: 138795 +// gas irOptimized: 126604 // gas legacy: 178396 // gas legacyOptimized: 163832 // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty_garbage_ref.sol b/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty_garbage_ref.sol index cbb10a0a1b07..84f08afcbaf2 100644 --- a/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty_garbage_ref.sol +++ b/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty_garbage_ref.sol @@ -15,7 +15,7 @@ contract c { } // ---- // test() -> -// gas irOptimized: 113631 +// gas irOptimized: 105416 // gas legacy: 131256 // gas legacyOptimized: 126668 // 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 3ef3571f4bab..db214d27a02a 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: 106762 +// gas irOptimized: 103162 // gas legacy: 121252 // gas legacyOptimized: 120370 diff --git a/test/libsolidity/semanticTests/array/push/array_push.sol b/test/libsolidity/semanticTests/array/push/array_push.sol index b8eab8733304..57d700d5a0c4 100644 --- a/test/libsolidity/semanticTests/array/push/array_push.sol +++ b/test/libsolidity/semanticTests/array/push/array_push.sol @@ -16,6 +16,6 @@ contract c { } // ---- // test() -> 5, 4, 3, 3 -// gas irOptimized: 111834 +// gas irOptimized: 111735 // gas legacy: 111804 // gas legacyOptimized: 111122 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 77ae8c4e23e4..b4519f9eebe6 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: 112852 +// gas irOptimized: 112465 // gas legacy: 113657 // gas legacyOptimized: 113465 diff --git a/test/libsolidity/semanticTests/array/push/array_push_struct.sol b/test/libsolidity/semanticTests/array/push/array_push_struct.sol index 92f071e1fb22..880038a8ef46 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: 135329 +// gas irOptimized: 135137 // gas legacy: 147437 // gas legacyOptimized: 146429 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 254c14b061cf..930111d7e3ea 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: 137153 +// gas irOptimized: 136763 // gas legacy: 142414 // gas legacyOptimized: 137975 diff --git a/test/libsolidity/semanticTests/array/push/byte_array_push_transition.sol b/test/libsolidity/semanticTests/array/push/byte_array_push_transition.sol index ffc47eaa395b..f4752ded631a 100644 --- a/test/libsolidity/semanticTests/array/push/byte_array_push_transition.sol +++ b/test/libsolidity/semanticTests/array/push/byte_array_push_transition.sol @@ -15,6 +15,6 @@ contract c { } // ---- // test() -> 0 -// gas irOptimized: 167569 +// gas irOptimized: 155259 // gas legacy: 206218 // gas legacyOptimized: 197297 diff --git a/test/libsolidity/semanticTests/array/push/nested_bytes_push.sol b/test/libsolidity/semanticTests/array/push/nested_bytes_push.sol index 5633199d4865..1be46a55957d 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: 179534 +// gas irOptimized: 179036 // gas legacy: 181013 // gas legacyOptimized: 180397 diff --git a/test/libsolidity/semanticTests/array/push/push_no_args_2d.sol b/test/libsolidity/semanticTests/array/push/push_no_args_2d.sol index 3b35719dbb8d..76784f2d5e08 100644 --- a/test/libsolidity/semanticTests/array/push/push_no_args_2d.sol +++ b/test/libsolidity/semanticTests/array/push/push_no_args_2d.sol @@ -27,14 +27,14 @@ contract C { // ---- // l() -> 0 // f(uint256,uint256): 42, 64 -> -// gas irOptimized: 112288 +// gas irOptimized: 108342 // gas legacy: 107925 // gas legacyOptimized: 101896 // l() -> 1 // ll(uint256): 0 -> 43 // a(uint256,uint256): 0, 42 -> 64 // f(uint256,uint256): 84, 128 -> -// gas irOptimized: 118708 +// gas irOptimized: 111066 // gas legacy: 109977 // gas legacyOptimized: 96331 // l() -> 2 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 de737593c099..b1d9363c3bed 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: 181778 +// gas irOptimized: 173754 // gas legacy: 175192 // gas legacyOptimized: 175005 // l() -> 70 diff --git a/test/libsolidity/semanticTests/array/reusing_memory.sol b/test/libsolidity/semanticTests/array/reusing_memory.sol index fd352dd61afd..f369a1b40289 100644 --- a/test/libsolidity/semanticTests/array/reusing_memory.sol +++ b/test/libsolidity/semanticTests/array/reusing_memory.sol @@ -24,8 +24,8 @@ contract Main { } // ---- // f(uint256): 0x34 -> 0x46bddb1178e94d7f2892ff5f366840eb658911794f2c3a44c450aa2c505186c1 -// gas irOptimized: 99552 -// gas irOptimized code: 12400 +// gas irOptimized: 99236 +// gas irOptimized code: 16200 // gas legacy: 101551 // gas legacy code: 23600 // gas legacyOptimized: 99612 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 33ab18450624..b046e972773d 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,7 +9,7 @@ contract c { // EVMVersion: >=byzantium // ---- // (): 1, 2, 3, 4, 5 -> -// gas irOptimized: 155122 +// gas irOptimized: 154865 // gas legacy: 155473 // gas legacyOptimized: 155295 // checkIfDataIsEmpty() -> false diff --git a/test/libsolidity/semanticTests/cleanup/byte_array_to_storage_cleanup.sol b/test/libsolidity/semanticTests/cleanup/byte_array_to_storage_cleanup.sol index 238f96b7e588..2672b7b82764 100644 --- a/test/libsolidity/semanticTests/cleanup/byte_array_to_storage_cleanup.sol +++ b/test/libsolidity/semanticTests/cleanup/byte_array_to_storage_cleanup.sol @@ -28,8 +28,8 @@ contract C { // compileViaYul: also // ---- // constructor() -> -// gas irOptimized: 82100 -// gas irOptimized code: 357600 +// gas irOptimized: 21029 +// gas irOptimized code: 343200 // gas legacy: 101532 // gas legacy code: 604800 // gas legacyOptimized: 84956 diff --git a/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol b/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol index aeeb1a0c1aa4..e08d301b9d01 100644 --- a/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol +++ b/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol @@ -26,8 +26,8 @@ contract Creator { // bytecodeFormat: legacy,>=EOFv1 // ---- // f(uint256,address[]): 7, 0x40, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 -> 7, 8 -// gas irOptimized: 327784 -// gas irOptimized code: 94000 +// gas irOptimized: 326287 +// gas irOptimized code: 102400 // gas legacy: 336623 // gas legacy code: 244800 // gas legacyOptimized: 329515 diff --git a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol index 55abe4804c56..3d7b360e0a03 100644 --- a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol +++ b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol @@ -26,8 +26,8 @@ contract Creator { // bytecodeFormat: legacy,>=EOFv1 // ---- // f(uint256,bytes): 7, 0x40, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" -> 7, "h" -// gas irOptimized: 169292 -// gas irOptimized code: 99600 +// gas irOptimized: 168446 +// gas irOptimized code: 107800 // gas legacy: 172941 // gas legacy code: 239800 // gas legacyOptimized: 169815 diff --git a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol index 13db633b9b06..1fa97815ee44 100644 --- a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol +++ b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol @@ -10,8 +10,8 @@ contract Test { // bytecodeFormat: legacy,>=EOFv1 // ---- // constructor(): 7, 0x40, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" -> -// gas irOptimized: 181465 -// gas irOptimized code: 78400 +// gas irOptimized: 134197 +// gas irOptimized code: 79200 // gas legacy: 195212 // gas legacy code: 109400 // gas legacyOptimized: 181608 diff --git a/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol b/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol index ed4eb6e4d15f..83f6bbf32d1e 100644 --- a/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol +++ b/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol @@ -11,8 +11,8 @@ contract C { // bytecodeFormat: legacy,>=EOFv1 // ---- // constructor(): 1, 2, 3, 4 -> -// gas irOptimized: 148129 -// gas irOptimized code: 23000 +// gas irOptimized: 110607 +// gas irOptimized code: 29000 // gas legacy: 157977 // gas legacy code: 60400 // gas legacyOptimized: 149973 diff --git a/test/libsolidity/semanticTests/constructor/no_callvalue_check.sol b/test/libsolidity/semanticTests/constructor/no_callvalue_check.sol index a46b6a6a8e8d..0900afe67149 100644 --- a/test/libsolidity/semanticTests/constructor/no_callvalue_check.sol +++ b/test/libsolidity/semanticTests/constructor/no_callvalue_check.sol @@ -19,8 +19,8 @@ contract C { // EVMVersion: >=constantinople // ---- // f(), 2000 ether -> true -// gas irOptimized: 117688 -// gas irOptimized code: 1800 +// gas irOptimized: 117348 +// gas irOptimized code: 13200 // gas legacy: 117889 // gas legacy code: 4800 // gas legacyOptimized: 117761 diff --git a/test/libsolidity/semanticTests/errors/small_error_optimization.sol b/test/libsolidity/semanticTests/errors/small_error_optimization.sol index 8128193b7056..e0af0777bae9 100644 --- a/test/libsolidity/semanticTests/errors/small_error_optimization.sol +++ b/test/libsolidity/semanticTests/errors/small_error_optimization.sol @@ -14,8 +14,8 @@ contract B { } // ---- // f() -> FAILURE, hex"92bbf6e8" -// gas irOptimized: 221918 -// gas irOptimized code: 42800 +// gas irOptimized: 218056 +// gas irOptimized code: 46000 // gas legacy: 233752 // gas legacy code: 38000 // gas legacyOptimized: 224863 diff --git a/test/libsolidity/semanticTests/events/event_dynamic_array_storage.sol b/test/libsolidity/semanticTests/events/event_dynamic_array_storage.sol index bdd355f68927..df1fda030bc9 100644 --- a/test/libsolidity/semanticTests/events/event_dynamic_array_storage.sol +++ b/test/libsolidity/semanticTests/events/event_dynamic_array_storage.sol @@ -13,6 +13,6 @@ contract C { // ---- // createEvent(uint256): 42 -> // ~ emit E(uint256[]): 0x20, 0x03, 0x2a, 0x2b, 0x2c -// gas irOptimized: 114231 +// gas irOptimized: 114375 // gas legacy: 116313 // gas legacyOptimized: 114407 diff --git a/test/libsolidity/semanticTests/events/event_dynamic_array_storage_v2.sol b/test/libsolidity/semanticTests/events/event_dynamic_array_storage_v2.sol index cecf31b42d9f..9527e92d554e 100644 --- a/test/libsolidity/semanticTests/events/event_dynamic_array_storage_v2.sol +++ b/test/libsolidity/semanticTests/events/event_dynamic_array_storage_v2.sol @@ -14,6 +14,6 @@ contract C { // ---- // createEvent(uint256): 42 -> // ~ emit E(uint256[]): 0x20, 0x03, 0x2a, 0x2b, 0x2c -// gas irOptimized: 114231 +// gas irOptimized: 114375 // gas legacy: 116313 // gas legacyOptimized: 114407 diff --git a/test/libsolidity/semanticTests/events/event_dynamic_nested_array_storage_v2.sol b/test/libsolidity/semanticTests/events/event_dynamic_nested_array_storage_v2.sol index 1ff58d65b566..abb621e96300 100644 --- a/test/libsolidity/semanticTests/events/event_dynamic_nested_array_storage_v2.sol +++ b/test/libsolidity/semanticTests/events/event_dynamic_nested_array_storage_v2.sol @@ -15,6 +15,6 @@ contract C { // ---- // createEvent(uint256): 42 -> // ~ emit E(uint256[][]): 0x20, 0x02, 0x40, 0xa0, 0x02, 0x2a, 0x2b, 0x02, 0x2c, 0x2d -// gas irOptimized: 185148 +// gas irOptimized: 184839 // gas legacy: 187493 // gas legacyOptimized: 184548 diff --git a/test/libsolidity/semanticTests/events/event_indexed_string.sol b/test/libsolidity/semanticTests/events/event_indexed_string.sol index 2e4b110692fb..cb4c9c8200ec 100644 --- a/test/libsolidity/semanticTests/events/event_indexed_string.sol +++ b/test/libsolidity/semanticTests/events/event_indexed_string.sol @@ -17,6 +17,6 @@ contract C { // ---- // deposit() -> // ~ emit E(string,uint256[4]): #0xa7fb06bb999a5eb9aff9e0779953f4e1e4ce58044936c2f51c7fb879b85c08bd, #0xe755d8cc1a8cde16a2a31160dcd8017ac32d7e2f13215b29a23cdae40a78aa81 -// gas irOptimized: 332788 +// gas irOptimized: 314035 // gas legacy: 366022 // gas legacyOptimized: 362429 diff --git a/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol b/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol index 47feaf5258bb..33f9d1b99a5b 100644 --- a/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol +++ b/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol @@ -74,8 +74,8 @@ contract FixedFeeRegistrar is Registrar { } // ---- // constructor() -// gas irOptimized: 78076 -// gas irOptimized code: 307400 +// gas irOptimized: 21029 +// gas irOptimized code: 350200 // gas legacy: 115395 // gas legacy code: 792400 // gas legacyOptimized: 84598 diff --git a/test/libsolidity/semanticTests/externalContracts/base64.sol b/test/libsolidity/semanticTests/externalContracts/base64.sol index 6e23da855783..ca88838db94f 100644 --- a/test/libsolidity/semanticTests/externalContracts/base64.sol +++ b/test/libsolidity/semanticTests/externalContracts/base64.sol @@ -33,8 +33,8 @@ contract test { // EVMVersion: >=constantinople // ---- // constructor() -// gas irOptimized: 79076 -// gas irOptimized code: 322000 +// gas irOptimized: 21029 +// gas irOptimized code: 333400 // gas legacy: 102214 // gas legacy code: 629800 // gas legacyOptimized: 87926 @@ -54,10 +54,10 @@ contract test { // encode_no_asm(bytes): 0x20, 5, "fooba" -> 0x20, 8, "Zm9vYmE=" // encode_no_asm(bytes): 0x20, 6, "foobar" -> 0x20, 8, "Zm9vYmFy" // encode_inline_asm_large() -// gas irOptimized: 1406025 +// gas irOptimized: 1120982 // gas legacy: 1554038 // gas legacyOptimized: 1132031 // encode_no_asm_large() -// gas irOptimized: 3512081 +// gas irOptimized: 2513013 // gas legacy: 4600082 // gas legacyOptimized: 2813075 diff --git a/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol b/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol index c53e49f1f032..3399fc79bf6e 100644 --- a/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol +++ b/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol @@ -176,8 +176,8 @@ contract DepositContract is IDepositContract, ERC165 { } // ---- // constructor() -// gas irOptimized: 809570 -// gas irOptimized code: 558000 +// gas irOptimized: 727457 +// gas irOptimized code: 643600 // gas legacy: 920228 // gas legacy code: 1438800 // gas legacyOptimized: 848699 @@ -187,27 +187,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: 109178 +// gas irOptimized: 107598 // gas legacy: 142741 // gas legacyOptimized: 117558 // 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: 109178 +// gas irOptimized: 107598 // gas legacy: 142741 // gas legacyOptimized: 117558 // 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: 109174 +// gas irOptimized: 107591 // gas legacy: 142750 // gas legacyOptimized: 117570 // 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: 109174 +// gas irOptimized: 107591 // gas legacy: 142750 // gas legacyOptimized: 117570 // 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 cb345757f8e1..2407c9f7bb0a 100644 --- a/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol +++ b/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol @@ -48,8 +48,8 @@ contract test { } // ---- // constructor() -// gas irOptimized: 177903 -// gas irOptimized code: 1674400 +// gas irOptimized: 21029 +// gas irOptimized code: 1645600 // gas legacy: 209723 // gas legacy code: 2205000 // gas legacyOptimized: 178012 diff --git a/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol b/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol index 5902ba4905b1..953ad5717bab 100644 --- a/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol +++ b/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol @@ -48,8 +48,8 @@ contract test { } // ---- // constructor() -// gas irOptimized: 170626 -// gas irOptimized code: 1577400 +// gas irOptimized: 21029 +// gas irOptimized code: 1536600 // gas legacy: 195206 // gas legacy code: 1999000 // gas legacyOptimized: 168857 diff --git a/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol b/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol index 70a3004ac4b6..c0c47e2621c0 100644 --- a/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol +++ b/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol @@ -33,8 +33,8 @@ contract test { } // ---- // constructor() -// gas irOptimized: 77816 -// gas irOptimized code: 307600 +// gas irOptimized: 21029 +// gas irOptimized code: 450400 // gas legacy: 92110 // gas legacy code: 523600 // gas legacyOptimized: 82667 diff --git a/test/libsolidity/semanticTests/externalContracts/snark.sol b/test/libsolidity/semanticTests/externalContracts/snark.sol index c073993e1d37..e7c7c974d848 100644 --- a/test/libsolidity/semanticTests/externalContracts/snark.sol +++ b/test/libsolidity/semanticTests/externalContracts/snark.sol @@ -292,11 +292,11 @@ contract Test { // f() -> true // g() -> true // pair() -> true -// gas irOptimized: 275229 +// gas irOptimized: 269685 // gas legacy: 293579 // gas legacyOptimized: 276313 // verifyTx() -> true // ~ emit Verified(string): 0x20, 0x16, "Successfully verified." -// gas irOptimized: 818076 +// gas irOptimized: 794331 // gas legacy: 904397 // gas legacyOptimized: 816770 diff --git a/test/libsolidity/semanticTests/externalContracts/strings.sol b/test/libsolidity/semanticTests/externalContracts/strings.sol index cb9616bbe40b..7e510f3e22fe 100644 --- a/test/libsolidity/semanticTests/externalContracts/strings.sol +++ b/test/libsolidity/semanticTests/externalContracts/strings.sol @@ -49,8 +49,8 @@ contract test { } // ---- // constructor() -// gas irOptimized: 95303 -// gas irOptimized code: 520000 +// gas irOptimized: 21029 +// gas irOptimized code: 530000 // gas legacy: 126346 // gas legacy code: 932600 // gas legacyOptimized: 102639 @@ -72,6 +72,6 @@ contract test { // gas legacy: 31621 // gas legacyOptimized: 27914 // benchmark(string,bytes32): 0x40, 0x0842021, 8, "solidity" -> 0x2020 -// gas irOptimized: 1976778 +// gas irOptimized: 1240977 // gas legacy: 4234020 // gas legacyOptimized: 2318668 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 08e9f36f5981..d2e621152822 100644 --- a/test/libsolidity/semanticTests/functionCall/creation_function_call_with_args.sol +++ b/test/libsolidity/semanticTests/functionCall/creation_function_call_with_args.sol @@ -15,8 +15,8 @@ contract D { } // ---- // constructor(): 2 -> -// gas irOptimized: 138930 -// gas irOptimized code: 53800 +// gas irOptimized: 97736 +// gas irOptimized code: 60000 // gas legacy: 145569 // gas legacy code: 95600 // gas legacyOptimized: 138297 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 320b105637f1..2f99afe12626 100644 --- a/test/libsolidity/semanticTests/functionCall/creation_function_call_with_salt.sol +++ b/test/libsolidity/semanticTests/functionCall/creation_function_call_with_salt.sol @@ -17,8 +17,8 @@ contract D { // EVMVersion: >=constantinople // ---- // constructor(): 2 -> -// gas irOptimized: 139112 -// gas irOptimized code: 53800 +// gas irOptimized: 97742 +// gas irOptimized code: 60000 // gas legacy: 145935 // gas legacy code: 95600 // gas legacyOptimized: 138529 diff --git a/test/libsolidity/semanticTests/functionCall/eof/external_call_to_nonexisting.sol b/test/libsolidity/semanticTests/functionCall/eof/external_call_to_nonexisting.sol index bc39e963344b..9053028ae6fd 100644 --- a/test/libsolidity/semanticTests/functionCall/eof/external_call_to_nonexisting.sol +++ b/test/libsolidity/semanticTests/functionCall/eof/external_call_to_nonexisting.sol @@ -24,8 +24,8 @@ contract C { // bytecodeFormat: >=EOFv1 // ---- // constructor(), 1 ether -> -// gas irOptimized: 88853 -// gas irOptimized code: 164400 +// gas irOptimized: 43154 +// gas irOptimized code: 163200 // gas legacy: 102721 // gas legacy code: 334400 // gas legacyOptimized: 91499 diff --git a/test/libsolidity/semanticTests/functionCall/failed_create.sol b/test/libsolidity/semanticTests/functionCall/failed_create.sol index 87bd12d58b75..d8629a74a7b8 100644 --- a/test/libsolidity/semanticTests/functionCall/failed_create.sol +++ b/test/libsolidity/semanticTests/functionCall/failed_create.sol @@ -17,8 +17,8 @@ contract C { // EVMVersion: >=constantinople // ---- // constructor(), 20 wei -// gas irOptimized: 59688 -// gas irOptimized code: 81800 +// gas irOptimized: 21023 +// gas irOptimized code: 91000 // gas legacy: 64468 // gas legacy code: 145400 // gas legacyOptimized: 60443 @@ -28,7 +28,7 @@ contract C { // f(uint256): 20 -> FAILURE // x() -> 1 // stack(uint256): 1023 -> FAILURE -// gas irOptimized: 298110 +// gas irOptimized: 168987 // gas legacy: 527207 // gas legacyOptimized: 353607 // x() -> 1 diff --git a/test/libsolidity/semanticTests/functionCall/mapping_array_internal_argument.sol b/test/libsolidity/semanticTests/functionCall/mapping_array_internal_argument.sol index 7505e20cce47..336450d77a25 100644 --- a/test/libsolidity/semanticTests/functionCall/mapping_array_internal_argument.sol +++ b/test/libsolidity/semanticTests/functionCall/mapping_array_internal_argument.sol @@ -18,7 +18,7 @@ contract test { } // ---- // set(uint8,uint8,uint8,uint8,uint8): 1, 21, 22, 42, 43 -> 0, 0, 0, 0 -// gas irOptimized: 111237 +// gas irOptimized: 111695 // gas legacy: 113742 // gas legacyOptimized: 111768 // get(uint8): 1 -> 21, 22, 42, 43 diff --git a/test/libsolidity/semanticTests/immutable/immutable_tag_too_large_bug.sol b/test/libsolidity/semanticTests/immutable/immutable_tag_too_large_bug.sol index fed424628c0e..2b06677903a9 100644 --- a/test/libsolidity/semanticTests/immutable/immutable_tag_too_large_bug.sol +++ b/test/libsolidity/semanticTests/immutable/immutable_tag_too_large_bug.sol @@ -41,8 +41,8 @@ contract C { // compileViaYul: true // ---- // constructor() -> -// gas irOptimized: 73171 -// gas irOptimized code: 291200 +// gas irOptimized: 21271 +// gas irOptimized code: 172200 // gas legacy: 83499 // gas legacy code: 408800 // f() -> -1, 1 diff --git a/test/libsolidity/semanticTests/immutable/multi_creation.sol b/test/libsolidity/semanticTests/immutable/multi_creation.sol index 515dd41bb1b1..e1cc91767704 100644 --- a/test/libsolidity/semanticTests/immutable/multi_creation.sol +++ b/test/libsolidity/semanticTests/immutable/multi_creation.sol @@ -29,8 +29,8 @@ contract C { // EVMVersion: >=constantinople // ---- // f() -> 3, 7, 5 -// gas irOptimized: 86892 -// gas irOptimized code: 37200 +// gas irOptimized: 86328 +// gas irOptimized code: 45600 // gas legacy: 87839 // gas legacy code: 60800 // gas legacyOptimized: 86870 diff --git a/test/libsolidity/semanticTests/inheritance/constructor_with_params_diamond_inheritance.sol b/test/libsolidity/semanticTests/inheritance/constructor_with_params_diamond_inheritance.sol index decb6fc259d4..9789a5311c4d 100644 --- a/test/libsolidity/semanticTests/inheritance/constructor_with_params_diamond_inheritance.sol +++ b/test/libsolidity/semanticTests/inheritance/constructor_with_params_diamond_inheritance.sol @@ -21,8 +21,8 @@ contract D is B, C { } // ---- // constructor(): 2, 0 -> -// gas irOptimized: 124350 -// gas irOptimized code: 27600 +// gas irOptimized: 87757 +// gas irOptimized code: 33600 // gas legacy: 128222 // gas legacy code: 40400 // gas legacyOptimized: 123920 diff --git a/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol b/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol index 07beb2c537d8..cabd5600abb1 100644 --- a/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol +++ b/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol @@ -22,7 +22,8 @@ contract B { } // ---- // g() -> 42 -// gas irOptimized: 100282 +// gas irOptimized: 54451 +// gas irOptimized code: 51600 // gas legacy: 56839 // gas legacy code: 123600 // gas legacyOptimized: 55001 diff --git a/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol b/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol index 39b25c005f0e..40575a7c86bc 100644 --- a/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol +++ b/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol @@ -39,8 +39,8 @@ contract Main { } // ---- // constructor(), 22 wei -> -// gas irOptimized: 143864 -// gas irOptimized code: 118000 +// gas irOptimized: 97641 +// gas irOptimized code: 124200 // gas legacy: 156599 // gas legacy code: 236400 // gas legacyOptimized: 143592 diff --git a/test/libsolidity/semanticTests/inlineAssembly/transient_storage_low_level_calls.sol b/test/libsolidity/semanticTests/inlineAssembly/transient_storage_low_level_calls.sol index d3714e7dfca5..133b58df25cb 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/transient_storage_low_level_calls.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/transient_storage_low_level_calls.sol @@ -68,8 +68,8 @@ contract C { // testCall() -> true // tloadAllowedStaticCall() -> true // tstoreNotAllowedStaticCall() -> true -// gas irOptimized: 98419721 -// gas irOptimized code: 19000 +// gas irOptimized: 98414570 +// gas irOptimized code: 24200 // gas legacy: 98409087 // gas legacy code: 30000 // gas legacyOptimized: 98420962 diff --git a/test/libsolidity/semanticTests/inlineAssembly/tstore_hidden_staticcall.sol b/test/libsolidity/semanticTests/inlineAssembly/tstore_hidden_staticcall.sol index 4e4f30a75618..18bbdd7117c1 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/tstore_hidden_staticcall.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/tstore_hidden_staticcall.sol @@ -18,6 +18,6 @@ contract C { // EVMVersion: >=cancun // ---- // test() -> FAILURE -// gas irOptimized: 98437877 +// gas irOptimized: 98437867 // gas legacy: 98437871 // gas legacyOptimized: 98437872 diff --git a/test/libsolidity/semanticTests/libraries/internal_types_in_library.sol b/test/libsolidity/semanticTests/libraries/internal_types_in_library.sol index d59cedfdc860..d18a9f316a2c 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: 111419 +// gas irOptimized: 113374 // gas legacy: 132930 // gas legacyOptimized: 118020 diff --git a/test/libsolidity/semanticTests/libraries/using_library_mappings_public.sol b/test/libsolidity/semanticTests/libraries/using_library_mappings_public.sol index 17406a907a47..903c4f7115ec 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: 119837 +// gas irOptimized: 118945 // gas legacy: 124661 // gas legacyOptimized: 119665 diff --git a/test/libsolidity/semanticTests/libraries/using_library_mappings_return.sol b/test/libsolidity/semanticTests/libraries/using_library_mappings_return.sol index 6e852fdce0f4..f6452f5f5a66 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: 119568 +// gas irOptimized: 119786 // gas legacy: 125087 // gas legacyOptimized: 120120 diff --git a/test/libsolidity/semanticTests/operators/userDefined/operator_making_pure_external_call.sol b/test/libsolidity/semanticTests/operators/userDefined/operator_making_pure_external_call.sol index 364e589e55c1..98fc56298a28 100644 --- a/test/libsolidity/semanticTests/operators/userDefined/operator_making_pure_external_call.sol +++ b/test/libsolidity/semanticTests/operators/userDefined/operator_making_pure_external_call.sol @@ -54,13 +54,15 @@ contract C { // EVMVersion: >=constantinople // ---- // testMul(int32,int32): 42, 10 -> 420 -// gas irOptimized: 102563 +// gas irOptimized: 54342 +// gas irOptimized code: 51000 // gas legacy: 57117 // gas legacy code: 127000 // gas legacyOptimized: 55246 // gas legacyOptimized code: 68400 // testInc(int32): 42 -> 43 -// gas irOptimized: 102386 +// gas irOptimized: 54166 +// gas irOptimized code: 51000 // gas legacy: 56378 // gas legacy code: 127000 // gas legacyOptimized: 54943 diff --git a/test/libsolidity/semanticTests/operators/userDefined/operator_making_view_external_call.sol b/test/libsolidity/semanticTests/operators/userDefined/operator_making_view_external_call.sol index 54048113c323..3d7746eec560 100644 --- a/test/libsolidity/semanticTests/operators/userDefined/operator_making_view_external_call.sol +++ b/test/libsolidity/semanticTests/operators/userDefined/operator_making_view_external_call.sol @@ -60,13 +60,15 @@ contract C { // EVMVersion: >=constantinople // ---- // testMul(int32,int32): 42, 10 -> 420 -// gas irOptimized: 102563 +// gas irOptimized: 54342 +// gas irOptimized code: 51000 // gas legacy: 57117 // gas legacy code: 127000 // gas legacyOptimized: 55246 // gas legacyOptimized code: 68400 // testInc(int32): 42 -> 43 -// gas irOptimized: 102386 +// gas irOptimized: 54166 +// gas irOptimized code: 51000 // gas legacy: 56378 // gas legacy code: 127000 // gas legacyOptimized: 54943 diff --git a/test/libsolidity/semanticTests/saltedCreate/eof/salted_create_with_value.sol b/test/libsolidity/semanticTests/saltedCreate/eof/salted_create_with_value.sol index e6c6f6eb0772..b93fe9a495f9 100644 --- a/test/libsolidity/semanticTests/saltedCreate/eof/salted_create_with_value.sol +++ b/test/libsolidity/semanticTests/saltedCreate/eof/salted_create_with_value.sol @@ -21,3 +21,5 @@ contract A { // bytecodeFormat: >=EOFv1 // ---- // f(), 10 ether -> 3007, 3008, 3009 +// gas irOptimized: 185971 +// gas irOptimized code: 89400 diff --git a/test/libsolidity/semanticTests/saltedCreate/salted_create.sol b/test/libsolidity/semanticTests/saltedCreate/salted_create.sol index 535a2813c17c..ba6938029570 100644 --- a/test/libsolidity/semanticTests/saltedCreate/salted_create.sol +++ b/test/libsolidity/semanticTests/saltedCreate/salted_create.sol @@ -21,8 +21,8 @@ contract A { // ---- // different_salt() -> true // same_salt() -> true -// gas irOptimized: 98438295 -// gas irOptimized code: 600 +// gas irOptimized: 98434546 +// gas irOptimized code: 4400 // gas legacy: 98437509 // gas legacy code: 1600 // gas legacyOptimized: 98437367 diff --git a/test/libsolidity/semanticTests/storage/empty_nonempty_empty.sol b/test/libsolidity/semanticTests/storage/empty_nonempty_empty.sol index 8a795373e061..88fb6017c54f 100644 --- a/test/libsolidity/semanticTests/storage/empty_nonempty_empty.sol +++ b/test/libsolidity/semanticTests/storage/empty_nonempty_empty.sol @@ -22,7 +22,7 @@ contract Test { // set(bytes): 0x20, 0 // storageEmpty -> 1 // set(bytes): 0x20, 66, "12345678901234567890123456789012", "12345678901234567890123456789012", "12" -// gas irOptimized: 111849 +// gas irOptimized: 111633 // gas legacy: 112734 // gas legacyOptimized: 112084 // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol b/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol index 7d19bc47162e..c8b49be7d78a 100644 --- a/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol +++ b/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol @@ -42,6 +42,6 @@ contract C { } // ---- // test() -> true -// gas irOptimized: 132633 +// gas irOptimized: 132381 // gas legacy: 136010 // gas legacyOptimized: 133478 diff --git a/test/libsolidity/semanticTests/storageLayoutSpecifier/constructor.sol b/test/libsolidity/semanticTests/storageLayoutSpecifier/constructor.sol index c30f9dab98a7..3e5ce342835d 100644 --- a/test/libsolidity/semanticTests/storageLayoutSpecifier/constructor.sol +++ b/test/libsolidity/semanticTests/storageLayoutSpecifier/constructor.sol @@ -18,8 +18,8 @@ contract C is B layout at 7 { } // ---- // constructor(): 1, 2, 3 -// gas irOptimized: 104178 -// gas irOptimized code: 30000 +// gas irOptimized: 65989 +// gas irOptimized code: 36000 // gas legacy: 114749 // gas legacy code: 71400 // gas legacyOptimized: 106296 diff --git a/test/libsolidity/semanticTests/storageLayoutSpecifier/delete.sol b/test/libsolidity/semanticTests/storageLayoutSpecifier/delete.sol index a6cc84cce511..d0f86d6de3f0 100644 --- a/test/libsolidity/semanticTests/storageLayoutSpecifier/delete.sol +++ b/test/libsolidity/semanticTests/storageLayoutSpecifier/delete.sol @@ -19,7 +19,7 @@ contract C layout at 42 { } // ---- // fillArray() -> 3 -// gas irOptimized: 111121 +// gas irOptimized: 110909 // gas legacy: 110730 // gas legacyOptimized: 110307 // arrayLength() -> 3 diff --git a/test/libsolidity/semanticTests/storageLayoutSpecifier/dynamic_array_storage_end.sol b/test/libsolidity/semanticTests/storageLayoutSpecifier/dynamic_array_storage_end.sol index 54eabe844702..bfc7fde87fea 100644 --- a/test/libsolidity/semanticTests/storageLayoutSpecifier/dynamic_array_storage_end.sol +++ b/test/libsolidity/semanticTests/storageLayoutSpecifier/dynamic_array_storage_end.sol @@ -16,14 +16,14 @@ contract C layout at 2**256 - 2 { } // ---- // init() -> -// gas irOptimized: 22738151 +// gas irOptimized: 22672090 // gas legacy: 22699167 // gas legacyOptimized: 22541160 // validate() -> -// gas irOptimized: 2444232 +// gas irOptimized: 2384180 // gas legacy: 2560245 // gas legacyOptimized: 2442238 // clear() -> -// gas irOptimized: 4449608 +// gas irOptimized: 4406374 // gas legacy: 4300019 // gas legacyOptimized: 4302413 diff --git a/test/libsolidity/semanticTests/storageLayoutSpecifier/mapping_storage_end.sol b/test/libsolidity/semanticTests/storageLayoutSpecifier/mapping_storage_end.sol index 9745850c0091..4f6321903072 100644 --- a/test/libsolidity/semanticTests/storageLayoutSpecifier/mapping_storage_end.sol +++ b/test/libsolidity/semanticTests/storageLayoutSpecifier/mapping_storage_end.sol @@ -13,10 +13,10 @@ contract C layout at 2**256 - 2 { } // ---- // init() -> -// gas irOptimized: 22266229 +// gas irOptimized: 22237177 // gas legacy: 22447245 // gas legacyOptimized: 22310238 // validate() -> -// gas irOptimized: 2279210 +// gas irOptimized: 2247167 // gas legacy: 2456223 // gas legacyOptimized: 2327216 diff --git a/test/libsolidity/semanticTests/storageLayoutSpecifier/multiple_inheritance.sol b/test/libsolidity/semanticTests/storageLayoutSpecifier/multiple_inheritance.sol index 1b24b4961dbf..65a06d80031d 100644 --- a/test/libsolidity/semanticTests/storageLayoutSpecifier/multiple_inheritance.sol +++ b/test/libsolidity/semanticTests/storageLayoutSpecifier/multiple_inheritance.sol @@ -31,7 +31,7 @@ contract D is A, B, C layout at 42 { } // ---- // test() -> 1, 2, 3, 5 -// gas irOptimized: 110112 +// gas irOptimized: 110060 // gas legacy: 111881 // gas legacyOptimized: 110945 // x() -> 1 diff --git a/test/libsolidity/semanticTests/storageLayoutSpecifier/state_variable_dynamic_array.sol b/test/libsolidity/semanticTests/storageLayoutSpecifier/state_variable_dynamic_array.sol index 1737c35bb87c..780a25ca3bc8 100644 --- a/test/libsolidity/semanticTests/storageLayoutSpecifier/state_variable_dynamic_array.sol +++ b/test/libsolidity/semanticTests/storageLayoutSpecifier/state_variable_dynamic_array.sol @@ -34,14 +34,14 @@ contract C is A layout at 42 { } // ---- // initA() -> 1, 2, 3 -// gas irOptimized: 111986 +// gas irOptimized: 111779 // gas legacy: 111679 // gas legacyOptimized: 111150 // arrayA(uint256): 0 -> 1 // arrayALength() -> 3 // arrayCLength() -> 0 // initCFromAInReverse() -> 3, 2, 1 -// gas irOptimized: 121276 +// gas irOptimized: 121101 // gas legacy: 121213 // gas legacyOptimized: 120843 // clearA() -> diff --git a/test/libsolidity/semanticTests/storageLayoutSpecifier/state_variable_mapping.sol b/test/libsolidity/semanticTests/storageLayoutSpecifier/state_variable_mapping.sol index e33df29ea604..d1a0d2c6f196 100644 --- a/test/libsolidity/semanticTests/storageLayoutSpecifier/state_variable_mapping.sol +++ b/test/libsolidity/semanticTests/storageLayoutSpecifier/state_variable_mapping.sol @@ -25,7 +25,7 @@ contract C layout at 42 is A { } // ---- // setup() -> -// gas irOptimized: 159082 +// gas irOptimized: 159171 // gas legacy: 161738 // gas legacyOptimized: 160222 // open(uint256): 3 -> 0x20, 5, "Empty" diff --git a/test/libsolidity/semanticTests/storageLayoutSpecifier/storage_reference_array.sol b/test/libsolidity/semanticTests/storageLayoutSpecifier/storage_reference_array.sol index db14ef55874c..3382455a526b 100644 --- a/test/libsolidity/semanticTests/storageLayoutSpecifier/storage_reference_array.sol +++ b/test/libsolidity/semanticTests/storageLayoutSpecifier/storage_reference_array.sol @@ -14,7 +14,7 @@ contract C layout at 42 { } // ---- // initUsingReference() -> -// gas irOptimized: 273556 +// gas irOptimized: 272337 // gas legacy: 274795 // gas legacyOptimized: 271954 // array(uint256): 0 -> 1 diff --git a/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_nested_array_to_storage.sol b/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_nested_array_to_storage.sol index 2767486131d8..358159f57de2 100644 --- a/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_nested_array_to_storage.sol +++ b/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_nested_array_to_storage.sol @@ -16,6 +16,6 @@ contract C { } // ---- // f(uint32,(uint128,uint256[][2],uint32)): 55, 0x40, 77, 0x60, 88, 0x40, 0x40, 2, 1, 2 -> 55, 77, 1, 2, 88 -// gas irOptimized: 202902 +// gas irOptimized: 202362 // gas legacy: 207376 // gas legacyOptimized: 203583 diff --git a/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol b/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol index 8ec31a5c109a..019f5e4fd4a7 100644 --- a/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol +++ b/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol @@ -23,6 +23,6 @@ contract CopyTest { } // ---- // run() -> 2, 23, 42 -// gas irOptimized: 192828 +// gas irOptimized: 187527 // gas legacy: 185730 // gas legacyOptimized: 184457 diff --git a/test/libsolidity/semanticTests/structs/copy_from_mapping.sol b/test/libsolidity/semanticTests/structs/copy_from_mapping.sol index 037ff20679f0..c97c15eaf2da 100644 --- a/test/libsolidity/semanticTests/structs/copy_from_mapping.sol +++ b/test/libsolidity/semanticTests/structs/copy_from_mapping.sol @@ -36,7 +36,7 @@ contract C { } // ---- // to_state() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 121282 +// gas irOptimized: 120675 // gas legacy: 122977 // gas legacyOptimized: 121652 // to_storage() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 diff --git a/test/libsolidity/semanticTests/structs/copy_struct_array_from_storage.sol b/test/libsolidity/semanticTests/structs/copy_struct_array_from_storage.sol index 600eb35ab2ee..6803796e511f 100644 --- a/test/libsolidity/semanticTests/structs/copy_struct_array_from_storage.sol +++ b/test/libsolidity/semanticTests/structs/copy_struct_array_from_storage.sol @@ -87,7 +87,7 @@ contract Test { // EVMVersion: >homestead // ---- // test1() -> true -// gas irOptimized: 152965 +// gas irOptimized: 152701 // gas legacy: 153010 // gas legacyOptimized: 152636 // test2() -> true diff --git a/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol b/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol index 7188e1befe7a..6c9cec1f9f1f 100644 --- a/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol +++ b/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol @@ -44,7 +44,7 @@ contract C { } // ---- // to_state() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 121454 +// gas irOptimized: 120810 // gas legacy: 123114 // gas legacyOptimized: 121659 // to_storage() -> 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 54b659ba0757..4ede11f4c9a2 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: 122720 +// gas irOptimized: 121860 // gas legacy: 130131 // gas legacyOptimized: 128648 // from_state() -> 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 121424 +// gas irOptimized: 120905 // gas legacy: 123190 // gas legacyOptimized: 121758 // 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: 114852 +// gas irOptimized: 114169 // gas legacy: 122423 // gas legacyOptimized: 120698 diff --git a/test/libsolidity/semanticTests/structs/copy_to_mapping.sol b/test/libsolidity/semanticTests/structs/copy_to_mapping.sol index d020998b47c5..5fab2b983eb5 100644 --- a/test/libsolidity/semanticTests/structs/copy_to_mapping.sol +++ b/test/libsolidity/semanticTests/structs/copy_to_mapping.sol @@ -45,18 +45,18 @@ contract C { } // ---- // from_state() -> 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 121515 +// gas irOptimized: 120836 // gas legacy: 123051 // gas legacyOptimized: 121704 // from_storage() -> 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 121559 +// gas irOptimized: 120862 // gas legacy: 123109 // gas legacyOptimized: 121756 // from_memory() -> 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 122740 +// gas irOptimized: 121756 // gas legacy: 129996 // gas legacyOptimized: 128644 // 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: 114824 +// gas irOptimized: 114059 // gas legacy: 118207 // gas legacyOptimized: 115327 diff --git a/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol b/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol index 6785f2108b13..f4afd114b749 100644 --- a/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol +++ b/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol @@ -66,7 +66,7 @@ contract Test { } // ---- // load() -> 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 -// gas irOptimized: 110772 +// gas irOptimized: 110961 // gas legacy: 112959 // gas legacyOptimized: 110876 // store() -> 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 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 e50265e5175d..fd72217e6fd8 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,7 +23,7 @@ contract c { // ---- // storageEmpty -> 1 // set(uint256,bytes,uint256): 12, 0x60, 13, 33, "12345678901234567890123456789012", "3" -> true -// gas irOptimized: 133557 +// gas irOptimized: 133330 // gas legacy: 134624 // gas legacyOptimized: 133856 // test(uint256): 32 -> "3" @@ -31,7 +31,7 @@ contract c { // copy() -> true // storageEmpty -> 1 // set(uint256,bytes,uint256): 12, 0x60, 13, 33, "12345678901234567890123456789012", "3" -> true -// gas irOptimized: 133557 +// gas irOptimized: 133330 // gas legacy: 134624 // gas legacyOptimized: 133856 // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/structs/struct_copy.sol b/test/libsolidity/semanticTests/structs/struct_copy.sol index e148f81cc880..89baa779aaa9 100644 --- a/test/libsolidity/semanticTests/structs/struct_copy.sol +++ b/test/libsolidity/semanticTests/structs/struct_copy.sol @@ -35,12 +35,12 @@ contract c { } // ---- // set(uint256): 7 -> true -// gas irOptimized: 109932 +// gas irOptimized: 110018 // gas legacy: 110593 // gas legacyOptimized: 110003 // retrieve(uint256): 7 -> 1, 3, 4, 2 // copy(uint256,uint256): 7, 8 -> true -// gas irOptimized: 118581 +// gas irOptimized: 118509 // gas legacy: 119144 // gas legacyOptimized: 118618 // retrieve(uint256): 7 -> 1, 3, 4, 2 diff --git a/test/libsolidity/semanticTests/structs/struct_copy_via_local.sol b/test/libsolidity/semanticTests/structs/struct_copy_via_local.sol index 6b8788d2c09d..18166929c495 100644 --- a/test/libsolidity/semanticTests/structs/struct_copy_via_local.sol +++ b/test/libsolidity/semanticTests/structs/struct_copy_via_local.sol @@ -17,6 +17,6 @@ contract c { } // ---- // test() -> true -// gas irOptimized: 109921 +// gas irOptimized: 109879 // gas legacy: 110615 // gas legacyOptimized: 109705 diff --git a/test/libsolidity/semanticTests/structs/struct_delete_storage_with_array.sol b/test/libsolidity/semanticTests/structs/struct_delete_storage_with_array.sol index cea1105669aa..88854b3ae6aa 100644 --- a/test/libsolidity/semanticTests/structs/struct_delete_storage_with_array.sol +++ b/test/libsolidity/semanticTests/structs/struct_delete_storage_with_array.sol @@ -42,10 +42,10 @@ contract C { } // ---- // f() -> -// gas irOptimized: 113465 +// gas irOptimized: 113328 // gas legacy: 113591 // gas legacyOptimized: 113098 // g() -> -// gas irOptimized: 118828 +// gas irOptimized: 118820 // gas legacy: 118764 // gas legacyOptimized: 118168 diff --git a/test/libsolidity/semanticTests/structs/struct_memory_to_storage_function_ptr.sol b/test/libsolidity/semanticTests/structs/struct_memory_to_storage_function_ptr.sol index 0de21947a4e7..6a6431566c13 100644 --- a/test/libsolidity/semanticTests/structs/struct_memory_to_storage_function_ptr.sol +++ b/test/libsolidity/semanticTests/structs/struct_memory_to_storage_function_ptr.sol @@ -28,6 +28,6 @@ contract C { } // ---- // f() -> 42, 23, 34, 42, 42 -// gas irOptimized: 110682 +// gas irOptimized: 110582 // gas legacy: 111990 // gas legacyOptimized: 110546 diff --git a/test/libsolidity/semanticTests/structs/structs.sol b/test/libsolidity/semanticTests/structs/structs.sol index 96503fa11e1f..88b1681e23b2 100644 --- a/test/libsolidity/semanticTests/structs/structs.sol +++ b/test/libsolidity/semanticTests/structs/structs.sol @@ -30,7 +30,7 @@ contract test { // ---- // check() -> false // set() -> -// gas irOptimized: 134073 +// gas irOptimized: 134384 // gas legacy: 135243 // gas legacyOptimized: 134062 // check() -> true diff --git a/test/libsolidity/semanticTests/types/mapping/copy_from_mapping_to_mapping.sol b/test/libsolidity/semanticTests/types/mapping/copy_from_mapping_to_mapping.sol index 26e8294e3ac9..f1e725122579 100644 --- a/test/libsolidity/semanticTests/types/mapping/copy_from_mapping_to_mapping.sol +++ b/test/libsolidity/semanticTests/types/mapping/copy_from_mapping_to_mapping.sol @@ -29,6 +29,6 @@ contract C { } // ---- // f() -> 0x20, 7, 8, 9, 0xa0, 13, 2, 0x40, 0xa0, 2, 3, 4, 2, 3, 4 -// gas irOptimized: 197102 +// gas irOptimized: 195816 // gas legacy: 199887 // gas legacyOptimized: 196845 diff --git a/test/libsolidity/semanticTests/userDefinedValueType/calldata.sol b/test/libsolidity/semanticTests/userDefinedValueType/calldata.sol index 015d51c1f54b..a3265c43b6b5 100644 --- a/test/libsolidity/semanticTests/userDefinedValueType/calldata.sol +++ b/test/libsolidity/semanticTests/userDefinedValueType/calldata.sol @@ -49,11 +49,11 @@ contract C { } // ---- // test_f() -> true -// gas irOptimized: 122201 +// gas irOptimized: 121004 // gas legacy: 125333 // gas legacyOptimized: 122693 // test_g() -> true -// gas irOptimized: 106408 +// gas irOptimized: 104650 // gas legacy: 111133 // gas legacyOptimized: 106925 // addresses(uint256): 0 -> 0x18 diff --git a/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol b/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol index 0e0759d62aa1..d5d7f0b8b792 100644 --- a/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol +++ b/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol @@ -113,8 +113,8 @@ contract ERC20 { // ---- // constructor() // ~ emit Transfer(address,address,uint256): #0x00, #0x1212121212121212121212121212120000000012, 0x14 -// gas irOptimized: 121322 -// gas irOptimized code: 234600 +// gas irOptimized: 67205 +// gas irOptimized code: 269800 // gas legacy: 163350 // gas legacy code: 671400 // gas legacyOptimized: 127464 diff --git a/test/libsolidity/semanticTests/various/destructuring_assignment.sol b/test/libsolidity/semanticTests/various/destructuring_assignment.sol index a961870ee5f2..b0cd5f12629b 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: 242027 +// gas irOptimized: 241176 // gas legacy: 243281 // gas legacyOptimized: 242392 diff --git a/test/libsolidity/semanticTests/various/different_call_type_transient.sol b/test/libsolidity/semanticTests/various/different_call_type_transient.sol index 399cbd02dfa1..120fd3ded2f7 100644 --- a/test/libsolidity/semanticTests/various/different_call_type_transient.sol +++ b/test/libsolidity/semanticTests/various/different_call_type_transient.sol @@ -46,6 +46,6 @@ contract Test { // testDelegate() -> 7, 0 // testCall() -> 0, 8 // testStatic() -> false -// gas irOptimized: 96900694 +// gas irOptimized: 96900601 // gas legacy: 96901136 // gas legacyOptimized: 96900725 diff --git a/test/libsolidity/semanticTests/various/eof/create_calldata.sol b/test/libsolidity/semanticTests/various/eof/create_calldata.sol index ae1fc39ec6c8..89960d22d4c1 100644 --- a/test/libsolidity/semanticTests/various/eof/create_calldata.sol +++ b/test/libsolidity/semanticTests/various/eof/create_calldata.sol @@ -18,4 +18,6 @@ contract C { // bytecodeFormat: >=EOFv1 // ---- // constructor(): 42, 0x20, 0xc0, 1, 2, 3, 4, 5, 6 -> +// gas irOptimized: 250627 +// gas irOptimized code: 69200 // s() -> 0x20, 0x0120, 42, 0x20, 0xc0, 1, 2, 3, 4, 5, 6 diff --git a/test/libsolidity/semanticTests/various/erc20.sol b/test/libsolidity/semanticTests/various/erc20.sol index 1cc77270f67b..0be3945ecb0f 100644 --- a/test/libsolidity/semanticTests/various/erc20.sol +++ b/test/libsolidity/semanticTests/various/erc20.sol @@ -96,8 +96,8 @@ contract ERC20 { // ---- // constructor() // ~ emit Transfer(address,address,uint256): #0x00, #0x1212121212121212121212121212120000000012, 0x14 -// gas irOptimized: 121632 -// gas irOptimized code: 236800 +// gas irOptimized: 67221 +// gas irOptimized code: 259200 // gas legacy: 159957 // gas legacy code: 647600 // gas legacyOptimized: 126934 diff --git a/test/libsolidity/semanticTests/various/many_subassemblies.sol b/test/libsolidity/semanticTests/various/many_subassemblies.sol index a320a2aa3eca..ac9b78c23b0f 100644 --- a/test/libsolidity/semanticTests/various/many_subassemblies.sol +++ b/test/libsolidity/semanticTests/various/many_subassemblies.sol @@ -32,8 +32,8 @@ contract D { // EVMVersion: >=constantinople // ---- // run() -> -// gas irOptimized: 375192 -// gas irOptimized code: 6600 +// gas irOptimized: 373921 +// gas irOptimized code: 48400 // gas legacy: 375404 // gas legacy code: 17600 // gas legacyOptimized: 375464 diff --git a/test/libsolidity/semanticTests/various/senders_balance.sol b/test/libsolidity/semanticTests/various/senders_balance.sol index fff16befe69e..4af00a16cbc3 100644 --- a/test/libsolidity/semanticTests/various/senders_balance.sol +++ b/test/libsolidity/semanticTests/various/senders_balance.sol @@ -16,8 +16,8 @@ contract D { } // ---- // constructor(), 27 wei -> -// gas irOptimized: 114057 -// gas irOptimized code: 53800 +// gas irOptimized: 75254 +// gas irOptimized code: 60000 // gas legacy: 117834 // gas legacy code: 100600 // gas legacyOptimized: 113676 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 8430da4e8d12..af3081da51d7 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: 178195 +// gas irOptimized: 177785 // gas legacy: 180653 // gas legacyOptimized: 179144 diff --git a/test/libsolidity/semanticTests/various/staticcall_for_view_and_pure.sol b/test/libsolidity/semanticTests/various/staticcall_for_view_and_pure.sol index 2a9834aab7e8..60ff343d8152 100644 --- a/test/libsolidity/semanticTests/various/staticcall_for_view_and_pure.sol +++ b/test/libsolidity/semanticTests/various/staticcall_for_view_and_pure.sol @@ -38,15 +38,13 @@ contract D { // gas legacy: 76495 // gas legacy code: 25600 // fview() -> FAILURE -// gas irOptimized: 98425388 -// gas irOptimized code: 13200 +// gas irOptimized: 98438360 // gas legacy: 98413173 // gas legacy code: 25600 // gas legacyOptimized: 98425379 // gas legacyOptimized code: 13200 // fpure() -> FAILURE -// gas irOptimized: 98425388 -// gas irOptimized code: 13200 +// gas irOptimized: 98438360 // gas legacy: 98413173 // gas legacy code: 25600 // gas legacyOptimized: 98425379 diff --git a/test/libsolidity/semanticTests/various/swap_in_storage_overwrite.sol b/test/libsolidity/semanticTests/various/swap_in_storage_overwrite.sol index 3422c812111c..8dcf84ee0c0c 100644 --- a/test/libsolidity/semanticTests/various/swap_in_storage_overwrite.sol +++ b/test/libsolidity/semanticTests/various/swap_in_storage_overwrite.sol @@ -26,7 +26,7 @@ contract c { // x() -> 0, 0 // y() -> 0, 0 // set() -> -// gas irOptimized: 109684 +// gas irOptimized: 109619 // gas legacy: 109727 // gas legacyOptimized: 109680 // x() -> 1, 2 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 0db482c040db..1755e6b5522a 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: 113117 +// gas irOptimized: 112566 // gas legacy: 112888 // gas legacyOptimized: 112580 diff --git a/test/tools/IsolTestOptions.cpp b/test/tools/IsolTestOptions.cpp index e0980c7646e6..9d93e318fdfb 100644 --- a/test/tools/IsolTestOptions.cpp +++ b/test/tools/IsolTestOptions.cpp @@ -82,7 +82,7 @@ bool IsolTestOptions::parse(int _argc, char const* const* _argv) return false; } - enforceGasTest = enforceGasTest || (evmVersion() == langutil::EVMVersion{} && !useABIEncoderV1); + enforceGasTest = true;//enforceGasTest || (evmVersion() == langutil::EVMVersion{} && !useABIEncoderV1); return shouldContinue; } From 4327823ae14468e84e428011990c34242fafb00e Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Tue, 11 Mar 2025 05:10:01 +0100 Subject: [PATCH 2/5] Poor man's deduplication and jumpdest removal. Looses one test case: semanticTests/array/invalid_encoding_for_storage_byte_array.sol --- libevmasm/Assembly.cpp | 5 +- libevmasm/BlockDeduplicator.cpp | 37 +++++++++++- libevmasm/JumpdestRemover.cpp | 57 +++++++++++++++---- ...2_in_function_inherited_in_v1_contract.sol | 2 +- .../array/constant_var_as_array_length.sol | 2 +- ...nup_during_multi_element_per_slot_copy.sol | 2 +- .../array/fixed_arrays_as_return_type.sol | 2 +- .../array/function_array_cross_calls.sol | 4 +- .../semanticTests/array/reusing_memory.sol | 2 +- .../cleanup/byte_array_to_storage_cleanup.sol | 2 +- .../constructor/arrays_in_constructors.sol | 4 +- .../bytes_in_constructors_packer.sol | 4 +- .../bytes_in_constructors_unpacker.sol | 2 +- .../constructor_static_array_argument.sol | 2 +- .../errors/small_error_optimization.sol | 2 +- .../externalContracts/FixedFeeRegistrar.sol | 2 +- .../externalContracts/base64.sol | 2 +- .../externalContracts/deposit_contract.sol | 2 +- .../externalContracts/prbmath_signed.sol | 2 +- .../externalContracts/prbmath_unsigned.sol | 2 +- .../externalContracts/ramanujan_pi.sol | 2 +- .../externalContracts/strings.sol | 2 +- .../creation_function_call_with_args.sol | 2 +- .../creation_function_call_with_salt.sol | 2 +- .../eof/external_call_to_nonexisting.sol | 2 +- .../functionCall/failed_create.sol | 2 +- .../immutable/multi_creation.sol | 4 +- ...ructor_with_params_diamond_inheritance.sol | 2 +- ...ted_function_calldata_memory_interface.sol | 4 +- .../inheritance/value_for_constructor.sol | 2 +- .../transient_storage_low_level_calls.sol | 4 +- .../operator_making_pure_external_call.sol | 8 +-- .../operator_making_view_external_call.sol | 8 +-- .../eof/salted_create_with_value.sol | 2 +- .../userDefinedValueType/erc20.sol | 2 +- .../various/eof/create_calldata.sol | 2 +- .../semanticTests/various/erc20.sol | 2 +- .../semanticTests/various/senders_balance.sol | 2 +- 38 files changed, 132 insertions(+), 61 deletions(-) diff --git a/libevmasm/Assembly.cpp b/libevmasm/Assembly.cpp index a0711cd41756..fa5c09ac0b65 100644 --- a/libevmasm/Assembly.cpp +++ b/libevmasm/Assembly.cpp @@ -833,7 +833,7 @@ std::map const& Assembly::optimiseInternal( }.optimise(); } // TODO: verify this for EOF. - if (_settings.runJumpdestRemover && !m_eofVersion.has_value()) + if (_settings.runJumpdestRemover) { for (auto& codeSection: m_codeSections) { @@ -859,7 +859,7 @@ std::map const& Assembly::optimiseInternal( // This only modifies PushTags, we have to run again to actually remove code. // TODO: implement for EOF. - if (_settings.runDeduplicate && !m_eofVersion.has_value()) + if (_settings.runDeduplicate) for (auto& section: m_codeSections) { BlockDeduplicator deduplicator{section.items}; @@ -1698,7 +1698,6 @@ LinkerObject const& Assembly::assembleEOF() const solAssert(m_codeSections[index].inputs == item.functionSignature().argsNum); solAssert(m_codeSections[index].outputs == item.functionSignature().retsNum); // If CallF the function cannot be non-returning. - solAssert(item.type() == JumpF || !m_codeSections[index].nonReturning); appendBigEndianUint16(ret.bytecode, item.data()); break; } diff --git a/libevmasm/BlockDeduplicator.cpp b/libevmasm/BlockDeduplicator.cpp index 3ba8cfcd3523..3cfe3e2805eb 100644 --- a/libevmasm/BlockDeduplicator.cpp +++ b/libevmasm/BlockDeduplicator.cpp @@ -27,6 +27,7 @@ #include #include +#include #include #include @@ -36,6 +37,10 @@ using namespace solidity::evmasm; bool BlockDeduplicator::deduplicate() { + std::map tagOffsets; + for (size_t i = 0; i < m_items.size(); ++i) + if (m_items[i].type() == Tag) + tagOffsets[m_items.at(i).data()] = i; // Compares indices based on the suffix that starts there, ignoring tags and stopping at // opcodes that stop the control flow. @@ -76,6 +81,8 @@ bool BlockDeduplicator::deduplicate() return std::lexicographical_compare(first, end, second, end); }; + std::map> replacementCandidates; + std::map tagToRepresentative; size_t iterations = 0; for (; ; ++iterations) { @@ -85,11 +92,39 @@ bool BlockDeduplicator::deduplicate() { if (m_items.at(i).type() != Tag) continue; + bool keep = false; + for (size_t j = i + 1; j < m_items.size(); ++j) + if (SemanticInformation::altersControlFlow(m_items[j])) + { + keep = SemanticInformation::terminatesControlFlow(m_items[j]); + break; + } + if (!keep) + continue; auto it = blocksSeen.find(i); if (it == blocksSeen.end()) blocksSeen.insert(i); else - m_replacedTags[m_items.at(i).data()] = m_items.at(*it).data(); + { + tagToRepresentative[m_items.at(i).data()] = m_items.at(*it).data(); + replacementCandidates[m_items.at(*it).data()].push_back(m_items.at(i).data()); + + } + } + + for (auto& [representative, replacementCandidates]: replacementCandidates) + std::sort(replacementCandidates.begin(), replacementCandidates.end(), [&](u256 const& _lhs, u256 const& _rhs) + { + return tagOffsets[_lhs] < tagOffsets[_rhs]; + }); + + for (auto&& [tag, representative]: tagToRepresentative) + { + u256 replacement = replacementCandidates.at(representative).back(); + if (tag != replacement) + { + m_replacedTags[tag] = replacement; + } } if (!applyTagReplacement(m_items, m_replacedTags)) diff --git a/libevmasm/JumpdestRemover.cpp b/libevmasm/JumpdestRemover.cpp index 7ded5ae90889..b9bf9de92de0 100644 --- a/libevmasm/JumpdestRemover.cpp +++ b/libevmasm/JumpdestRemover.cpp @@ -20,6 +20,9 @@ * Removes unused JUMPDESTs. */ +#include "SemanticInformation.h" + + #include #include @@ -37,20 +40,54 @@ bool JumpdestRemover::optimise(std::set const& _tagsReferencedFromOutsid size_t initialSize = m_items.size(); /// Remove tags which are never referenced. - auto pend = remove_if( - m_items.begin(), - m_items.end(), - [&](AssemblyItem const& _item) + AssemblyItems newItems; + for (auto it = m_items.begin(); it != m_items.end();) + { + if (it->type() != Tag) + { + newItems.emplace_back(*it); + ++it; + } + else { - if (_item.type() != Tag) - return false; - auto asmIdAndTag = _item.splitForeignPushTag(); + auto asmIdAndTag = it->splitForeignPushTag(); assertThrow(asmIdAndTag.first == std::numeric_limits::max(), OptimizerException, "Sub-assembly tag used as label."); size_t tag = asmIdAndTag.second; - return !references.count(tag); + if (references.count(tag)) + { + newItems.emplace_back(*it); + ++it; + } + else + { + if (it == m_items.begin() || (it - 1)->type() == ConditionalRelativeJump) + { + newItems.emplace_back(*it); + ++it; + } + else + { + ++it; + while (it != m_items.end()) + { + if (it->type() == Tag) + break; + if (SemanticInformation::altersControlFlow(*it)) + { + ++it; + break; + } + ++it; + } + if (it == m_items.end()) + break; + } + } + } - ); - m_items.erase(pend, m_items.end()); + } + m_items = std::move(newItems); + return m_items.size() != initialSize; } 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 45da877de37c..d35c0a28e796 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 @@ -31,7 +31,7 @@ contract C is B { // ---- // test() -> 77 // gas irOptimized: 54683 -// gas irOptimized code: 68600 +// gas irOptimized code: 68000 // gas legacy: 57266 // gas legacy code: 94600 // gas legacyOptimized: 55195 diff --git a/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol b/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol index f3f6dd076276..3ffaf5419f40 100644 --- a/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol +++ b/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol @@ -9,7 +9,7 @@ contract C { // ---- // constructor(): 1, 2, 3 -> // gas irOptimized: 88320 -// gas irOptimized code: 19600 +// gas irOptimized code: 18400 // gas legacy: 134317 // gas legacy code: 46200 // gas legacyOptimized: 127166 diff --git a/test/libsolidity/semanticTests/array/copying/cleanup_during_multi_element_per_slot_copy.sol b/test/libsolidity/semanticTests/array/copying/cleanup_during_multi_element_per_slot_copy.sol index 21b6429ac3f2..7e2285c196c6 100644 --- a/test/libsolidity/semanticTests/array/copying/cleanup_during_multi_element_per_slot_copy.sol +++ b/test/libsolidity/semanticTests/array/copying/cleanup_during_multi_element_per_slot_copy.sol @@ -17,7 +17,7 @@ contract C { // ---- // constructor() // gas irOptimized: 43601 -// gas irOptimized code: 175800 +// gas irOptimized code: 175200 // gas legacy: 89553 // gas legacy code: 126200 // gas legacyOptimized: 83556 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 adec72b966ca..01037b55ddaf 100644 --- a/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol +++ b/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol @@ -19,7 +19,7 @@ contract B { // ---- // f() -> 2, 3, 4, 5, 6, 1000, 1001, 1002, 1003, 1004 // gas irOptimized: 57989 -// gas irOptimized code: 59800 +// gas irOptimized code: 58600 // gas legacy: 68001 // gas legacy code: 162000 // gas legacyOptimized: 59997 diff --git a/test/libsolidity/semanticTests/array/function_array_cross_calls.sol b/test/libsolidity/semanticTests/array/function_array_cross_calls.sol index 0e0f0b2f0105..720652d0000c 100644 --- a/test/libsolidity/semanticTests/array/function_array_cross_calls.sol +++ b/test/libsolidity/semanticTests/array/function_array_cross_calls.sol @@ -42,8 +42,8 @@ contract C { } // ---- // test() -> 5, 6, 7 -// gas irOptimized: 84282 -// gas irOptimized code: 175600 +// gas irOptimized: 84276 +// gas irOptimized code: 166800 // gas legacy: 97551 // gas legacy code: 342800 // gas legacyOptimized: 87808 diff --git a/test/libsolidity/semanticTests/array/reusing_memory.sol b/test/libsolidity/semanticTests/array/reusing_memory.sol index f369a1b40289..b8e177eb010f 100644 --- a/test/libsolidity/semanticTests/array/reusing_memory.sol +++ b/test/libsolidity/semanticTests/array/reusing_memory.sol @@ -25,7 +25,7 @@ contract Main { // ---- // f(uint256): 0x34 -> 0x46bddb1178e94d7f2892ff5f366840eb658911794f2c3a44c450aa2c505186c1 // gas irOptimized: 99236 -// gas irOptimized code: 16200 +// gas irOptimized code: 15600 // gas legacy: 101551 // gas legacy code: 23600 // gas legacyOptimized: 99612 diff --git a/test/libsolidity/semanticTests/cleanup/byte_array_to_storage_cleanup.sol b/test/libsolidity/semanticTests/cleanup/byte_array_to_storage_cleanup.sol index 2672b7b82764..a7121a552208 100644 --- a/test/libsolidity/semanticTests/cleanup/byte_array_to_storage_cleanup.sol +++ b/test/libsolidity/semanticTests/cleanup/byte_array_to_storage_cleanup.sol @@ -29,7 +29,7 @@ contract C { // ---- // constructor() -> // gas irOptimized: 21029 -// gas irOptimized code: 343200 +// gas irOptimized code: 339000 // gas legacy: 101532 // gas legacy code: 604800 // gas legacyOptimized: 84956 diff --git a/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol b/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol index e08d301b9d01..baf3fb376883 100644 --- a/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol +++ b/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol @@ -26,8 +26,8 @@ contract Creator { // bytecodeFormat: legacy,>=EOFv1 // ---- // f(uint256,address[]): 7, 0x40, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 -> 7, 8 -// gas irOptimized: 326287 -// gas irOptimized code: 102400 +// gas irOptimized: 326275 +// gas irOptimized code: 97000 // gas legacy: 336623 // gas legacy code: 244800 // gas legacyOptimized: 329515 diff --git a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol index 3d7b360e0a03..750ac2fcba95 100644 --- a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol +++ b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol @@ -26,8 +26,8 @@ contract Creator { // bytecodeFormat: legacy,>=EOFv1 // ---- // f(uint256,bytes): 7, 0x40, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" -> 7, "h" -// gas irOptimized: 168446 -// gas irOptimized code: 107800 +// gas irOptimized: 168440 +// gas irOptimized code: 103000 // gas legacy: 172941 // gas legacy code: 239800 // gas legacyOptimized: 169815 diff --git a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol index 1fa97815ee44..39b7c24d2cb4 100644 --- a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol +++ b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol @@ -11,7 +11,7 @@ contract Test { // ---- // constructor(): 7, 0x40, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" -> // gas irOptimized: 134197 -// gas irOptimized code: 79200 +// gas irOptimized code: 77400 // gas legacy: 195212 // gas legacy code: 109400 // gas legacyOptimized: 181608 diff --git a/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol b/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol index 83f6bbf32d1e..6ebe97732b53 100644 --- a/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol +++ b/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol @@ -12,7 +12,7 @@ contract C { // ---- // constructor(): 1, 2, 3, 4 -> // gas irOptimized: 110607 -// gas irOptimized code: 29000 +// gas irOptimized code: 26600 // gas legacy: 157977 // gas legacy code: 60400 // gas legacyOptimized: 149973 diff --git a/test/libsolidity/semanticTests/errors/small_error_optimization.sol b/test/libsolidity/semanticTests/errors/small_error_optimization.sol index e0af0777bae9..b0732a521b5c 100644 --- a/test/libsolidity/semanticTests/errors/small_error_optimization.sol +++ b/test/libsolidity/semanticTests/errors/small_error_optimization.sol @@ -15,7 +15,7 @@ contract B { // ---- // f() -> FAILURE, hex"92bbf6e8" // gas irOptimized: 218056 -// gas irOptimized code: 46000 +// gas irOptimized code: 45400 // gas legacy: 233752 // gas legacy code: 38000 // gas legacyOptimized: 224863 diff --git a/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol b/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol index 33f9d1b99a5b..fbb7a56f0060 100644 --- a/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol +++ b/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol @@ -75,7 +75,7 @@ contract FixedFeeRegistrar is Registrar { // ---- // constructor() // gas irOptimized: 21029 -// gas irOptimized code: 350200 +// gas irOptimized code: 333400 // gas legacy: 115395 // gas legacy code: 792400 // gas legacyOptimized: 84598 diff --git a/test/libsolidity/semanticTests/externalContracts/base64.sol b/test/libsolidity/semanticTests/externalContracts/base64.sol index ca88838db94f..810839ec9cea 100644 --- a/test/libsolidity/semanticTests/externalContracts/base64.sol +++ b/test/libsolidity/semanticTests/externalContracts/base64.sol @@ -34,7 +34,7 @@ contract test { // ---- // constructor() // gas irOptimized: 21029 -// gas irOptimized code: 333400 +// gas irOptimized code: 331600 // gas legacy: 102214 // gas legacy code: 629800 // gas legacyOptimized: 87926 diff --git a/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol b/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol index 3399fc79bf6e..95024883b27d 100644 --- a/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol +++ b/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol @@ -177,7 +177,7 @@ contract DepositContract is IDepositContract, ERC165 { // ---- // constructor() // gas irOptimized: 727457 -// gas irOptimized code: 643600 +// gas irOptimized code: 600200 // gas legacy: 920228 // gas legacy code: 1438800 // gas legacyOptimized: 848699 diff --git a/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol b/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol index 2407c9f7bb0a..5a4e6bc7675d 100644 --- a/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol +++ b/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol @@ -49,7 +49,7 @@ contract test { // ---- // constructor() // gas irOptimized: 21029 -// gas irOptimized code: 1645600 +// gas irOptimized code: 1610400 // gas legacy: 209723 // gas legacy code: 2205000 // gas legacyOptimized: 178012 diff --git a/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol b/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol index 953ad5717bab..8e6e0222a63b 100644 --- a/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol +++ b/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol @@ -49,7 +49,7 @@ contract test { // ---- // constructor() // gas irOptimized: 21029 -// gas irOptimized code: 1536600 +// gas irOptimized code: 1507400 // gas legacy: 195206 // gas legacy code: 1999000 // gas legacyOptimized: 168857 diff --git a/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol b/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol index c0c47e2621c0..4dff60441f04 100644 --- a/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol +++ b/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol @@ -34,7 +34,7 @@ contract test { // ---- // constructor() // gas irOptimized: 21029 -// gas irOptimized code: 450400 +// gas irOptimized code: 412200 // gas legacy: 92110 // gas legacy code: 523600 // gas legacyOptimized: 82667 diff --git a/test/libsolidity/semanticTests/externalContracts/strings.sol b/test/libsolidity/semanticTests/externalContracts/strings.sol index 7e510f3e22fe..990f63679b8a 100644 --- a/test/libsolidity/semanticTests/externalContracts/strings.sol +++ b/test/libsolidity/semanticTests/externalContracts/strings.sol @@ -50,7 +50,7 @@ contract test { // ---- // constructor() // gas irOptimized: 21029 -// gas irOptimized code: 530000 +// gas irOptimized code: 528200 // gas legacy: 126346 // gas legacy code: 932600 // gas legacyOptimized: 102639 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 d2e621152822..cfb7ef8b8062 100644 --- a/test/libsolidity/semanticTests/functionCall/creation_function_call_with_args.sol +++ b/test/libsolidity/semanticTests/functionCall/creation_function_call_with_args.sol @@ -16,7 +16,7 @@ contract D { // ---- // constructor(): 2 -> // gas irOptimized: 97736 -// gas irOptimized code: 60000 +// gas irOptimized code: 58200 // gas legacy: 145569 // gas legacy code: 95600 // gas legacyOptimized: 138297 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 2f99afe12626..88f6f34740e3 100644 --- a/test/libsolidity/semanticTests/functionCall/creation_function_call_with_salt.sol +++ b/test/libsolidity/semanticTests/functionCall/creation_function_call_with_salt.sol @@ -18,7 +18,7 @@ contract D { // ---- // constructor(): 2 -> // gas irOptimized: 97742 -// gas irOptimized code: 60000 +// gas irOptimized code: 58200 // gas legacy: 145935 // gas legacy code: 95600 // gas legacyOptimized: 138529 diff --git a/test/libsolidity/semanticTests/functionCall/eof/external_call_to_nonexisting.sol b/test/libsolidity/semanticTests/functionCall/eof/external_call_to_nonexisting.sol index 9053028ae6fd..3c087b5736cc 100644 --- a/test/libsolidity/semanticTests/functionCall/eof/external_call_to_nonexisting.sol +++ b/test/libsolidity/semanticTests/functionCall/eof/external_call_to_nonexisting.sol @@ -25,7 +25,7 @@ contract C { // ---- // constructor(), 1 ether -> // gas irOptimized: 43154 -// gas irOptimized code: 163200 +// gas irOptimized code: 154600 // gas legacy: 102721 // gas legacy code: 334400 // gas legacyOptimized: 91499 diff --git a/test/libsolidity/semanticTests/functionCall/failed_create.sol b/test/libsolidity/semanticTests/functionCall/failed_create.sol index d8629a74a7b8..c1351f757018 100644 --- a/test/libsolidity/semanticTests/functionCall/failed_create.sol +++ b/test/libsolidity/semanticTests/functionCall/failed_create.sol @@ -18,7 +18,7 @@ contract C { // ---- // constructor(), 20 wei // gas irOptimized: 21023 -// gas irOptimized code: 91000 +// gas irOptimized code: 84800 // gas legacy: 64468 // gas legacy code: 145400 // gas legacyOptimized: 60443 diff --git a/test/libsolidity/semanticTests/immutable/multi_creation.sol b/test/libsolidity/semanticTests/immutable/multi_creation.sol index e1cc91767704..9abcda0a9940 100644 --- a/test/libsolidity/semanticTests/immutable/multi_creation.sol +++ b/test/libsolidity/semanticTests/immutable/multi_creation.sol @@ -29,8 +29,8 @@ contract C { // EVMVersion: >=constantinople // ---- // f() -> 3, 7, 5 -// gas irOptimized: 86328 -// gas irOptimized code: 45600 +// gas irOptimized: 86316 +// gas irOptimized code: 44400 // gas legacy: 87839 // gas legacy code: 60800 // gas legacyOptimized: 86870 diff --git a/test/libsolidity/semanticTests/inheritance/constructor_with_params_diamond_inheritance.sol b/test/libsolidity/semanticTests/inheritance/constructor_with_params_diamond_inheritance.sol index 9789a5311c4d..d13a72c73e81 100644 --- a/test/libsolidity/semanticTests/inheritance/constructor_with_params_diamond_inheritance.sol +++ b/test/libsolidity/semanticTests/inheritance/constructor_with_params_diamond_inheritance.sol @@ -22,7 +22,7 @@ contract D is B, C { // ---- // constructor(): 2, 0 -> // gas irOptimized: 87757 -// gas irOptimized code: 33600 +// gas irOptimized code: 30600 // gas legacy: 128222 // gas legacy code: 40400 // gas legacyOptimized: 123920 diff --git a/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol b/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol index cabd5600abb1..848f94ee190e 100644 --- a/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol +++ b/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol @@ -22,8 +22,8 @@ contract B { } // ---- // g() -> 42 -// gas irOptimized: 54451 -// gas irOptimized code: 51600 +// gas irOptimized: 54445 +// gas irOptimized code: 49200 // gas legacy: 56839 // gas legacy code: 123600 // gas legacyOptimized: 55001 diff --git a/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol b/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol index 40575a7c86bc..db2e33b4215d 100644 --- a/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol +++ b/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol @@ -40,7 +40,7 @@ contract Main { // ---- // constructor(), 22 wei -> // gas irOptimized: 97641 -// gas irOptimized code: 124200 +// gas irOptimized code: 117000 // gas legacy: 156599 // gas legacy code: 236400 // gas legacyOptimized: 143592 diff --git a/test/libsolidity/semanticTests/inlineAssembly/transient_storage_low_level_calls.sol b/test/libsolidity/semanticTests/inlineAssembly/transient_storage_low_level_calls.sol index 133b58df25cb..f6d3ca1c5c18 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/transient_storage_low_level_calls.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/transient_storage_low_level_calls.sol @@ -68,8 +68,8 @@ contract C { // testCall() -> true // tloadAllowedStaticCall() -> true // tstoreNotAllowedStaticCall() -> true -// gas irOptimized: 98414570 -// gas irOptimized code: 24200 +// gas irOptimized: 98416342 +// gas irOptimized code: 22400 // gas legacy: 98409087 // gas legacy code: 30000 // gas legacyOptimized: 98420962 diff --git a/test/libsolidity/semanticTests/operators/userDefined/operator_making_pure_external_call.sol b/test/libsolidity/semanticTests/operators/userDefined/operator_making_pure_external_call.sol index 98fc56298a28..bd8f957b0806 100644 --- a/test/libsolidity/semanticTests/operators/userDefined/operator_making_pure_external_call.sol +++ b/test/libsolidity/semanticTests/operators/userDefined/operator_making_pure_external_call.sol @@ -54,15 +54,15 @@ contract C { // EVMVersion: >=constantinople // ---- // testMul(int32,int32): 42, 10 -> 420 -// gas irOptimized: 54342 -// gas irOptimized code: 51000 +// gas irOptimized: 54336 +// gas irOptimized code: 48600 // gas legacy: 57117 // gas legacy code: 127000 // gas legacyOptimized: 55246 // gas legacyOptimized code: 68400 // testInc(int32): 42 -> 43 -// gas irOptimized: 54166 -// gas irOptimized code: 51000 +// gas irOptimized: 54160 +// gas irOptimized code: 48600 // gas legacy: 56378 // gas legacy code: 127000 // gas legacyOptimized: 54943 diff --git a/test/libsolidity/semanticTests/operators/userDefined/operator_making_view_external_call.sol b/test/libsolidity/semanticTests/operators/userDefined/operator_making_view_external_call.sol index 3d7746eec560..9882dfe24c5c 100644 --- a/test/libsolidity/semanticTests/operators/userDefined/operator_making_view_external_call.sol +++ b/test/libsolidity/semanticTests/operators/userDefined/operator_making_view_external_call.sol @@ -60,15 +60,15 @@ contract C { // EVMVersion: >=constantinople // ---- // testMul(int32,int32): 42, 10 -> 420 -// gas irOptimized: 54342 -// gas irOptimized code: 51000 +// gas irOptimized: 54336 +// gas irOptimized code: 48600 // gas legacy: 57117 // gas legacy code: 127000 // gas legacyOptimized: 55246 // gas legacyOptimized code: 68400 // testInc(int32): 42 -> 43 -// gas irOptimized: 54166 -// gas irOptimized code: 51000 +// gas irOptimized: 54160 +// gas irOptimized code: 48600 // gas legacy: 56378 // gas legacy code: 127000 // gas legacyOptimized: 54943 diff --git a/test/libsolidity/semanticTests/saltedCreate/eof/salted_create_with_value.sol b/test/libsolidity/semanticTests/saltedCreate/eof/salted_create_with_value.sol index b93fe9a495f9..aae3976ddfc2 100644 --- a/test/libsolidity/semanticTests/saltedCreate/eof/salted_create_with_value.sol +++ b/test/libsolidity/semanticTests/saltedCreate/eof/salted_create_with_value.sol @@ -22,4 +22,4 @@ contract A { // ---- // f(), 10 ether -> 3007, 3008, 3009 // gas irOptimized: 185971 -// gas irOptimized code: 89400 +// gas irOptimized code: 87600 diff --git a/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol b/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol index d5d7f0b8b792..290dd6472694 100644 --- a/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol +++ b/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol @@ -114,7 +114,7 @@ contract ERC20 { // constructor() // ~ emit Transfer(address,address,uint256): #0x00, #0x1212121212121212121212121212120000000012, 0x14 // gas irOptimized: 67205 -// gas irOptimized code: 269800 +// gas irOptimized code: 257000 // gas legacy: 163350 // gas legacy code: 671400 // gas legacyOptimized: 127464 diff --git a/test/libsolidity/semanticTests/various/eof/create_calldata.sol b/test/libsolidity/semanticTests/various/eof/create_calldata.sol index 89960d22d4c1..02b6938a8da4 100644 --- a/test/libsolidity/semanticTests/various/eof/create_calldata.sol +++ b/test/libsolidity/semanticTests/various/eof/create_calldata.sol @@ -19,5 +19,5 @@ contract C { // ---- // constructor(): 42, 0x20, 0xc0, 1, 2, 3, 4, 5, 6 -> // gas irOptimized: 250627 -// gas irOptimized code: 69200 +// gas irOptimized code: 68600 // s() -> 0x20, 0x0120, 42, 0x20, 0xc0, 1, 2, 3, 4, 5, 6 diff --git a/test/libsolidity/semanticTests/various/erc20.sol b/test/libsolidity/semanticTests/various/erc20.sol index 0be3945ecb0f..eff08bfa1fab 100644 --- a/test/libsolidity/semanticTests/various/erc20.sol +++ b/test/libsolidity/semanticTests/various/erc20.sol @@ -97,7 +97,7 @@ contract ERC20 { // constructor() // ~ emit Transfer(address,address,uint256): #0x00, #0x1212121212121212121212121212120000000012, 0x14 // gas irOptimized: 67221 -// gas irOptimized code: 259200 +// gas irOptimized code: 250200 // gas legacy: 159957 // gas legacy code: 647600 // gas legacyOptimized: 126934 diff --git a/test/libsolidity/semanticTests/various/senders_balance.sol b/test/libsolidity/semanticTests/various/senders_balance.sol index 4af00a16cbc3..a549e9e916ef 100644 --- a/test/libsolidity/semanticTests/various/senders_balance.sol +++ b/test/libsolidity/semanticTests/various/senders_balance.sol @@ -17,7 +17,7 @@ contract D { // ---- // constructor(), 27 wei -> // gas irOptimized: 75254 -// gas irOptimized code: 60000 +// gas irOptimized code: 58200 // gas legacy: 117834 // gas legacy code: 100600 // gas legacyOptimized: 113676 From d49c2237227e4a8a3939cf3121b7ca1418d2fe88 Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Tue, 11 Mar 2025 05:25:35 +0100 Subject: [PATCH 3/5] Add some comments. --- libevmasm/BlockDeduplicator.cpp | 15 +++++++++++++-- libevmasm/JumpdestRemover.cpp | 11 ++++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/libevmasm/BlockDeduplicator.cpp b/libevmasm/BlockDeduplicator.cpp index 3cfe3e2805eb..d04c4589002f 100644 --- a/libevmasm/BlockDeduplicator.cpp +++ b/libevmasm/BlockDeduplicator.cpp @@ -37,6 +37,7 @@ using namespace solidity::evmasm; bool BlockDeduplicator::deduplicate() { + // For all tags determine their relative position within the assembly items. std::map tagOffsets; for (size_t i = 0; i < m_items.size(); ++i) if (m_items[i].type() == Tag) @@ -81,8 +82,10 @@ bool BlockDeduplicator::deduplicate() return std::lexicographical_compare(first, end, second, end); }; - std::map> replacementCandidates; + // Use the first block with the same sequence as representative for all blocks of that sequence. std::map tagToRepresentative; + // Store all blocks that are equal to a representative. + std::map> replacementCandidates; size_t iterations = 0; for (; ; ++iterations) { @@ -92,6 +95,9 @@ bool BlockDeduplicator::deduplicate() { if (m_items.at(i).type() != Tag) continue; + // Prevent considering any blocks that are not reverting. + // Actually not sure why this breaks more easily otherwise, but a lot of cases are of this simpler form, + // so it's a good start. bool keep = false; for (size_t j = i + 1; j < m_items.size(); ++j) if (SemanticInformation::altersControlFlow(m_items[j])) @@ -106,22 +112,27 @@ bool BlockDeduplicator::deduplicate() blocksSeen.insert(i); else { + // It we find a match, map it to the representative. tagToRepresentative[m_items.at(i).data()] = m_items.at(*it).data(); + // And add it to the candidate list. replacementCandidates[m_items.at(*it).data()].push_back(m_items.at(i).data()); } } + // Sort all representative lists with respect to their order in the item sequence. + // Note: could make it a set with this as comparison. for (auto& [representative, replacementCandidates]: replacementCandidates) std::sort(replacementCandidates.begin(), replacementCandidates.end(), [&](u256 const& _lhs, u256 const& _rhs) { return tagOffsets[_lhs] < tagOffsets[_rhs]; }); + // For all mappings from tags to representatives, map it to the last candidate. for (auto&& [tag, representative]: tagToRepresentative) { u256 replacement = replacementCandidates.at(representative).back(); - if (tag != replacement) + if (tag != replacement) // Is this really necessary? { m_replacedTags[tag] = replacement; } diff --git a/libevmasm/JumpdestRemover.cpp b/libevmasm/JumpdestRemover.cpp index b9bf9de92de0..f9031274494c 100644 --- a/libevmasm/JumpdestRemover.cpp +++ b/libevmasm/JumpdestRemover.cpp @@ -43,6 +43,7 @@ bool JumpdestRemover::optimise(std::set const& _tagsReferencedFromOutsid AssemblyItems newItems; for (auto it = m_items.begin(); it != m_items.end();) { + // If we're not a tag: copy. if (it->type() != Tag) { newItems.emplace_back(*it); @@ -50,23 +51,31 @@ bool JumpdestRemover::optimise(std::set const& _tagsReferencedFromOutsid } else { + // We're a tag. auto asmIdAndTag = it->splitForeignPushTag(); assertThrow(asmIdAndTag.first == std::numeric_limits::max(), OptimizerException, "Sub-assembly tag used as label."); size_t tag = asmIdAndTag.second; if (references.count(tag)) { + // We're explicitly referenced; copy. newItems.emplace_back(*it); ++it; } else { + // We look like an unreferenced tag. if (it == m_items.begin() || (it - 1)->type() == ConditionalRelativeJump) { - newItems.emplace_back(*it); + // We're a tag after a conditional jump. This means we're still reachable. + // We can remove the tag, but need to continue copying afterwards. ++it; } else { + // We're a fully unreachable tag. + // We remove the tag and everything up to the next tag or change of control flow. + // TODO: Why do we need to also stop at control flow alterations? Shouldn't anything that can be + // reachable again first be a tag? Apparently not. ++it; while (it != m_items.end()) { From ed76494fbbe725956cf21019885cb6f0bd00c2ff Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Tue, 11 Mar 2025 05:28:32 +0100 Subject: [PATCH 4/5] Add back peephole optimizer. Looses another handful of tests. Needs to check for correctness (in some version one test expectation actually changed, i.e. it produced invalid output). --- libevmasm/Assembly.cpp | 2 +- .../abi_decode_simple_storage.sol | 2 +- .../abiEncoderV1/abi_decode_v2_storage.sol | 2 +- .../abiEncoderV1/abi_encode_calldata_slice.sol | 4 ++-- .../abiEncoderV1/struct/struct_storage_ptr.sol | 2 +- .../abiEncoderV2/abi_encode_calldata_slice.sol | 4 ++-- .../abiEncoderV2/abi_encode_v2.sol | 2 +- ...v2_in_function_inherited_in_v1_contract.sol | 4 ++-- .../calldata_overlapped_dynamic_arrays.sol | 2 +- .../abiEncoderV2/storage_array_encoding.sol | 4 ++-- .../array/array_storage_index_access.sol | 18 +++++++++--------- .../array/array_storage_index_zeroed_test.sol | 8 ++++---- .../array/array_storage_push_empty.sol | 4 ++-- .../array/array_storage_push_pop.sol | 4 ++-- .../arrays_complex_from_and_to_storage.sol | 2 +- .../array/byte_array_transitional_2.sol | 2 +- .../array/bytes_length_member.sol | 2 +- .../array/constant_var_as_array_length.sol | 4 ++-- .../copying/array_copy_calldata_storage.sol | 2 +- .../copying/array_copy_cleanup_uint40.sol | 2 +- .../array/copying/array_copy_clear_storage.sol | 2 +- .../copying/array_copy_different_packing.sol | 2 +- .../copying/array_copy_including_array.sol | 4 ++-- .../array/copying/array_copy_nested_array.sol | 2 +- ...ray_copy_storage_storage_different_base.sol | 2 +- ...y_storage_storage_different_base_nested.sol | 2 +- .../array_copy_storage_storage_dyn_dyn.sol | 2 +- ...ay_copy_storage_storage_dynamic_dynamic.sol | 2 +- ...ray_copy_storage_storage_static_dynamic.sol | 2 +- ...rray_copy_storage_storage_static_static.sol | 2 +- .../array_copy_storage_storage_struct.sol | 2 +- .../array_copy_storage_to_memory_nested.sol | 2 +- .../array/copying/array_copy_target_simple.sol | 2 +- .../copying/array_copy_target_simple_2.sol | 2 +- .../copying/array_elements_to_mapping.sol | 2 +- .../array_nested_calldata_to_storage.sol | 8 ++++---- .../copying/array_nested_memory_to_storage.sol | 4 ++-- ...ion_external_storage_to_storage_dynamic.sol | 2 +- ...to_storage_dynamic_different_mutability.sol | 2 +- .../array_of_struct_calldata_to_storage.sol | 2 +- .../array_of_struct_memory_to_storage.sol | 2 +- ...s_containing_arrays_calldata_to_storage.sol | 2 +- ...cts_containing_arrays_memory_to_storage.sol | 2 +- .../array_storage_multi_items_per_slot.sol | 2 +- .../array/copying/array_to_mapping.sol | 2 +- .../array/copying/bytes_inside_mappings.sol | 4 ++-- .../array/copying/bytes_storage_to_storage.sol | 8 ++++---- .../calldata_array_dynamic_to_storage.sol | 2 +- .../copying/calldata_array_to_mapping.sol | 2 +- ...anup_during_multi_element_per_slot_copy.sol | 4 ++-- .../copy_byte_array_in_struct_to_storage.sol | 4 ++-- .../copying/copy_byte_array_to_storage.sol | 2 +- .../copy_function_internal_storage_array.sol | 2 +- .../array/copying/copy_removes_bytes_data.sol | 2 +- .../copying/copying_bytes_multiassign.sol | 2 +- ...ed_array_of_structs_calldata_to_storage.sol | 6 +++--- ...sted_array_of_structs_memory_to_storage.sol | 6 +++--- .../copying/memory_dyn_2d_bytes_to_storage.sol | 2 +- ...nested_array_element_storage_to_storage.sol | 6 +++--- ...ed_array_of_structs_calldata_to_storage.sol | 6 +++--- ...sted_array_of_structs_memory_to_storage.sol | 6 +++--- ...ted_array_of_structs_storage_to_storage.sol | 4 ++-- ...namic_array_element_calldata_to_storage.sol | 4 ++-- .../array/copying/storage_memory_nested.sol | 2 +- .../copying/storage_memory_nested_bytes.sol | 2 +- .../storage_memory_nested_from_pointer.sol | 2 +- .../copying/storage_memory_nested_struct.sol | 2 +- .../copying/storage_memory_packed_dyn.sol | 2 +- .../array/create_memory_array.sol | 2 +- .../array/delete/bytes_delete_element.sol | 2 +- .../array/dynamic_array_cleanup.sol | 2 +- .../array/dynamic_arrays_in_storage.sol | 2 +- .../array/dynamic_multi_array_cleanup.sol | 2 +- .../array/fixed_array_cleanup.sol | 2 +- .../array/fixed_arrays_as_return_type.sol | 4 ++-- .../array/function_array_cross_calls.sol | 4 ++-- .../array/nested_calldata_storage.sol | 2 +- .../array/nested_calldata_storage2.sol | 2 +- .../array/pop/array_pop_array_transition.sol | 2 +- .../array/pop/array_pop_uint16_transition.sol | 2 +- .../array/pop/array_pop_uint24_transition.sol | 2 +- .../pop/byte_array_pop_long_storage_empty.sol | 2 +- ...rray_pop_long_storage_empty_garbage_ref.sol | 2 +- .../array/pop/byte_array_pop_masking_long.sol | 2 +- .../semanticTests/array/push/array_push.sol | 2 +- .../push/array_push_nested_from_calldata.sol | 2 +- .../array/push/array_push_struct.sol | 2 +- .../push/array_push_struct_from_calldata.sol | 2 +- .../array/push/byte_array_push_transition.sol | 2 +- .../array/push/nested_bytes_push.sol | 2 +- .../array/push/push_no_args_2d.sol | 4 ++-- .../array/push/push_no_args_bytes.sol | 2 +- .../semanticTests/array/reusing_memory.sol | 4 ++-- .../copy_from_calldata_removes_bytes_data.sol | 2 +- .../cleanup/byte_array_to_storage_cleanup.sol | 2 +- .../constructor/arrays_in_constructors.sol | 4 ++-- .../bytes_in_constructors_packer.sol | 4 ++-- .../bytes_in_constructors_unpacker.sol | 4 ++-- .../constructor_static_array_argument.sol | 4 ++-- .../errors/small_error_optimization.sol | 4 ++-- .../events/event_dynamic_array_storage.sol | 2 +- .../events/event_dynamic_array_storage_v2.sol | 2 +- .../event_dynamic_nested_array_storage_v2.sol | 2 +- .../events/event_indexed_string.sol | 2 +- .../externalContracts/FixedFeeRegistrar.sol | 2 +- .../semanticTests/externalContracts/base64.sol | 6 +++--- .../externalContracts/deposit_contract.sol | 12 ++++++------ .../externalContracts/prbmath_signed.sol | 2 +- .../externalContracts/prbmath_unsigned.sol | 2 +- .../externalContracts/ramanujan_pi.sol | 2 +- .../semanticTests/externalContracts/snark.sol | 4 ++-- .../externalContracts/strings.sol | 4 ++-- .../creation_function_call_with_args.sol | 4 ++-- .../creation_function_call_with_salt.sol | 4 ++-- .../functionCall/failed_create.sol | 2 +- .../mapping_array_internal_argument.sol | 2 +- .../immutable/immutable_tag_too_large_bug.sol | 4 ++-- .../semanticTests/immutable/multi_creation.sol | 4 ++-- ...ited_function_calldata_memory_interface.sol | 4 ++-- .../inheritance/value_for_constructor.sol | 4 ++-- .../transient_storage_low_level_calls.sol | 4 ++-- .../libraries/internal_types_in_library.sol | 2 +- .../using_library_mappings_return.sol | 2 +- .../operator_making_pure_external_call.sol | 8 ++++---- .../operator_making_view_external_call.sol | 8 ++++---- .../eof/salted_create_with_value.sol | 4 ++-- .../storage/empty_nonempty_empty.sol | 2 +- .../storage/packed_storage_structs_bytes.sol | 2 +- .../storageLayoutSpecifier/delete.sol | 2 +- .../dynamic_array_storage_end.sol | 6 +++--- .../mapping_storage_end.sol | 2 +- .../multiple_inheritance.sol | 2 +- .../state_variable_dynamic_array.sol | 4 ++-- .../state_variable_mapping.sol | 2 +- .../storage_reference_array.sol | 2 +- ...ata_struct_with_nested_array_to_storage.sol | 2 +- .../conversion/recursive_storage_memory.sol | 2 +- .../structs/copy_from_mapping.sol | 2 +- .../structs/copy_struct_array_from_storage.sol | 2 +- .../copy_substructures_from_mapping.sol | 2 +- .../structs/copy_substructures_to_mapping.sol | 6 +++--- .../semanticTests/structs/copy_to_mapping.sol | 8 ++++---- .../structs/memory_structs_nested_load.sol | 2 +- ...struct_containing_bytes_copy_and_delete.sol | 4 ++-- .../semanticTests/structs/struct_copy.sol | 2 +- .../structs/struct_copy_via_local.sol | 2 +- .../struct_delete_storage_with_array.sol | 4 ++-- .../struct_memory_to_storage_function_ptr.sol | 2 +- .../mapping/copy_from_mapping_to_mapping.sol | 2 +- .../userDefinedValueType/erc20.sol | 2 +- .../various/destructuring_assignment.sol | 2 +- .../various/different_call_type_transient.sol | 2 +- .../various/eof/create_calldata.sol | 4 ++-- .../semanticTests/various/erc20.sol | 2 +- .../semanticTests/various/senders_balance.sol | 4 ++-- .../various/skip_dynamic_types_for_structs.sol | 2 +- .../viaYul/copy_struct_invalid_ir_bug.sol | 2 +- 157 files changed, 242 insertions(+), 242 deletions(-) diff --git a/libevmasm/Assembly.cpp b/libevmasm/Assembly.cpp index fa5c09ac0b65..87f3523231f3 100644 --- a/libevmasm/Assembly.cpp +++ b/libevmasm/Assembly.cpp @@ -844,7 +844,7 @@ std::map const& Assembly::optimiseInternal( } // TODO: verify this for EOF. - if (_settings.runPeephole && !m_eofVersion.has_value()) + if (_settings.runPeephole) { for (auto& codeSection: m_codeSections) { diff --git a/test/libsolidity/semanticTests/abiEncodeDecode/abi_decode_simple_storage.sol b/test/libsolidity/semanticTests/abiEncodeDecode/abi_decode_simple_storage.sol index f753a3966fd1..2bab3904cb42 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: 134891 +// gas irOptimized: 134878 // gas legacy: 137095 // gas legacyOptimized: 135823 diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol index 496d21fea2f4..8a4f54ef226d 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol @@ -21,6 +21,6 @@ contract C { } // ---- // f() -> 0x20, 0x8, 0x40, 0x3, 0x9, 0xa, 0xb -// gas irOptimized: 202222 +// gas irOptimized: 202152 // gas legacy: 206263 // gas legacyOptimized: 203172 diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_calldata_slice.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_calldata_slice.sol index 681fab9cf5b8..d6ec713fe9be 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: 214026 +// gas irOptimized: 210960 // gas legacy: 305816 // gas legacyOptimized: 253573 // test_uint256() -> -// gas irOptimized: 299243 +// gas irOptimized: 294648 // gas legacy: 421304 // gas legacyOptimized: 351544 diff --git a/test/libsolidity/semanticTests/abiEncoderV1/struct/struct_storage_ptr.sol b/test/libsolidity/semanticTests/abiEncoderV1/struct/struct_storage_ptr.sol index 035f9cff5731..40506d6b56a0 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: 166571 +// gas irOptimized: 166491 // gas legacy: 169273 // gas legacyOptimized: 167243 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_calldata_slice.sol b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_calldata_slice.sol index 45a6602abc48..3606f51b1623 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: 214026 +// gas irOptimized: 210960 // gas legacy: 305816 // gas legacyOptimized: 253573 // test_uint256() -> -// gas irOptimized: 299243 +// gas irOptimized: 294648 // gas legacy: 421304 // gas legacyOptimized: 351544 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol index 4b657d5fd81b..0c4758b6df40 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol @@ -50,6 +50,6 @@ contract C { // f2() -> 0x20, 0xa0, 0x1, 0x60, 0x2, 0x3, "abc" // f3() -> 0x20, 0xa0, 0x1, 0x60, 0x2, 0x3, "abc" // f4() -> 0x20, 0x160, 0x1, 0x80, 0xc0, 0x2, 0x3, "abc", 0x7, 0x40, 0x2, 0x2, 0x3 -// gas irOptimized: 111630 +// gas irOptimized: 111579 // gas legacy: 113890 // gas legacyOptimized: 111658 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 d35c0a28e796..7b25a9d79088 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,8 +30,8 @@ contract C is B { } // ---- // test() -> 77 -// gas irOptimized: 54683 -// gas irOptimized code: 68000 +// gas irOptimized: 54627 +// gas irOptimized code: 63400 // gas legacy: 57266 // gas legacy code: 94600 // gas legacyOptimized: 55195 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/calldata_overlapped_dynamic_arrays.sol b/test/libsolidity/semanticTests/abiEncoderV2/calldata_overlapped_dynamic_arrays.sol index 84c153fa84eb..a79181e9166e 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/calldata_overlapped_dynamic_arrays.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/calldata_overlapped_dynamic_arrays.sol @@ -33,7 +33,7 @@ contract C { // f_which(uint256[],uint256[2],uint256): 0x40, 1, 2, 1, 5, 6 -> 0x20, 0x40, 5, 2 // f_which(uint256[],uint256[2],uint256): 0x40, 1, 2, 1 -> FAILURE // f_storage(uint256[],uint256[2]): 0x20, 1, 2 -> 0x20, 0x60, 0x20, 1, 2 -// gas irOptimized: 111052 +// gas irOptimized: 111041 // gas legacy: 112707 // gas legacyOptimized: 111845 // f_storage(uint256[],uint256[2]): 0x40, 1, 2, 5, 6 -> 0x20, 0x80, 0x20, 2, 5, 6 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/storage_array_encoding.sol b/test/libsolidity/semanticTests/abiEncoderV2/storage_array_encoding.sol index 3e8f5231e547..2fd6eff95c69 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/storage_array_encoding.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/storage_array_encoding.sol @@ -18,10 +18,10 @@ 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: 179483 +// gas irOptimized: 179430 // gas legacy: 184233 // gas legacyOptimized: 180856 // i(uint256[2][2]): 123, 124, 223, 224 -> 32, 128, 123, 124, 223, 224 -// gas irOptimized: 111767 +// gas irOptimized: 111736 // gas legacy: 115091 // gas legacyOptimized: 112657 diff --git a/test/libsolidity/semanticTests/array/array_storage_index_access.sol b/test/libsolidity/semanticTests/array/array_storage_index_access.sol index a771fa71a542..726b4a261a8b 100644 --- a/test/libsolidity/semanticTests/array/array_storage_index_access.sol +++ b/test/libsolidity/semanticTests/array/array_storage_index_access.sol @@ -16,38 +16,38 @@ contract C { // ---- // test_indices(uint256): 1 -> // test_indices(uint256): 129 -> -// gas irOptimized: 2994583 +// gas irOptimized: 2993422 // gas legacy: 3038668 // gas legacyOptimized: 2995964 // test_indices(uint256): 5 -> -// gas irOptimized: 573884 +// gas irOptimized: 573253 // gas legacy: 573821 // gas legacyOptimized: 571847 // test_indices(uint256): 10 -> -// gas irOptimized: 156398 +// gas irOptimized: 156308 // gas legacy: 160122 // gas legacyOptimized: 156996 // test_indices(uint256): 15 -> -// gas irOptimized: 170593 +// gas irOptimized: 170458 // gas legacy: 175987 // gas legacyOptimized: 171596 // test_indices(uint256): 0xFF -> -// gas irOptimized: 5629033 +// gas irOptimized: 5626738 // gas legacy: 5715762 // gas legacyOptimized: 5632556 // test_indices(uint256): 1000 -> -// gas irOptimized: 18009740 +// gas irOptimized: 18000740 // gas legacy: 18347824 // gas legacyOptimized: 18037248 // test_indices(uint256): 129 -> -// gas irOptimized: 4117214 +// gas irOptimized: 4112104 // gas legacy: 4140124 // gas legacyOptimized: 4108272 // test_indices(uint256): 128 -> -// gas irOptimized: 390418 +// gas irOptimized: 389260 // gas legacy: 433512 // gas legacyOptimized: 400909 // test_indices(uint256): 1 -> -// gas irOptimized: 577899 +// gas irOptimized: 577282 // gas legacy: 576726 // gas legacyOptimized: 575542 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 189c3b2a3c10..30dc3658c80e 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_indices(uint256): 1 -> // test_zeroed_indices(uint256): 5 -> -// gas irOptimized: 133067 +// gas irOptimized: 132829 // gas legacy: 131664 // gas legacyOptimized: 129990 // test_zeroed_indices(uint256): 10 -> -// gas irOptimized: 227154 +// gas irOptimized: 226751 // gas legacy: 225215 // gas legacyOptimized: 222351 // test_zeroed_indices(uint256): 15 -> -// gas irOptimized: 325290 +// gas irOptimized: 324731 // gas legacy: 322899 // gas legacyOptimized: 318907 // test_zeroed_indices(uint256): 0xFF -> -// gas irOptimized: 5137150 +// gas irOptimized: 5126847 // gas legacy: 5093135 // gas legacyOptimized: 5020523 diff --git a/test/libsolidity/semanticTests/array/array_storage_push_empty.sol b/test/libsolidity/semanticTests/array/array_storage_push_empty.sol index 3f5295f1b0dc..2c341725ee02 100644 --- a/test/libsolidity/semanticTests/array/array_storage_push_empty.sol +++ b/test/libsolidity/semanticTests/array/array_storage_push_empty.sol @@ -12,11 +12,11 @@ contract C { // EVMVersion: >=petersburg // ---- // pushEmpty(uint256): 128 -// gas irOptimized: 396227 +// gas irOptimized: 395075 // gas legacy: 400519 // gas legacyOptimized: 388804 // pushEmpty(uint256): 256 -// gas irOptimized: 677239 +// gas irOptimized: 674935 // gas legacy: 684859 // gas legacyOptimized: 671480 // pushEmpty(uint256): 38869 -> FAILURE # out-of-gas # diff --git a/test/libsolidity/semanticTests/array/array_storage_push_pop.sol b/test/libsolidity/semanticTests/array/array_storage_push_pop.sol index 4c4a309764d1..9a48e6111285 100644 --- a/test/libsolidity/semanticTests/array/array_storage_push_pop.sol +++ b/test/libsolidity/semanticTests/array/array_storage_push_pop.sol @@ -17,11 +17,11 @@ contract C { // gas legacy: 105722 // gas legacyOptimized: 103508 // set_get_length(uint256): 0xFF -> 0 -// gas irOptimized: 807517 +// gas irOptimized: 804967 // gas legacy: 807764 // gas legacyOptimized: 784467 // set_get_length(uint256): 0xFFF -> 0 -// gas irOptimized: 12611689 +// gas irOptimized: 12570739 // gas legacy: 12608096 // gas legacyOptimized: 12239199 // set_get_length(uint256): 0xFFFF -> FAILURE # Out-of-gas # 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 6f7aa212298e..c1e5a10e347d 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: 183981 +// gas irOptimized: 183793 // gas legacy: 211054 // gas legacyOptimized: 206077 // data(uint256,uint256): 0x02, 0x02 -> 0x09 diff --git a/test/libsolidity/semanticTests/array/byte_array_transitional_2.sol b/test/libsolidity/semanticTests/array/byte_array_transitional_2.sol index 25196ae8039e..1de9e76f43fe 100644 --- a/test/libsolidity/semanticTests/array/byte_array_transitional_2.sol +++ b/test/libsolidity/semanticTests/array/byte_array_transitional_2.sol @@ -17,6 +17,6 @@ contract c { } // ---- // test() -> 0 -// gas irOptimized: 113251 +// gas irOptimized: 111450 // gas legacy: 147108 // gas legacyOptimized: 144200 diff --git a/test/libsolidity/semanticTests/array/bytes_length_member.sol b/test/libsolidity/semanticTests/array/bytes_length_member.sol index bdb051e575d0..6c73238915c5 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: 110210 +// gas irOptimized: 110201 // gas legacy: 110951 // gas legacyOptimized: 110576 // getLength() -> 68 diff --git a/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol b/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol index 3ffaf5419f40..6c0e9d69eea2 100644 --- a/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol +++ b/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol @@ -8,8 +8,8 @@ contract C { } // ---- // constructor(): 1, 2, 3 -> -// gas irOptimized: 88320 -// gas irOptimized code: 18400 +// gas irOptimized: 88312 +// gas irOptimized code: 17400 // gas legacy: 134317 // gas legacy code: 46200 // gas legacyOptimized: 127166 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 237bdd271d7d..ce1b107a6d04 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: 646608 +// gas irOptimized: 646453 // gas legacy: 694354 // gas legacyOptimized: 693849 // 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 dd0936377cc2..b5f0b8f6043c 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: 121929 +// gas irOptimized: 121417 // gas legacy: 124643 // gas legacyOptimized: 122801 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_clear_storage.sol b/test/libsolidity/semanticTests/array/copying/array_copy_clear_storage.sol index 2c54668ec2ab..64e5de34494d 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_clear_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_clear_storage.sol @@ -13,6 +13,6 @@ contract C { } // ---- // f() -> 0 -// gas irOptimized: 108263 +// gas irOptimized: 108176 // gas legacy: 108216 // gas legacyOptimized: 107625 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 0cc97f69f9fa..0d74ca383b64 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: 207712 +// gas irOptimized: 207454 // gas legacy: 220711 // gas legacyOptimized: 220097 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_including_array.sol b/test/libsolidity/semanticTests/array/copying/array_copy_including_array.sol index 616b0fda9455..c27ffabf072f 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_including_array.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_including_array.sol @@ -35,12 +35,12 @@ contract c { } // ---- // test() -> 0x02000202 -// gas irOptimized: 4486744 +// gas irOptimized: 4484145 // gas legacy: 4475394 // gas legacyOptimized: 4447665 // storageEmpty -> 1 // clear() -> 0, 0 -// gas irOptimized: 4426720 +// gas irOptimized: 4424249 // gas legacy: 4407185 // gas legacyOptimized: 4381337 // storageEmpty -> 1 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 752562d0611d..463502daa07b 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: 687639 +// gas irOptimized: 687530 // gas legacy: 686176 // gas legacyOptimized: 685611 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 3809aa72ea61..a7d343c857cc 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: 205369 +// gas irOptimized: 205274 // gas legacy: 213863 // gas legacyOptimized: 212901 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 b18080e5d38c..9150157c9029 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: 170083 +// gas irOptimized: 169677 // gas legacy: 175415 // gas legacyOptimized: 172533 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dyn_dyn.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dyn_dyn.sol index f9192f4cdb4c..af1d7b78f5e5 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dyn_dyn.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dyn_dyn.sol @@ -15,7 +15,7 @@ contract c { // ---- // setData1(uint256,uint256,uint256): 10, 5, 4 -> // copyStorageStorage() -> -// gas irOptimized: 111123 +// gas irOptimized: 111115 // gas legacy: 109272 // gas legacyOptimized: 109262 // getData2(uint256): 5 -> 10, 4 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dynamic_dynamic.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dynamic_dynamic.sol index a2e1034d509d..8b8ae2f1276b 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dynamic_dynamic.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dynamic_dynamic.sol @@ -17,6 +17,6 @@ contract c { } // ---- // test() -> 5, 4 -// gas irOptimized: 253338 +// gas irOptimized: 253270 // gas legacy: 250892 // gas legacyOptimized: 250045 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 59189b8aafe0..565f39e43bb1 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: 122941 +// gas irOptimized: 122933 // gas legacy: 123566 // gas legacyOptimized: 123202 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_static.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_static.sol index f959340eae07..59587965afca 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_static.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_static.sol @@ -14,6 +14,6 @@ contract c { } // ---- // test() -> 8, 0 -// gas irOptimized: 195461 +// gas irOptimized: 195453 // gas legacy: 194842 // gas legacyOptimized: 194281 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_struct.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_struct.sol index 38097f64cb61..7d9a3720cd83 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_struct.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_struct.sol @@ -17,7 +17,7 @@ contract c { } // ---- // test() -> 4, 5 -// gas irOptimized: 190042 +// gas irOptimized: 189806 // gas legacy: 190828 // gas legacyOptimized: 189657 // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_to_memory_nested.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_to_memory_nested.sol index 211276ad9de1..32e8fc074606 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_to_memory_nested.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_to_memory_nested.sol @@ -15,6 +15,6 @@ contract C { } // ---- // f() -> 0x20, 2, 0x40, 0xa0, 2, 0, 1, 2, 2, 3 -// gas irOptimized: 161146 +// gas irOptimized: 161093 // gas legacy: 162200 // gas legacyOptimized: 159953 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 3394be810c2b..bb3c738d9e3e 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: 273074 +// gas irOptimized: 272988 // gas legacy: 282601 // gas legacyOptimized: 281510 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 c4e008fead84..b61e1e643254 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: 232648 +// gas irOptimized: 232591 // gas legacy: 235694 // gas legacyOptimized: 235193 diff --git a/test/libsolidity/semanticTests/array/copying/array_elements_to_mapping.sol b/test/libsolidity/semanticTests/array/copying/array_elements_to_mapping.sol index 5a40d2575d34..783337a0f13a 100644 --- a/test/libsolidity/semanticTests/array/copying/array_elements_to_mapping.sol +++ b/test/libsolidity/semanticTests/array/copying/array_elements_to_mapping.sol @@ -52,7 +52,7 @@ contract C { } // ---- // from_storage() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 -// gas irOptimized: 148273 +// gas irOptimized: 148207 // gas legacy: 150737 // gas legacyOptimized: 148690 // from_storage_ptr() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 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 567d36e67fb3..1a7538cae1bc 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 @@ -38,10 +38,10 @@ contract c { // compileViaYul: true // ---- // test1(uint256[][]): 0x20, 2, 0x40, 0x40, 2, 23, 42 -> 2, 65 -// gas irOptimized: 180215 +// gas irOptimized: 180175 // test2(uint256[][2]): 0x20, 0x40, 0x40, 2, 23, 42 -> 2, 65 -// gas irOptimized: 157178 +// gas irOptimized: 157081 // test3(uint256[2][]): 0x20, 2, 23, 42, 23, 42 -> 2, 65 -// gas irOptimized: 134405 +// gas irOptimized: 134372 // test4(uint256[2][2]): 23, 42, 23, 42 -> 65 -// gas irOptimized: 111036 +// gas irOptimized: 111033 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 ab3ed7703286..0eedf950edaa 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 @@ -38,12 +38,12 @@ contract Test { } // ---- // test() -> 24 -// gas irOptimized: 225759 +// gas irOptimized: 225649 // gas legacy: 227083 // gas legacyOptimized: 226529 // test1() -> 3 // test2() -> 6 // test3() -> 24 -// gas irOptimized: 140911 +// gas irOptimized: 140746 // gas legacy: 142238 // gas legacyOptimized: 141365 diff --git a/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic.sol b/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic.sol index 7d453daab944..f9832971d417 100644 --- a/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic.sol +++ b/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic.sol @@ -45,7 +45,7 @@ contract C { } // ---- // copyExternalStorageArrayOfFunctionType() -> true -// gas irOptimized: 104257 +// gas irOptimized: 104196 // gas legacy: 108554 // gas legacyOptimized: 102405 // copyInternalArrayOfFunctionType() -> true diff --git a/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic_different_mutability.sol b/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic_different_mutability.sol index 271a1074d3e3..3aa44de02bad 100644 --- a/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic_different_mutability.sol +++ b/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic_different_mutability.sol @@ -48,7 +48,7 @@ contract C { } // ---- // copyExternalStorageArraysOfFunctionType() -> true -// gas irOptimized: 104008 +// gas irOptimized: 103961 // gas legacy: 108295 // gas legacyOptimized: 102162 // copyInternalArrayOfFunctionType() -> true 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 500e21cc10a0..cd309867b989 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: 120161 +// gas irOptimized: 120086 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 6e213e82e80f..f51282fbc38e 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: 119079 +// gas irOptimized: 118989 diff --git a/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_calldata_to_storage.sol b/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_calldata_to_storage.sol index f97670eb0d1e..3bd87eef7f4e 100644 --- a/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_calldata_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_calldata_to_storage.sol @@ -23,4 +23,4 @@ contract C { // compileViaYul: true // ---- // f((uint256[])[]): 0x20, 3, 0x60, 0x60, 0x60, 0x20, 3, 1, 2, 3 -> 3, 1 -// gas irOptimized: 324374 +// gas irOptimized: 324143 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 315196e25859..3f992e6966a8 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: 180607 +// gas irOptimized: 180374 diff --git a/test/libsolidity/semanticTests/array/copying/array_storage_multi_items_per_slot.sol b/test/libsolidity/semanticTests/array/copying/array_storage_multi_items_per_slot.sol index 1fd45b4459c8..2b8f28c4af58 100644 --- a/test/libsolidity/semanticTests/array/copying/array_storage_multi_items_per_slot.sol +++ b/test/libsolidity/semanticTests/array/copying/array_storage_multi_items_per_slot.sol @@ -12,6 +12,6 @@ contract C { } // ---- // f() -> 1, 2, 3 -// gas irOptimized: 133205 +// gas irOptimized: 132937 // gas legacy: 134605 // gas legacyOptimized: 131938 diff --git a/test/libsolidity/semanticTests/array/copying/array_to_mapping.sol b/test/libsolidity/semanticTests/array/copying/array_to_mapping.sol index 1fd90f3f22f2..ef3177025124 100644 --- a/test/libsolidity/semanticTests/array/copying/array_to_mapping.sol +++ b/test/libsolidity/semanticTests/array/copying/array_to_mapping.sol @@ -37,7 +37,7 @@ contract C { } // ---- // from_storage() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 -// gas irOptimized: 146444 +// gas irOptimized: 146403 // gas legacy: 148892 // gas legacyOptimized: 146917 // from_storage_ptr() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 diff --git a/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol b/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol index b1b842bfc9d8..aefccd2b5c45 100644 --- a/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol +++ b/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol @@ -5,11 +5,11 @@ contract c { } // ---- // set(uint256): 1, 2 -> true -// gas irOptimized: 110343 +// gas irOptimized: 110334 // gas legacy: 111310 // gas legacyOptimized: 110741 // set(uint256): 2, 2, 3, 4, 5 -> true -// gas irOptimized: 177234 +// gas irOptimized: 177225 // gas legacy: 178312 // gas legacyOptimized: 177716 // 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 1658a831826a..6ca4826fb23b 100644 --- a/test/libsolidity/semanticTests/array/copying/bytes_storage_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/bytes_storage_to_storage.sol @@ -21,21 +21,21 @@ contract c { // gas legacy: 112904 // gas legacyOptimized: 112647 // f(uint256): 32 -> 0x20, 0x20, 1780731860627700044960722568376592200742329637303199754547598369979440671 -// gas irOptimized: 108032 +// gas irOptimized: 106914 // gas legacy: 128964 // gas legacyOptimized: 128854 // f(uint256): 33 -> 0x20, 33, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x2000000000000000000000000000000000000000000000000000000000000000 -// gas irOptimized: 113986 +// gas irOptimized: 112822 // gas legacy: 136092 // gas legacyOptimized: 135469 // f(uint256): 63 -> 0x20, 0x3f, 1780731860627700044960722568376592200742329637303199754547598369979440671, 14532552714582660066924456880521368950258152170031413196862950297402215316992 -// gas irOptimized: 108316 +// gas irOptimized: 106132 // gas legacy: 148692 // gas legacyOptimized: 148699 // f(uint256): 12 -> 0x20, 0x0c, 0x0102030405060708090a0b0000000000000000000000000000000000000000 // gas legacy: 59345 // gas legacyOptimized: 57279 // f(uint256): 129 -> 0x20, 0x81, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f, 29063324697304692433803953038474361308315562010425523193971352996434451193439, 0x606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f, -57896044618658097711785492504343953926634992332820282019728792003956564819968 -// gas irOptimized: 378684 +// gas irOptimized: 374262 // gas legacy: 458997 // gas legacyOptimized: 460664 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 fe2ce5d4412b..1e06a8581735 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: 110803 +// gas irOptimized: 110796 // gas legacy: 111548 // gas legacyOptimized: 111321 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 03bddaeff30f..45ff6db5e95d 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: 138171 +// gas irOptimized: 138095 diff --git a/test/libsolidity/semanticTests/array/copying/cleanup_during_multi_element_per_slot_copy.sol b/test/libsolidity/semanticTests/array/copying/cleanup_during_multi_element_per_slot_copy.sol index 7e2285c196c6..f3fb5bdcc3fb 100644 --- a/test/libsolidity/semanticTests/array/copying/cleanup_during_multi_element_per_slot_copy.sol +++ b/test/libsolidity/semanticTests/array/copying/cleanup_during_multi_element_per_slot_copy.sol @@ -16,8 +16,8 @@ contract C { } // ---- // constructor() -// gas irOptimized: 43601 -// gas irOptimized code: 175200 +// gas irOptimized: 43595 +// gas irOptimized code: 170800 // gas legacy: 89553 // gas legacy code: 126200 // gas legacyOptimized: 83556 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 dcb33f997a8e..7bdc7af84ea3 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: 178740 +// gas irOptimized: 178650 // gas legacy: 180675 // gas legacyOptimized: 179686 // g() -> 0x40, 0xc0, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000, 0x11, 0x3132333435363738393233343536373839000000000000000000000000000000 -// gas irOptimized: 105591 +// gas irOptimized: 105498 // gas legacy: 109415 // gas legacyOptimized: 106600 // h() -> 0x40, 0x60, 0x00, 0x00 diff --git a/test/libsolidity/semanticTests/array/copying/copy_byte_array_to_storage.sol b/test/libsolidity/semanticTests/array/copying/copy_byte_array_to_storage.sol index 6677feb7f1b4..f2dc8287b254 100644 --- a/test/libsolidity/semanticTests/array/copying/copy_byte_array_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/copy_byte_array_to_storage.sol @@ -46,6 +46,6 @@ contract C { } // ---- // f() -> 0xff -// gas irOptimized: 143148 +// gas irOptimized: 143059 // gas legacy: 153404 // gas legacyOptimized: 146676 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 d2c0c38a0aed..cf807c64d180 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: 122025 +// gas irOptimized: 121923 // 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 3bae89dcd295..e67bb718e14e 100644 --- a/test/libsolidity/semanticTests/array/copying/copy_removes_bytes_data.sol +++ b/test/libsolidity/semanticTests/array/copying/copy_removes_bytes_data.sol @@ -7,7 +7,7 @@ contract c { } // ---- // set(): 1, 2, 3, 4, 5 -> true -// gas irOptimized: 177101 +// gas irOptimized: 177092 // gas legacy: 177953 // gas legacyOptimized: 177550 // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/array/copying/copying_bytes_multiassign.sol b/test/libsolidity/semanticTests/array/copying/copying_bytes_multiassign.sol index 77d2c0ad0398..6fb5c0f36611 100644 --- a/test/libsolidity/semanticTests/array/copying/copying_bytes_multiassign.sol +++ b/test/libsolidity/semanticTests/array/copying/copying_bytes_multiassign.sol @@ -18,7 +18,7 @@ contract sender { } // ---- // (): 7 -> -// gas irOptimized: 110511 +// gas irOptimized: 110485 // gas legacy: 111388 // gas legacyOptimized: 111065 // val() -> 0 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 bba096b23dd3..fe5fef52d5fa 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: 324505 +// gas irOptimized: 324312 // 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: 139883 +// gas irOptimized: 139764 // 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: 186247 +// gas irOptimized: 186124 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 c9b2c7d9c842..fd8de524910d 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: 327644 +// gas irOptimized: 327353 // 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: 142828 +// gas irOptimized: 142599 // 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: 188869 +// gas irOptimized: 188653 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 ef21e274fe76..956bf662e53c 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: 124666 +// gas irOptimized: 124191 // gas legacy: 129077 // gas legacyOptimized: 128210 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 8764faf609b3..a300374b1a14 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,15 +70,15 @@ contract C { } // ---- // test1() -> -// gas irOptimized: 149912 +// gas irOptimized: 149873 // gas legacy: 150949 // gas legacyOptimized: 150906 // test2() -> FAILURE -// gas irOptimized: 150117 +// gas irOptimized: 150088 // gas legacy: 150672 // gas legacyOptimized: 150575 // test3() -> -// gas irOptimized: 123931 +// gas irOptimized: 123845 // gas legacy: 125333 // gas legacyOptimized: 125127 // test4() -> 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 5b4d9f17e1fb..9b6b044c4201 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: 301359 +// gas irOptimized: 301176 // 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: 115401 +// gas irOptimized: 115304 // 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: 185705 +// gas irOptimized: 185585 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 4ab40fc49980..d54f382b167f 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: 304225 +// gas irOptimized: 303955 // 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: 116554 +// gas irOptimized: 116413 // 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: 187779 +// gas irOptimized: 187583 diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_storage_to_storage.sol b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_storage_to_storage.sol index 276966db9c61..89e4f846eaa5 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_storage_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_storage_to_storage.sol @@ -63,7 +63,7 @@ contract C { // compileViaYul: true // ---- // test1() -// gas irOptimized: 122849 +// gas irOptimized: 122802 // test2() -// gas irOptimized: 122894 +// gas irOptimized: 122829 // test3() 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 9b509a518411..0a2f62322677 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 @@ -30,7 +30,7 @@ contract C { // compileViaYul: true // ---- // test(uint8[][][]): 0x20, 2, 0x40, 0x60, 0, 2, 0x40, 0x80, 1, 7, 2, 8, 9 -// gas irOptimized: 137272 +// gas irOptimized: 137218 // test2(uint8[][]): 0x20, 2, 0x40, 0x80, 1, 7, 2, 8, 9 -// gas irOptimized: 163311 +// gas irOptimized: 163227 // 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 fd905fb583b7..92eeda704527 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: 206128 +// gas irOptimized: 205826 // gas legacy: 211758 // gas legacyOptimized: 211179 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 cee95dd9222c..ef48accb4851 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: 201476 +// gas irOptimized: 201436 // gas legacy: 204327 // gas legacyOptimized: 202899 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 e8e734cf4d3b..838853194d96 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: 206128 +// gas irOptimized: 205826 // gas legacy: 211770 // gas legacyOptimized: 211191 diff --git a/test/libsolidity/semanticTests/array/copying/storage_memory_nested_struct.sol b/test/libsolidity/semanticTests/array/copying/storage_memory_nested_struct.sol index 2aa6210b0a68..21690e0630d7 100644 --- a/test/libsolidity/semanticTests/array/copying/storage_memory_nested_struct.sol +++ b/test/libsolidity/semanticTests/array/copying/storage_memory_nested_struct.sol @@ -24,6 +24,6 @@ contract C { } // ---- // f() -> 11, 0x0c, 1, 0x15, 22, 4 -// gas irOptimized: 290233 +// gas irOptimized: 290156 // gas legacy: 293398 // gas legacyOptimized: 290218 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 2242b2bcf562..276fa1c2d670 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: 113603 +// gas irOptimized: 112734 // gas legacy: 122231 // gas legacyOptimized: 118409 diff --git a/test/libsolidity/semanticTests/array/create_memory_array.sol b/test/libsolidity/semanticTests/array/create_memory_array.sol index 2165320d9880..2dc734b07a4d 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: 127777 +// gas irOptimized: 113054 // gas legacy: 121380 // 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 c92216449c84..2896b448d5aa 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: 207664 +// gas irOptimized: 205550 // gas legacy: 242263 // gas legacyOptimized: 241182 diff --git a/test/libsolidity/semanticTests/array/dynamic_array_cleanup.sol b/test/libsolidity/semanticTests/array/dynamic_array_cleanup.sol index b13967d401a0..c9859f591f42 100644 --- a/test/libsolidity/semanticTests/array/dynamic_array_cleanup.sol +++ b/test/libsolidity/semanticTests/array/dynamic_array_cleanup.sol @@ -14,7 +14,7 @@ contract c { // ---- // storageEmpty -> 1 // fill() -> -// gas irOptimized: 518047 +// gas irOptimized: 517984 // gas legacy: 518943 // gas legacyOptimized: 515555 // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol b/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol index 6027ad431390..41d5407fb884 100644 --- a/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol +++ b/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol @@ -41,7 +41,7 @@ contract c { // ---- // getLengths() -> 0, 0 // setLengths(uint256,uint256): 48, 49 -> -// gas irOptimized: 107763 +// gas irOptimized: 107616 // gas legacy: 108272 // gas legacyOptimized: 100268 // getLengths() -> 48, 49 diff --git a/test/libsolidity/semanticTests/array/dynamic_multi_array_cleanup.sol b/test/libsolidity/semanticTests/array/dynamic_multi_array_cleanup.sol index 8f7aeab63f41..a6fc3b3e4fd4 100644 --- a/test/libsolidity/semanticTests/array/dynamic_multi_array_cleanup.sol +++ b/test/libsolidity/semanticTests/array/dynamic_multi_array_cleanup.sol @@ -16,7 +16,7 @@ contract c { // ---- // storageEmpty -> 1 // fill() -> 8 -// gas irOptimized: 122229 +// gas irOptimized: 122187 // gas legacy: 121602 // gas legacyOptimized: 120589 // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol b/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol index 1c0405aa4d49..7908c49d395e 100644 --- a/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol +++ b/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol @@ -10,7 +10,7 @@ contract c { // ---- // storageEmpty -> 1 // fill() -> -// gas irOptimized: 464480 +// gas irOptimized: 464400 // gas legacy: 468825 // gas legacyOptimized: 466238 // storageEmpty -> 0 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 01037b55ddaf..b6a3925b0390 100644 --- a/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol +++ b/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol @@ -18,8 +18,8 @@ contract B { } // ---- // f() -> 2, 3, 4, 5, 6, 1000, 1001, 1002, 1003, 1004 -// gas irOptimized: 57989 -// gas irOptimized code: 58600 +// gas irOptimized: 57701 +// gas irOptimized code: 53200 // gas legacy: 68001 // gas legacy code: 162000 // gas legacyOptimized: 59997 diff --git a/test/libsolidity/semanticTests/array/function_array_cross_calls.sol b/test/libsolidity/semanticTests/array/function_array_cross_calls.sol index 720652d0000c..da04f0ad9a69 100644 --- a/test/libsolidity/semanticTests/array/function_array_cross_calls.sol +++ b/test/libsolidity/semanticTests/array/function_array_cross_calls.sol @@ -42,8 +42,8 @@ contract C { } // ---- // test() -> 5, 6, 7 -// gas irOptimized: 84276 -// gas irOptimized code: 166800 +// gas irOptimized: 83924 +// gas irOptimized code: 156200 // gas legacy: 97551 // gas legacy code: 342800 // gas legacyOptimized: 87808 diff --git a/test/libsolidity/semanticTests/array/nested_calldata_storage.sol b/test/libsolidity/semanticTests/array/nested_calldata_storage.sol index ddb9a012f7c3..b1f63dd4a7e9 100644 --- a/test/libsolidity/semanticTests/array/nested_calldata_storage.sol +++ b/test/libsolidity/semanticTests/array/nested_calldata_storage.sol @@ -8,6 +8,6 @@ contract C { // compileViaYul: true // ---- // i(uint256[][2]): 0x20, 0x40, 0xC0, 3, 0x0A01, 0x0A02, 0x0A03, 4, 0x0B01, 0x0B02, 0x0B03, 0x0B04 -// gas irOptimized: 222766 +// gas irOptimized: 222752 // tmp_i(uint256,uint256): 0, 0 -> 0x0A01 // tmp_i(uint256,uint256): 1, 0 -> 0x0B01 diff --git a/test/libsolidity/semanticTests/array/nested_calldata_storage2.sol b/test/libsolidity/semanticTests/array/nested_calldata_storage2.sol index 5176487a8a7d..81659c91ebcd 100644 --- a/test/libsolidity/semanticTests/array/nested_calldata_storage2.sol +++ b/test/libsolidity/semanticTests/array/nested_calldata_storage2.sol @@ -8,6 +8,6 @@ contract C { // compileViaYul: true // ---- // i(uint256[][]): 0x20, 2, 0x40, 0xC0, 3, 0x0A01, 0x0A02, 0x0A03, 4, 0x0B01, 0x0B02, 0x0B03, 0x0B04 -// gas irOptimized: 245114 +// gas irOptimized: 245100 // tmp_i(uint256,uint256): 0, 0 -> 0x0A01 // tmp_i(uint256,uint256): 1, 0 -> 0x0B01 diff --git a/test/libsolidity/semanticTests/array/pop/array_pop_array_transition.sol b/test/libsolidity/semanticTests/array/pop/array_pop_array_transition.sol index 589813e58d69..0f5eb2550b9f 100644 --- a/test/libsolidity/semanticTests/array/pop/array_pop_array_transition.sol +++ b/test/libsolidity/semanticTests/array/pop/array_pop_array_transition.sol @@ -23,7 +23,7 @@ contract c { } // ---- // test() -> 1, 2, 3 -// gas irOptimized: 1819702 +// gas irOptimized: 1818124 // gas legacy: 1822464 // gas legacyOptimized: 1813404 // storageEmpty -> 1 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 726a98858a64..d9750c82c802 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: 143889 +// gas irOptimized: 142768 // gas legacy: 151182 // 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 03e15028b233..e412d2c5a29c 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: 123064 +// gas irOptimized: 122363 // gas legacy: 127215 // gas legacyOptimized: 122224 // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty.sol b/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty.sol index d0ec4cadc764..126031d8eaf2 100644 --- a/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty.sol +++ b/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty.sol @@ -16,7 +16,7 @@ contract c { } // ---- // test() -> true -// gas irOptimized: 126604 +// gas irOptimized: 124492 // gas legacy: 178396 // gas legacyOptimized: 163832 // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty_garbage_ref.sol b/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty_garbage_ref.sol index 84f08afcbaf2..8d8d47280cb9 100644 --- a/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty_garbage_ref.sol +++ b/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty_garbage_ref.sol @@ -15,7 +15,7 @@ contract c { } // ---- // test() -> -// gas irOptimized: 105416 +// gas irOptimized: 104364 // gas legacy: 131256 // gas legacyOptimized: 126668 // 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 db214d27a02a..80e33f0fa394 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: 103162 +// gas irOptimized: 102894 // gas legacy: 121252 // gas legacyOptimized: 120370 diff --git a/test/libsolidity/semanticTests/array/push/array_push.sol b/test/libsolidity/semanticTests/array/push/array_push.sol index 57d700d5a0c4..3b8b22bafa73 100644 --- a/test/libsolidity/semanticTests/array/push/array_push.sol +++ b/test/libsolidity/semanticTests/array/push/array_push.sol @@ -16,6 +16,6 @@ contract c { } // ---- // test() -> 5, 4, 3, 3 -// gas irOptimized: 111735 +// gas irOptimized: 111690 // gas legacy: 111804 // gas legacyOptimized: 111122 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 b4519f9eebe6..b058f42acddc 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: 112465 +// gas irOptimized: 112417 // gas legacy: 113657 // gas legacyOptimized: 113465 diff --git a/test/libsolidity/semanticTests/array/push/array_push_struct.sol b/test/libsolidity/semanticTests/array/push/array_push_struct.sol index 880038a8ef46..22858cded443 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: 135137 +// gas irOptimized: 135034 // gas legacy: 147437 // gas legacyOptimized: 146429 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 930111d7e3ea..6086d2e3e16a 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: 136763 +// gas irOptimized: 136676 // gas legacy: 142414 // gas legacyOptimized: 137975 diff --git a/test/libsolidity/semanticTests/array/push/byte_array_push_transition.sol b/test/libsolidity/semanticTests/array/push/byte_array_push_transition.sol index f4752ded631a..a264dd7d473d 100644 --- a/test/libsolidity/semanticTests/array/push/byte_array_push_transition.sol +++ b/test/libsolidity/semanticTests/array/push/byte_array_push_transition.sol @@ -15,6 +15,6 @@ contract c { } // ---- // test() -> 0 -// gas irOptimized: 155259 +// gas irOptimized: 152819 // gas legacy: 206218 // gas legacyOptimized: 197297 diff --git a/test/libsolidity/semanticTests/array/push/nested_bytes_push.sol b/test/libsolidity/semanticTests/array/push/nested_bytes_push.sol index 1be46a55957d..ad50bdc59524 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: 179036 +// gas irOptimized: 178937 // gas legacy: 181013 // gas legacyOptimized: 180397 diff --git a/test/libsolidity/semanticTests/array/push/push_no_args_2d.sol b/test/libsolidity/semanticTests/array/push/push_no_args_2d.sol index 76784f2d5e08..33381dafadaf 100644 --- a/test/libsolidity/semanticTests/array/push/push_no_args_2d.sol +++ b/test/libsolidity/semanticTests/array/push/push_no_args_2d.sol @@ -27,14 +27,14 @@ contract C { // ---- // l() -> 0 // f(uint256,uint256): 42, 64 -> -// gas irOptimized: 108342 +// gas irOptimized: 107943 // gas legacy: 107925 // gas legacyOptimized: 101896 // l() -> 1 // ll(uint256): 0 -> 43 // a(uint256,uint256): 0, 42 -> 64 // f(uint256,uint256): 84, 128 -> -// gas irOptimized: 111066 +// gas irOptimized: 110289 // gas legacy: 109977 // gas legacyOptimized: 96331 // l() -> 2 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 b1d9363c3bed..2067e599da93 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: 173754 +// gas irOptimized: 171316 // gas legacy: 175192 // gas legacyOptimized: 175005 // l() -> 70 diff --git a/test/libsolidity/semanticTests/array/reusing_memory.sol b/test/libsolidity/semanticTests/array/reusing_memory.sol index b8e177eb010f..3f38b4057789 100644 --- a/test/libsolidity/semanticTests/array/reusing_memory.sol +++ b/test/libsolidity/semanticTests/array/reusing_memory.sol @@ -24,8 +24,8 @@ contract Main { } // ---- // f(uint256): 0x34 -> 0x46bddb1178e94d7f2892ff5f366840eb658911794f2c3a44c450aa2c505186c1 -// gas irOptimized: 99236 -// gas irOptimized code: 15600 +// gas irOptimized: 99225 +// gas irOptimized code: 15000 // gas legacy: 101551 // gas legacy code: 23600 // gas legacyOptimized: 99612 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 b046e972773d..9ac76be7453b 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,7 +9,7 @@ contract c { // EVMVersion: >=byzantium // ---- // (): 1, 2, 3, 4, 5 -> -// gas irOptimized: 154865 +// gas irOptimized: 154854 // gas legacy: 155473 // gas legacyOptimized: 155295 // checkIfDataIsEmpty() -> false diff --git a/test/libsolidity/semanticTests/cleanup/byte_array_to_storage_cleanup.sol b/test/libsolidity/semanticTests/cleanup/byte_array_to_storage_cleanup.sol index a7121a552208..90e1c0b3354e 100644 --- a/test/libsolidity/semanticTests/cleanup/byte_array_to_storage_cleanup.sol +++ b/test/libsolidity/semanticTests/cleanup/byte_array_to_storage_cleanup.sol @@ -29,7 +29,7 @@ contract C { // ---- // constructor() -> // gas irOptimized: 21029 -// gas irOptimized code: 339000 +// gas irOptimized code: 329800 // gas legacy: 101532 // gas legacy code: 604800 // gas legacyOptimized: 84956 diff --git a/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol b/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol index baf3fb376883..53a1ed2bb87b 100644 --- a/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol +++ b/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol @@ -26,8 +26,8 @@ contract Creator { // bytecodeFormat: legacy,>=EOFv1 // ---- // f(uint256,address[]): 7, 0x40, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 -> 7, 8 -// gas irOptimized: 326275 -// gas irOptimized code: 97000 +// gas irOptimized: 326187 +// gas irOptimized code: 95800 // gas legacy: 336623 // gas legacy code: 244800 // gas legacyOptimized: 329515 diff --git a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol index 750ac2fcba95..4d75c583106f 100644 --- a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol +++ b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol @@ -26,8 +26,8 @@ contract Creator { // bytecodeFormat: legacy,>=EOFv1 // ---- // f(uint256,bytes): 7, 0x40, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" -> 7, "h" -// gas irOptimized: 168440 -// gas irOptimized code: 103000 +// gas irOptimized: 168399 +// gas irOptimized code: 101200 // gas legacy: 172941 // gas legacy code: 239800 // gas legacyOptimized: 169815 diff --git a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol index 39b7c24d2cb4..625a94646eaa 100644 --- a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol +++ b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol @@ -10,8 +10,8 @@ contract Test { // bytecodeFormat: legacy,>=EOFv1 // ---- // constructor(): 7, 0x40, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" -> -// gas irOptimized: 134197 -// gas irOptimized code: 77400 +// gas irOptimized: 134180 +// gas irOptimized code: 76600 // gas legacy: 195212 // gas legacy code: 109400 // gas legacyOptimized: 181608 diff --git a/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol b/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol index 6ebe97732b53..f27bd41503cc 100644 --- a/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol +++ b/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol @@ -11,8 +11,8 @@ contract C { // bytecodeFormat: legacy,>=EOFv1 // ---- // constructor(): 1, 2, 3, 4 -> -// gas irOptimized: 110607 -// gas irOptimized code: 26600 +// gas irOptimized: 110596 +// gas irOptimized code: 26200 // gas legacy: 157977 // gas legacy code: 60400 // gas legacyOptimized: 149973 diff --git a/test/libsolidity/semanticTests/errors/small_error_optimization.sol b/test/libsolidity/semanticTests/errors/small_error_optimization.sol index b0732a521b5c..5aee6eb563b3 100644 --- a/test/libsolidity/semanticTests/errors/small_error_optimization.sol +++ b/test/libsolidity/semanticTests/errors/small_error_optimization.sol @@ -14,8 +14,8 @@ contract B { } // ---- // f() -> FAILURE, hex"92bbf6e8" -// gas irOptimized: 218056 -// gas irOptimized code: 45400 +// gas irOptimized: 217753 +// gas irOptimized code: 44600 // gas legacy: 233752 // gas legacy code: 38000 // gas legacyOptimized: 224863 diff --git a/test/libsolidity/semanticTests/events/event_dynamic_array_storage.sol b/test/libsolidity/semanticTests/events/event_dynamic_array_storage.sol index df1fda030bc9..56b925750d06 100644 --- a/test/libsolidity/semanticTests/events/event_dynamic_array_storage.sol +++ b/test/libsolidity/semanticTests/events/event_dynamic_array_storage.sol @@ -13,6 +13,6 @@ contract C { // ---- // createEvent(uint256): 42 -> // ~ emit E(uint256[]): 0x20, 0x03, 0x2a, 0x2b, 0x2c -// gas irOptimized: 114375 +// gas irOptimized: 114286 // gas legacy: 116313 // gas legacyOptimized: 114407 diff --git a/test/libsolidity/semanticTests/events/event_dynamic_array_storage_v2.sol b/test/libsolidity/semanticTests/events/event_dynamic_array_storage_v2.sol index 9527e92d554e..3c8e8c966246 100644 --- a/test/libsolidity/semanticTests/events/event_dynamic_array_storage_v2.sol +++ b/test/libsolidity/semanticTests/events/event_dynamic_array_storage_v2.sol @@ -14,6 +14,6 @@ contract C { // ---- // createEvent(uint256): 42 -> // ~ emit E(uint256[]): 0x20, 0x03, 0x2a, 0x2b, 0x2c -// gas irOptimized: 114375 +// gas irOptimized: 114286 // gas legacy: 116313 // gas legacyOptimized: 114407 diff --git a/test/libsolidity/semanticTests/events/event_dynamic_nested_array_storage_v2.sol b/test/libsolidity/semanticTests/events/event_dynamic_nested_array_storage_v2.sol index abb621e96300..c6f94aad9f0d 100644 --- a/test/libsolidity/semanticTests/events/event_dynamic_nested_array_storage_v2.sol +++ b/test/libsolidity/semanticTests/events/event_dynamic_nested_array_storage_v2.sol @@ -15,6 +15,6 @@ contract C { // ---- // createEvent(uint256): 42 -> // ~ emit E(uint256[][]): 0x20, 0x02, 0x40, 0xa0, 0x02, 0x2a, 0x2b, 0x02, 0x2c, 0x2d -// gas irOptimized: 184839 +// gas irOptimized: 184748 // gas legacy: 187493 // gas legacyOptimized: 184548 diff --git a/test/libsolidity/semanticTests/events/event_indexed_string.sol b/test/libsolidity/semanticTests/events/event_indexed_string.sol index cb4c9c8200ec..b4c02e93de6d 100644 --- a/test/libsolidity/semanticTests/events/event_indexed_string.sol +++ b/test/libsolidity/semanticTests/events/event_indexed_string.sol @@ -17,6 +17,6 @@ contract C { // ---- // deposit() -> // ~ emit E(string,uint256[4]): #0xa7fb06bb999a5eb9aff9e0779953f4e1e4ce58044936c2f51c7fb879b85c08bd, #0xe755d8cc1a8cde16a2a31160dcd8017ac32d7e2f13215b29a23cdae40a78aa81 -// gas irOptimized: 314035 +// gas irOptimized: 311710 // gas legacy: 366022 // gas legacyOptimized: 362429 diff --git a/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol b/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol index fbb7a56f0060..447cfae3c89d 100644 --- a/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol +++ b/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol @@ -75,7 +75,7 @@ contract FixedFeeRegistrar is Registrar { // ---- // constructor() // gas irOptimized: 21029 -// gas irOptimized code: 333400 +// gas irOptimized code: 330400 // gas legacy: 115395 // gas legacy code: 792400 // gas legacyOptimized: 84598 diff --git a/test/libsolidity/semanticTests/externalContracts/base64.sol b/test/libsolidity/semanticTests/externalContracts/base64.sol index 810839ec9cea..deeeb66ce43a 100644 --- a/test/libsolidity/semanticTests/externalContracts/base64.sol +++ b/test/libsolidity/semanticTests/externalContracts/base64.sol @@ -34,7 +34,7 @@ contract test { // ---- // constructor() // gas irOptimized: 21029 -// gas irOptimized code: 331600 +// gas irOptimized code: 319400 // gas legacy: 102214 // gas legacy code: 629800 // gas legacyOptimized: 87926 @@ -54,10 +54,10 @@ contract test { // encode_no_asm(bytes): 0x20, 5, "fooba" -> 0x20, 8, "Zm9vYmE=" // encode_no_asm(bytes): 0x20, 6, "foobar" -> 0x20, 8, "Zm9vYmFy" // encode_inline_asm_large() -// gas irOptimized: 1120982 +// gas irOptimized: 1061982 // gas legacy: 1554038 // gas legacyOptimized: 1132031 // encode_no_asm_large() -// gas irOptimized: 2513013 +// gas irOptimized: 2368013 // gas legacy: 4600082 // gas legacyOptimized: 2813075 diff --git a/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol b/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol index 95024883b27d..a7022b768eb1 100644 --- a/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol +++ b/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol @@ -176,8 +176,8 @@ contract DepositContract is IDepositContract, ERC165 { } // ---- // constructor() -// gas irOptimized: 727457 -// gas irOptimized code: 600200 +// gas irOptimized: 727054 +// gas irOptimized code: 590000 // gas legacy: 920228 // gas legacy code: 1438800 // gas legacyOptimized: 848699 @@ -187,27 +187,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: 107598 +// gas irOptimized: 107248 // gas legacy: 142741 // gas legacyOptimized: 117558 // 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: 107598 +// gas irOptimized: 107248 // gas legacy: 142741 // gas legacyOptimized: 117558 // 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: 107591 +// gas irOptimized: 107245 // gas legacy: 142750 // gas legacyOptimized: 117570 // 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: 107591 +// gas irOptimized: 107245 // gas legacy: 142750 // gas legacyOptimized: 117570 // 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 5a4e6bc7675d..7bce1b6cb976 100644 --- a/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol +++ b/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol @@ -49,7 +49,7 @@ contract test { // ---- // constructor() // gas irOptimized: 21029 -// gas irOptimized code: 1610400 +// gas irOptimized code: 1546600 // gas legacy: 209723 // gas legacy code: 2205000 // gas legacyOptimized: 178012 diff --git a/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol b/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol index 8e6e0222a63b..f1441be9b602 100644 --- a/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol +++ b/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol @@ -49,7 +49,7 @@ contract test { // ---- // constructor() // gas irOptimized: 21029 -// gas irOptimized code: 1507400 +// gas irOptimized code: 1456400 // gas legacy: 195206 // gas legacy code: 1999000 // gas legacyOptimized: 168857 diff --git a/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol b/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol index 4dff60441f04..bc2e37951b51 100644 --- a/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol +++ b/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol @@ -34,7 +34,7 @@ contract test { // ---- // constructor() // gas irOptimized: 21029 -// gas irOptimized code: 412200 +// gas irOptimized code: 359000 // gas legacy: 92110 // gas legacy code: 523600 // gas legacyOptimized: 82667 diff --git a/test/libsolidity/semanticTests/externalContracts/snark.sol b/test/libsolidity/semanticTests/externalContracts/snark.sol index e7c7c974d848..b6e6a24bbd60 100644 --- a/test/libsolidity/semanticTests/externalContracts/snark.sol +++ b/test/libsolidity/semanticTests/externalContracts/snark.sol @@ -292,11 +292,11 @@ contract Test { // f() -> true // g() -> true // pair() -> true -// gas irOptimized: 269685 +// gas irOptimized: 268819 // gas legacy: 293579 // gas legacyOptimized: 276313 // verifyTx() -> true // ~ emit Verified(string): 0x20, 0x16, "Successfully verified." -// gas irOptimized: 794331 +// gas irOptimized: 789885 // gas legacy: 904397 // gas legacyOptimized: 816770 diff --git a/test/libsolidity/semanticTests/externalContracts/strings.sol b/test/libsolidity/semanticTests/externalContracts/strings.sol index 990f63679b8a..cc0ab35c86da 100644 --- a/test/libsolidity/semanticTests/externalContracts/strings.sol +++ b/test/libsolidity/semanticTests/externalContracts/strings.sol @@ -50,7 +50,7 @@ contract test { // ---- // constructor() // gas irOptimized: 21029 -// gas irOptimized code: 528200 +// gas irOptimized code: 509200 // gas legacy: 126346 // gas legacy code: 932600 // gas legacyOptimized: 102639 @@ -72,6 +72,6 @@ contract test { // gas legacy: 31621 // gas legacyOptimized: 27914 // benchmark(string,bytes32): 0x40, 0x0842021, 8, "solidity" -> 0x2020 -// gas irOptimized: 1240977 +// gas irOptimized: 1192539 // gas legacy: 4234020 // gas legacyOptimized: 2318668 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 cfb7ef8b8062..98646dfc00ca 100644 --- a/test/libsolidity/semanticTests/functionCall/creation_function_call_with_args.sol +++ b/test/libsolidity/semanticTests/functionCall/creation_function_call_with_args.sol @@ -15,8 +15,8 @@ contract D { } // ---- // constructor(): 2 -> -// gas irOptimized: 97736 -// gas irOptimized code: 58200 +// gas irOptimized: 97733 +// gas irOptimized code: 57000 // gas legacy: 145569 // gas legacy code: 95600 // gas legacyOptimized: 138297 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 88f6f34740e3..b3ef564a0321 100644 --- a/test/libsolidity/semanticTests/functionCall/creation_function_call_with_salt.sol +++ b/test/libsolidity/semanticTests/functionCall/creation_function_call_with_salt.sol @@ -17,8 +17,8 @@ contract D { // EVMVersion: >=constantinople // ---- // constructor(): 2 -> -// gas irOptimized: 97742 -// gas irOptimized code: 58200 +// gas irOptimized: 97739 +// gas irOptimized code: 57000 // gas legacy: 145935 // gas legacy code: 95600 // gas legacyOptimized: 138529 diff --git a/test/libsolidity/semanticTests/functionCall/failed_create.sol b/test/libsolidity/semanticTests/functionCall/failed_create.sol index c1351f757018..ed4689a7efd7 100644 --- a/test/libsolidity/semanticTests/functionCall/failed_create.sol +++ b/test/libsolidity/semanticTests/functionCall/failed_create.sol @@ -18,7 +18,7 @@ contract C { // ---- // constructor(), 20 wei // gas irOptimized: 21023 -// gas irOptimized code: 84800 +// gas irOptimized code: 83800 // gas legacy: 64468 // gas legacy code: 145400 // gas legacyOptimized: 60443 diff --git a/test/libsolidity/semanticTests/functionCall/mapping_array_internal_argument.sol b/test/libsolidity/semanticTests/functionCall/mapping_array_internal_argument.sol index 336450d77a25..27424b1ab3bb 100644 --- a/test/libsolidity/semanticTests/functionCall/mapping_array_internal_argument.sol +++ b/test/libsolidity/semanticTests/functionCall/mapping_array_internal_argument.sol @@ -18,7 +18,7 @@ contract test { } // ---- // set(uint8,uint8,uint8,uint8,uint8): 1, 21, 22, 42, 43 -> 0, 0, 0, 0 -// gas irOptimized: 111695 +// gas irOptimized: 111593 // gas legacy: 113742 // gas legacyOptimized: 111768 // get(uint8): 1 -> 21, 22, 42, 43 diff --git a/test/libsolidity/semanticTests/immutable/immutable_tag_too_large_bug.sol b/test/libsolidity/semanticTests/immutable/immutable_tag_too_large_bug.sol index 2b06677903a9..ec5af8097773 100644 --- a/test/libsolidity/semanticTests/immutable/immutable_tag_too_large_bug.sol +++ b/test/libsolidity/semanticTests/immutable/immutable_tag_too_large_bug.sol @@ -41,8 +41,8 @@ contract C { // compileViaYul: true // ---- // constructor() -> -// gas irOptimized: 21271 -// gas irOptimized code: 172200 +// gas irOptimized: 21242 +// gas irOptimized code: 167200 // gas legacy: 83499 // gas legacy code: 408800 // f() -> -1, 1 diff --git a/test/libsolidity/semanticTests/immutable/multi_creation.sol b/test/libsolidity/semanticTests/immutable/multi_creation.sol index 9abcda0a9940..955ec3e260ae 100644 --- a/test/libsolidity/semanticTests/immutable/multi_creation.sol +++ b/test/libsolidity/semanticTests/immutable/multi_creation.sol @@ -29,8 +29,8 @@ contract C { // EVMVersion: >=constantinople // ---- // f() -> 3, 7, 5 -// gas irOptimized: 86316 -// gas irOptimized code: 44400 +// gas irOptimized: 86302 +// gas irOptimized code: 43200 // gas legacy: 87839 // gas legacy code: 60800 // gas legacyOptimized: 86870 diff --git a/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol b/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol index 848f94ee190e..5854cf99fe43 100644 --- a/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol +++ b/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol @@ -22,8 +22,8 @@ contract B { } // ---- // g() -> 42 -// gas irOptimized: 54445 -// gas irOptimized code: 49200 +// gas irOptimized: 54412 +// gas irOptimized code: 48000 // gas legacy: 56839 // gas legacy code: 123600 // gas legacyOptimized: 55001 diff --git a/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol b/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol index db2e33b4215d..52dd40f67e90 100644 --- a/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol +++ b/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol @@ -39,8 +39,8 @@ contract Main { } // ---- // constructor(), 22 wei -> -// gas irOptimized: 97641 -// gas irOptimized code: 117000 +// gas irOptimized: 97626 +// gas irOptimized code: 116400 // gas legacy: 156599 // gas legacy code: 236400 // gas legacyOptimized: 143592 diff --git a/test/libsolidity/semanticTests/inlineAssembly/transient_storage_low_level_calls.sol b/test/libsolidity/semanticTests/inlineAssembly/transient_storage_low_level_calls.sol index f6d3ca1c5c18..28b2c8718c8b 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/transient_storage_low_level_calls.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/transient_storage_low_level_calls.sol @@ -68,8 +68,8 @@ contract C { // testCall() -> true // tloadAllowedStaticCall() -> true // tstoreNotAllowedStaticCall() -> true -// gas irOptimized: 98416342 -// gas irOptimized code: 22400 +// gas irOptimized: 98416932 +// gas irOptimized code: 21800 // gas legacy: 98409087 // gas legacy code: 30000 // gas legacyOptimized: 98420962 diff --git a/test/libsolidity/semanticTests/libraries/internal_types_in_library.sol b/test/libsolidity/semanticTests/libraries/internal_types_in_library.sol index d18a9f316a2c..63b01cd1825b 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: 113374 +// gas irOptimized: 112502 // gas legacy: 132930 // gas legacyOptimized: 118020 diff --git a/test/libsolidity/semanticTests/libraries/using_library_mappings_return.sol b/test/libsolidity/semanticTests/libraries/using_library_mappings_return.sol index f6452f5f5a66..06adc64f07c2 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: 119786 +// gas irOptimized: 119770 // gas legacy: 125087 // gas legacyOptimized: 120120 diff --git a/test/libsolidity/semanticTests/operators/userDefined/operator_making_pure_external_call.sol b/test/libsolidity/semanticTests/operators/userDefined/operator_making_pure_external_call.sol index bd8f957b0806..a317022065c4 100644 --- a/test/libsolidity/semanticTests/operators/userDefined/operator_making_pure_external_call.sol +++ b/test/libsolidity/semanticTests/operators/userDefined/operator_making_pure_external_call.sol @@ -54,15 +54,15 @@ contract C { // EVMVersion: >=constantinople // ---- // testMul(int32,int32): 42, 10 -> 420 -// gas irOptimized: 54336 -// gas irOptimized code: 48600 +// gas irOptimized: 54302 +// gas irOptimized code: 47600 // gas legacy: 57117 // gas legacy code: 127000 // gas legacyOptimized: 55246 // gas legacyOptimized code: 68400 // testInc(int32): 42 -> 43 -// gas irOptimized: 54160 -// gas irOptimized code: 48600 +// gas irOptimized: 54142 +// gas irOptimized code: 47600 // gas legacy: 56378 // gas legacy code: 127000 // gas legacyOptimized: 54943 diff --git a/test/libsolidity/semanticTests/operators/userDefined/operator_making_view_external_call.sol b/test/libsolidity/semanticTests/operators/userDefined/operator_making_view_external_call.sol index 9882dfe24c5c..d65f8be3e5db 100644 --- a/test/libsolidity/semanticTests/operators/userDefined/operator_making_view_external_call.sol +++ b/test/libsolidity/semanticTests/operators/userDefined/operator_making_view_external_call.sol @@ -60,15 +60,15 @@ contract C { // EVMVersion: >=constantinople // ---- // testMul(int32,int32): 42, 10 -> 420 -// gas irOptimized: 54336 -// gas irOptimized code: 48600 +// gas irOptimized: 54302 +// gas irOptimized code: 47600 // gas legacy: 57117 // gas legacy code: 127000 // gas legacyOptimized: 55246 // gas legacyOptimized code: 68400 // testInc(int32): 42 -> 43 -// gas irOptimized: 54160 -// gas irOptimized code: 48600 +// gas irOptimized: 54142 +// gas irOptimized code: 47600 // gas legacy: 56378 // gas legacy code: 127000 // gas legacyOptimized: 54943 diff --git a/test/libsolidity/semanticTests/saltedCreate/eof/salted_create_with_value.sol b/test/libsolidity/semanticTests/saltedCreate/eof/salted_create_with_value.sol index aae3976ddfc2..98b0dc3402cc 100644 --- a/test/libsolidity/semanticTests/saltedCreate/eof/salted_create_with_value.sol +++ b/test/libsolidity/semanticTests/saltedCreate/eof/salted_create_with_value.sol @@ -21,5 +21,5 @@ contract A { // bytecodeFormat: >=EOFv1 // ---- // f(), 10 ether -> 3007, 3008, 3009 -// gas irOptimized: 185971 -// gas irOptimized code: 87600 +// gas irOptimized: 185950 +// gas irOptimized code: 85800 diff --git a/test/libsolidity/semanticTests/storage/empty_nonempty_empty.sol b/test/libsolidity/semanticTests/storage/empty_nonempty_empty.sol index 88fb6017c54f..3374acea5117 100644 --- a/test/libsolidity/semanticTests/storage/empty_nonempty_empty.sol +++ b/test/libsolidity/semanticTests/storage/empty_nonempty_empty.sol @@ -22,7 +22,7 @@ contract Test { // set(bytes): 0x20, 0 // storageEmpty -> 1 // set(bytes): 0x20, 66, "12345678901234567890123456789012", "12345678901234567890123456789012", "12" -// gas irOptimized: 111633 +// gas irOptimized: 111616 // gas legacy: 112734 // gas legacyOptimized: 112084 // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol b/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol index c8b49be7d78a..5835e1801965 100644 --- a/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol +++ b/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol @@ -42,6 +42,6 @@ contract C { } // ---- // test() -> true -// gas irOptimized: 132381 +// gas irOptimized: 132357 // gas legacy: 136010 // gas legacyOptimized: 133478 diff --git a/test/libsolidity/semanticTests/storageLayoutSpecifier/delete.sol b/test/libsolidity/semanticTests/storageLayoutSpecifier/delete.sol index d0f86d6de3f0..27af89d92568 100644 --- a/test/libsolidity/semanticTests/storageLayoutSpecifier/delete.sol +++ b/test/libsolidity/semanticTests/storageLayoutSpecifier/delete.sol @@ -19,7 +19,7 @@ contract C layout at 42 { } // ---- // fillArray() -> 3 -// gas irOptimized: 110909 +// gas irOptimized: 110900 // gas legacy: 110730 // gas legacyOptimized: 110307 // arrayLength() -> 3 diff --git a/test/libsolidity/semanticTests/storageLayoutSpecifier/dynamic_array_storage_end.sol b/test/libsolidity/semanticTests/storageLayoutSpecifier/dynamic_array_storage_end.sol index bfc7fde87fea..70dda7eb3107 100644 --- a/test/libsolidity/semanticTests/storageLayoutSpecifier/dynamic_array_storage_end.sol +++ b/test/libsolidity/semanticTests/storageLayoutSpecifier/dynamic_array_storage_end.sol @@ -16,14 +16,14 @@ contract C layout at 2**256 - 2 { } // ---- // init() -> -// gas irOptimized: 22672090 +// gas irOptimized: 22669090 // gas legacy: 22699167 // gas legacyOptimized: 22541160 // validate() -> -// gas irOptimized: 2384180 +// gas irOptimized: 2378180 // gas legacy: 2560245 // gas legacyOptimized: 2442238 // clear() -> -// gas irOptimized: 4406374 +// gas irOptimized: 4401574 // gas legacy: 4300019 // gas legacyOptimized: 4302413 diff --git a/test/libsolidity/semanticTests/storageLayoutSpecifier/mapping_storage_end.sol b/test/libsolidity/semanticTests/storageLayoutSpecifier/mapping_storage_end.sol index 4f6321903072..6f46e6053341 100644 --- a/test/libsolidity/semanticTests/storageLayoutSpecifier/mapping_storage_end.sol +++ b/test/libsolidity/semanticTests/storageLayoutSpecifier/mapping_storage_end.sol @@ -17,6 +17,6 @@ contract C layout at 2**256 - 2 { // gas legacy: 22447245 // gas legacyOptimized: 22310238 // validate() -> -// gas irOptimized: 2247167 +// gas irOptimized: 2241167 // gas legacy: 2456223 // gas legacyOptimized: 2327216 diff --git a/test/libsolidity/semanticTests/storageLayoutSpecifier/multiple_inheritance.sol b/test/libsolidity/semanticTests/storageLayoutSpecifier/multiple_inheritance.sol index 65a06d80031d..02d2c3f0f898 100644 --- a/test/libsolidity/semanticTests/storageLayoutSpecifier/multiple_inheritance.sol +++ b/test/libsolidity/semanticTests/storageLayoutSpecifier/multiple_inheritance.sol @@ -31,7 +31,7 @@ contract D is A, B, C layout at 42 { } // ---- // test() -> 1, 2, 3, 5 -// gas irOptimized: 110060 +// gas irOptimized: 110056 // gas legacy: 111881 // gas legacyOptimized: 110945 // x() -> 1 diff --git a/test/libsolidity/semanticTests/storageLayoutSpecifier/state_variable_dynamic_array.sol b/test/libsolidity/semanticTests/storageLayoutSpecifier/state_variable_dynamic_array.sol index 780a25ca3bc8..b830d3a8c222 100644 --- a/test/libsolidity/semanticTests/storageLayoutSpecifier/state_variable_dynamic_array.sol +++ b/test/libsolidity/semanticTests/storageLayoutSpecifier/state_variable_dynamic_array.sol @@ -34,14 +34,14 @@ contract C is A layout at 42 { } // ---- // initA() -> 1, 2, 3 -// gas irOptimized: 111779 +// gas irOptimized: 111770 // gas legacy: 111679 // gas legacyOptimized: 111150 // arrayA(uint256): 0 -> 1 // arrayALength() -> 3 // arrayCLength() -> 0 // initCFromAInReverse() -> 3, 2, 1 -// gas irOptimized: 121101 +// gas irOptimized: 121075 // gas legacy: 121213 // gas legacyOptimized: 120843 // clearA() -> diff --git a/test/libsolidity/semanticTests/storageLayoutSpecifier/state_variable_mapping.sol b/test/libsolidity/semanticTests/storageLayoutSpecifier/state_variable_mapping.sol index d1a0d2c6f196..0af0738be55d 100644 --- a/test/libsolidity/semanticTests/storageLayoutSpecifier/state_variable_mapping.sol +++ b/test/libsolidity/semanticTests/storageLayoutSpecifier/state_variable_mapping.sol @@ -25,7 +25,7 @@ contract C layout at 42 is A { } // ---- // setup() -> -// gas irOptimized: 159171 +// gas irOptimized: 159147 // gas legacy: 161738 // gas legacyOptimized: 160222 // open(uint256): 3 -> 0x20, 5, "Empty" diff --git a/test/libsolidity/semanticTests/storageLayoutSpecifier/storage_reference_array.sol b/test/libsolidity/semanticTests/storageLayoutSpecifier/storage_reference_array.sol index 3382455a526b..16a442f0bff8 100644 --- a/test/libsolidity/semanticTests/storageLayoutSpecifier/storage_reference_array.sol +++ b/test/libsolidity/semanticTests/storageLayoutSpecifier/storage_reference_array.sol @@ -14,7 +14,7 @@ contract C layout at 42 { } // ---- // initUsingReference() -> -// gas irOptimized: 272337 +// gas irOptimized: 272247 // gas legacy: 274795 // gas legacyOptimized: 271954 // array(uint256): 0 -> 1 diff --git a/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_nested_array_to_storage.sol b/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_nested_array_to_storage.sol index 358159f57de2..1fc3a903f31e 100644 --- a/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_nested_array_to_storage.sol +++ b/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_nested_array_to_storage.sol @@ -16,6 +16,6 @@ contract C { } // ---- // f(uint32,(uint128,uint256[][2],uint32)): 55, 0x40, 77, 0x60, 88, 0x40, 0x40, 2, 1, 2 -> 55, 77, 1, 2, 88 -// gas irOptimized: 202362 +// gas irOptimized: 202285 // gas legacy: 207376 // gas legacyOptimized: 203583 diff --git a/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol b/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol index 019f5e4fd4a7..8e5055b1a711 100644 --- a/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol +++ b/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol @@ -23,6 +23,6 @@ contract CopyTest { } // ---- // run() -> 2, 23, 42 -// gas irOptimized: 187527 +// gas irOptimized: 186696 // gas legacy: 185730 // gas legacyOptimized: 184457 diff --git a/test/libsolidity/semanticTests/structs/copy_from_mapping.sol b/test/libsolidity/semanticTests/structs/copy_from_mapping.sol index c97c15eaf2da..d5cd07d7b018 100644 --- a/test/libsolidity/semanticTests/structs/copy_from_mapping.sol +++ b/test/libsolidity/semanticTests/structs/copy_from_mapping.sol @@ -36,7 +36,7 @@ contract C { } // ---- // to_state() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 120675 +// gas irOptimized: 120625 // gas legacy: 122977 // gas legacyOptimized: 121652 // to_storage() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 diff --git a/test/libsolidity/semanticTests/structs/copy_struct_array_from_storage.sol b/test/libsolidity/semanticTests/structs/copy_struct_array_from_storage.sol index 6803796e511f..0d10d9b1384e 100644 --- a/test/libsolidity/semanticTests/structs/copy_struct_array_from_storage.sol +++ b/test/libsolidity/semanticTests/structs/copy_struct_array_from_storage.sol @@ -87,7 +87,7 @@ contract Test { // EVMVersion: >homestead // ---- // test1() -> true -// gas irOptimized: 152701 +// gas irOptimized: 152628 // gas legacy: 153010 // gas legacyOptimized: 152636 // test2() -> true diff --git a/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol b/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol index 6c9cec1f9f1f..37e7ee4d7503 100644 --- a/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol +++ b/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol @@ -44,7 +44,7 @@ contract C { } // ---- // to_state() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 120810 +// gas irOptimized: 120764 // gas legacy: 123114 // gas legacyOptimized: 121659 // to_storage() -> 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 4ede11f4c9a2..a3ccd90b36ee 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: 121860 +// gas irOptimized: 121800 // gas legacy: 130131 // gas legacyOptimized: 128648 // from_state() -> 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 120905 +// gas irOptimized: 120864 // gas legacy: 123190 // gas legacyOptimized: 121758 // 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: 114169 +// gas irOptimized: 114108 // gas legacy: 122423 // gas legacyOptimized: 120698 diff --git a/test/libsolidity/semanticTests/structs/copy_to_mapping.sol b/test/libsolidity/semanticTests/structs/copy_to_mapping.sol index 5fab2b983eb5..7bdddabdf21f 100644 --- a/test/libsolidity/semanticTests/structs/copy_to_mapping.sol +++ b/test/libsolidity/semanticTests/structs/copy_to_mapping.sol @@ -45,18 +45,18 @@ contract C { } // ---- // from_state() -> 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 120836 +// gas irOptimized: 120789 // gas legacy: 123051 // gas legacyOptimized: 121704 // from_storage() -> 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 120862 +// gas irOptimized: 120815 // gas legacy: 123109 // gas legacyOptimized: 121756 // from_memory() -> 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 121756 +// gas irOptimized: 121696 // gas legacy: 129996 // gas legacyOptimized: 128644 // 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: 114059 +// gas irOptimized: 113998 // gas legacy: 118207 // gas legacyOptimized: 115327 diff --git a/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol b/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol index f4afd114b749..8ae9771da181 100644 --- a/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol +++ b/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol @@ -66,7 +66,7 @@ contract Test { } // ---- // load() -> 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 -// gas irOptimized: 110961 +// gas irOptimized: 110901 // gas legacy: 112959 // gas legacyOptimized: 110876 // store() -> 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 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 fd72217e6fd8..00d9d0b5e7ca 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,7 +23,7 @@ contract c { // ---- // storageEmpty -> 1 // set(uint256,bytes,uint256): 12, 0x60, 13, 33, "12345678901234567890123456789012", "3" -> true -// gas irOptimized: 133330 +// gas irOptimized: 133320 // gas legacy: 134624 // gas legacyOptimized: 133856 // test(uint256): 32 -> "3" @@ -31,7 +31,7 @@ contract c { // copy() -> true // storageEmpty -> 1 // set(uint256,bytes,uint256): 12, 0x60, 13, 33, "12345678901234567890123456789012", "3" -> true -// gas irOptimized: 133330 +// gas irOptimized: 133320 // gas legacy: 134624 // gas legacyOptimized: 133856 // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/structs/struct_copy.sol b/test/libsolidity/semanticTests/structs/struct_copy.sol index 89baa779aaa9..cf8a12684ffd 100644 --- a/test/libsolidity/semanticTests/structs/struct_copy.sol +++ b/test/libsolidity/semanticTests/structs/struct_copy.sol @@ -40,7 +40,7 @@ contract c { // gas legacyOptimized: 110003 // retrieve(uint256): 7 -> 1, 3, 4, 2 // copy(uint256,uint256): 7, 8 -> true -// gas irOptimized: 118509 +// gas irOptimized: 118503 // gas legacy: 119144 // gas legacyOptimized: 118618 // retrieve(uint256): 7 -> 1, 3, 4, 2 diff --git a/test/libsolidity/semanticTests/structs/struct_copy_via_local.sol b/test/libsolidity/semanticTests/structs/struct_copy_via_local.sol index 18166929c495..8670a27dab9a 100644 --- a/test/libsolidity/semanticTests/structs/struct_copy_via_local.sol +++ b/test/libsolidity/semanticTests/structs/struct_copy_via_local.sol @@ -17,6 +17,6 @@ contract c { } // ---- // test() -> true -// gas irOptimized: 109879 +// gas irOptimized: 109874 // gas legacy: 110615 // gas legacyOptimized: 109705 diff --git a/test/libsolidity/semanticTests/structs/struct_delete_storage_with_array.sol b/test/libsolidity/semanticTests/structs/struct_delete_storage_with_array.sol index 88854b3ae6aa..827a802db837 100644 --- a/test/libsolidity/semanticTests/structs/struct_delete_storage_with_array.sol +++ b/test/libsolidity/semanticTests/structs/struct_delete_storage_with_array.sol @@ -42,10 +42,10 @@ contract C { } // ---- // f() -> -// gas irOptimized: 113328 +// gas irOptimized: 113257 // gas legacy: 113591 // gas legacyOptimized: 113098 // g() -> -// gas irOptimized: 118820 +// gas irOptimized: 118755 // gas legacy: 118764 // gas legacyOptimized: 118168 diff --git a/test/libsolidity/semanticTests/structs/struct_memory_to_storage_function_ptr.sol b/test/libsolidity/semanticTests/structs/struct_memory_to_storage_function_ptr.sol index 6a6431566c13..d4266a2c10f8 100644 --- a/test/libsolidity/semanticTests/structs/struct_memory_to_storage_function_ptr.sol +++ b/test/libsolidity/semanticTests/structs/struct_memory_to_storage_function_ptr.sol @@ -28,6 +28,6 @@ contract C { } // ---- // f() -> 42, 23, 34, 42, 42 -// gas irOptimized: 110582 +// gas irOptimized: 110568 // gas legacy: 111990 // gas legacyOptimized: 110546 diff --git a/test/libsolidity/semanticTests/types/mapping/copy_from_mapping_to_mapping.sol b/test/libsolidity/semanticTests/types/mapping/copy_from_mapping_to_mapping.sol index f1e725122579..d09eee959f3f 100644 --- a/test/libsolidity/semanticTests/types/mapping/copy_from_mapping_to_mapping.sol +++ b/test/libsolidity/semanticTests/types/mapping/copy_from_mapping_to_mapping.sol @@ -29,6 +29,6 @@ contract C { } // ---- // f() -> 0x20, 7, 8, 9, 0xa0, 13, 2, 0x40, 0xa0, 2, 3, 4, 2, 3, 4 -// gas irOptimized: 195816 +// gas irOptimized: 195732 // gas legacy: 199887 // gas legacyOptimized: 196845 diff --git a/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol b/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol index 290dd6472694..08e5148d3972 100644 --- a/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol +++ b/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol @@ -114,7 +114,7 @@ contract ERC20 { // constructor() // ~ emit Transfer(address,address,uint256): #0x00, #0x1212121212121212121212121212120000000012, 0x14 // gas irOptimized: 67205 -// gas irOptimized code: 257000 +// gas irOptimized code: 252800 // gas legacy: 163350 // gas legacy code: 671400 // gas legacyOptimized: 127464 diff --git a/test/libsolidity/semanticTests/various/destructuring_assignment.sol b/test/libsolidity/semanticTests/various/destructuring_assignment.sol index b0cd5f12629b..a2ca1e9db0c9 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: 241176 +// gas irOptimized: 240994 // gas legacy: 243281 // gas legacyOptimized: 242392 diff --git a/test/libsolidity/semanticTests/various/different_call_type_transient.sol b/test/libsolidity/semanticTests/various/different_call_type_transient.sol index 120fd3ded2f7..8b016310a814 100644 --- a/test/libsolidity/semanticTests/various/different_call_type_transient.sol +++ b/test/libsolidity/semanticTests/various/different_call_type_transient.sol @@ -46,6 +46,6 @@ contract Test { // testDelegate() -> 7, 0 // testCall() -> 0, 8 // testStatic() -> false -// gas irOptimized: 96900601 +// gas irOptimized: 96900598 // gas legacy: 96901136 // gas legacyOptimized: 96900725 diff --git a/test/libsolidity/semanticTests/various/eof/create_calldata.sol b/test/libsolidity/semanticTests/various/eof/create_calldata.sol index 02b6938a8da4..e054969e3f0e 100644 --- a/test/libsolidity/semanticTests/various/eof/create_calldata.sol +++ b/test/libsolidity/semanticTests/various/eof/create_calldata.sol @@ -18,6 +18,6 @@ contract C { // bytecodeFormat: >=EOFv1 // ---- // constructor(): 42, 0x20, 0xc0, 1, 2, 3, 4, 5, 6 -> -// gas irOptimized: 250627 -// gas irOptimized code: 68600 +// gas irOptimized: 250512 +// gas irOptimized code: 67200 // s() -> 0x20, 0x0120, 42, 0x20, 0xc0, 1, 2, 3, 4, 5, 6 diff --git a/test/libsolidity/semanticTests/various/erc20.sol b/test/libsolidity/semanticTests/various/erc20.sol index eff08bfa1fab..4c2835302b74 100644 --- a/test/libsolidity/semanticTests/various/erc20.sol +++ b/test/libsolidity/semanticTests/various/erc20.sol @@ -97,7 +97,7 @@ contract ERC20 { // constructor() // ~ emit Transfer(address,address,uint256): #0x00, #0x1212121212121212121212121212120000000012, 0x14 // gas irOptimized: 67221 -// gas irOptimized code: 250200 +// gas irOptimized code: 246000 // gas legacy: 159957 // gas legacy code: 647600 // gas legacyOptimized: 126934 diff --git a/test/libsolidity/semanticTests/various/senders_balance.sol b/test/libsolidity/semanticTests/various/senders_balance.sol index a549e9e916ef..4dedff92f706 100644 --- a/test/libsolidity/semanticTests/various/senders_balance.sol +++ b/test/libsolidity/semanticTests/various/senders_balance.sol @@ -16,8 +16,8 @@ contract D { } // ---- // constructor(), 27 wei -> -// gas irOptimized: 75254 -// gas irOptimized code: 58200 +// gas irOptimized: 75251 +// gas irOptimized code: 57000 // gas legacy: 117834 // gas legacy code: 100600 // gas legacyOptimized: 113676 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 af3081da51d7..71d463d7b77a 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: 177785 +// gas irOptimized: 177764 // gas legacy: 180653 // gas legacyOptimized: 179144 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 1755e6b5522a..f8466debe133 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: 112566 +// gas irOptimized: 112515 // gas legacy: 112888 // gas legacyOptimized: 112580 From 1c5ce16fdf24ec69ad43a9f8067c9a7535691916 Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Tue, 11 Mar 2025 05:35:12 +0100 Subject: [PATCH 5/5] Bring back ConstantOptimizer without codecopy method. This, of course, comes with runtime gas cost regressions. --- libevmasm/Assembly.cpp | 2 +- libevmasm/ConstantOptimiser.cpp | 3 ++- .../semanticTests/abiEncoderV2/abi_encode_v2.sol | 2 +- .../array/copying/array_copy_different_packing.sol | 2 +- .../semanticTests/array/copying/array_copy_nested_array.sol | 2 +- .../copying/array_copy_storage_storage_different_base.sol | 2 +- .../array_copy_storage_storage_different_base_nested.sol | 2 +- .../array/copying/array_copy_storage_storage_dyn_dyn.sol | 2 +- .../copying/array_copy_storage_storage_dynamic_dynamic.sol | 2 +- .../array/copying/array_copy_storage_to_memory_nested.sol | 2 +- .../array/copying/array_copy_target_simple.sol | 2 +- .../array/copying/array_elements_to_mapping.sol | 2 +- .../array/copying/array_nested_calldata_to_storage.sol | 4 ++-- .../array/copying/array_nested_memory_to_storage.sol | 2 +- ...rray_of_function_external_storage_to_storage_dynamic.sol | 2 +- ...rnal_storage_to_storage_dynamic_different_mutability.sol | 2 +- .../array/copying/array_of_struct_calldata_to_storage.sol | 2 +- .../array/copying/array_of_struct_memory_to_storage.sol | 2 +- ...ray_of_structs_containing_arrays_calldata_to_storage.sol | 2 +- ...array_of_structs_containing_arrays_memory_to_storage.sol | 2 +- .../array/copying/calldata_array_to_mapping.sol | 2 +- .../array/copying/copy_byte_array_in_struct_to_storage.sol | 4 ++-- .../array/copying/copy_byte_array_to_storage.sol | 2 +- .../array/copying/copy_function_internal_storage_array.sol | 2 +- ...ments_of_nested_array_of_structs_calldata_to_storage.sol | 6 +++--- ...lements_of_nested_array_of_structs_memory_to_storage.sol | 6 +++--- .../array/copying/memory_dyn_2d_bytes_to_storage.sol | 2 +- .../copying/nested_array_of_structs_calldata_to_storage.sol | 4 ++-- .../copying/nested_array_of_structs_memory_to_storage.sol | 4 ++-- .../copying/nested_array_of_structs_storage_to_storage.sol | 2 +- .../semanticTests/array/copying/storage_memory_nested.sol | 2 +- .../array/copying/storage_memory_nested_bytes.sol | 2 +- .../array/copying/storage_memory_nested_from_pointer.sol | 2 +- .../array/copying/storage_memory_nested_struct.sol | 2 +- .../semanticTests/array/dynamic_arrays_in_storage.sol | 2 +- .../semanticTests/array/dynamic_multi_array_cleanup.sol | 2 +- .../semanticTests/array/nested_calldata_storage2.sol | 2 +- .../pop/byte_array_pop_long_storage_empty_garbage_ref.sol | 2 +- test/libsolidity/semanticTests/array/push/array_push.sol | 2 +- .../array/push/array_push_nested_from_calldata.sol | 2 +- .../semanticTests/array/push/array_push_struct.sol | 2 +- .../array/push/array_push_struct_from_calldata.sol | 2 +- .../semanticTests/array/push/nested_bytes_push.sol | 2 +- .../events/event_dynamic_nested_array_storage_v2.sol | 2 +- .../semanticTests/externalContracts/FixedFeeRegistrar.sol | 2 +- test/libsolidity/semanticTests/externalContracts/base64.sol | 6 +++--- .../semanticTests/externalContracts/deposit_contract.sol | 2 +- .../semanticTests/externalContracts/prbmath_signed.sol | 2 +- .../semanticTests/externalContracts/prbmath_unsigned.sol | 2 +- .../semanticTests/externalContracts/ramanujan_pi.sol | 2 +- test/libsolidity/semanticTests/externalContracts/snark.sol | 2 +- .../libsolidity/semanticTests/externalContracts/strings.sol | 4 ++-- .../semanticTests/inheritance/value_for_constructor.sol | 2 +- .../semanticTests/libraries/internal_types_in_library.sol | 2 +- .../semanticTests/storageLayoutSpecifier/delete.sol | 2 +- .../storageLayoutSpecifier/state_variable_dynamic_array.sol | 4 ++-- .../storageLayoutSpecifier/state_variable_mapping.sol | 2 +- .../calldata_struct_with_nested_array_to_storage.sol | 2 +- .../structs/struct_delete_storage_with_array.sol | 2 +- .../semanticTests/userDefinedValueType/erc20.sol | 2 +- test/libsolidity/semanticTests/various/erc20.sol | 2 +- .../various/skip_dynamic_types_for_structs.sol | 2 +- .../semanticTests/viaYul/copy_struct_invalid_ir_bug.sol | 2 +- 63 files changed, 76 insertions(+), 75 deletions(-) diff --git a/libevmasm/Assembly.cpp b/libevmasm/Assembly.cpp index 87f3523231f3..a4479f4cbb70 100644 --- a/libevmasm/Assembly.cpp +++ b/libevmasm/Assembly.cpp @@ -941,7 +941,7 @@ std::map const& Assembly::optimiseInternal( } // TODO: investigate for EOF - if (_settings.runConstantOptimiser && !m_eofVersion.has_value()) + if (_settings.runConstantOptimiser) ConstantOptimisationMethod::optimiseConstants( isCreation(), isCreation() ? 1 : _settings.expectedExecutionsPerDeployment, diff --git a/libevmasm/ConstantOptimiser.cpp b/libevmasm/ConstantOptimiser.cpp index 7cf00fc9ed41..1a5baa2f05b7 100644 --- a/libevmasm/ConstantOptimiser.cpp +++ b/libevmasm/ConstantOptimiser.cpp @@ -62,7 +62,8 @@ unsigned ConstantOptimisationMethod::optimiseConstants( ComputeMethod compute(params, item.data()); bigint computeGas = compute.gasNeeded(); AssemblyItems replacement; - if (copyGas < literalGas && copyGas < computeGas) + // TODO: Prevents choosing codecopy for EOF. Could be brought back using data section. + if (!_assembly.eofVersion().has_value() && copyGas < literalGas && copyGas < computeGas) { replacement = copy.execute(_assembly); optimisations++; diff --git a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol index 0c4758b6df40..b106c1b49975 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol @@ -50,6 +50,6 @@ contract C { // f2() -> 0x20, 0xa0, 0x1, 0x60, 0x2, 0x3, "abc" // f3() -> 0x20, 0xa0, 0x1, 0x60, 0x2, 0x3, "abc" // f4() -> 0x20, 0x160, 0x1, 0x80, 0xc0, 0x2, 0x3, "abc", 0x7, 0x40, 0x2, 0x2, 0x3 -// gas irOptimized: 111579 +// gas irOptimized: 111603 // gas legacy: 113890 // gas legacyOptimized: 111658 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 0d74ca383b64..c029dd24dd5f 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: 207454 +// gas irOptimized: 207574 // gas legacy: 220711 // gas legacyOptimized: 220097 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 463502daa07b..658ec8b449d9 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: 687530 +// gas irOptimized: 687548 // gas legacy: 686176 // gas legacyOptimized: 685611 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 a7d343c857cc..13a61b1dcfc0 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: 205274 +// gas irOptimized: 205316 // gas legacy: 213863 // gas legacyOptimized: 212901 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 9150157c9029..4eae04dda1e4 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: 169677 +// gas irOptimized: 169737 // gas legacy: 175415 // gas legacyOptimized: 172533 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dyn_dyn.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dyn_dyn.sol index af1d7b78f5e5..b65f12f2fbd4 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dyn_dyn.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dyn_dyn.sol @@ -15,7 +15,7 @@ contract c { // ---- // setData1(uint256,uint256,uint256): 10, 5, 4 -> // copyStorageStorage() -> -// gas irOptimized: 111115 +// gas irOptimized: 111121 // gas legacy: 109272 // gas legacyOptimized: 109262 // getData2(uint256): 5 -> 10, 4 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dynamic_dynamic.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dynamic_dynamic.sol index 8b8ae2f1276b..2d3f5791db26 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dynamic_dynamic.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dynamic_dynamic.sol @@ -17,6 +17,6 @@ contract c { } // ---- // test() -> 5, 4 -// gas irOptimized: 253270 +// gas irOptimized: 253312 // gas legacy: 250892 // gas legacyOptimized: 250045 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_to_memory_nested.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_to_memory_nested.sol index 32e8fc074606..d7782c58a770 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_to_memory_nested.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_to_memory_nested.sol @@ -15,6 +15,6 @@ contract C { } // ---- // f() -> 0x20, 2, 0x40, 0xa0, 2, 0, 1, 2, 2, 3 -// gas irOptimized: 161093 +// gas irOptimized: 161117 // gas legacy: 162200 // gas legacyOptimized: 159953 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 bb3c738d9e3e..9a2546e22555 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: 272988 +// gas irOptimized: 273084 // gas legacy: 282601 // gas legacyOptimized: 281510 diff --git a/test/libsolidity/semanticTests/array/copying/array_elements_to_mapping.sol b/test/libsolidity/semanticTests/array/copying/array_elements_to_mapping.sol index 783337a0f13a..0185b78e5c50 100644 --- a/test/libsolidity/semanticTests/array/copying/array_elements_to_mapping.sol +++ b/test/libsolidity/semanticTests/array/copying/array_elements_to_mapping.sol @@ -52,7 +52,7 @@ contract C { } // ---- // from_storage() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 -// gas irOptimized: 148207 +// gas irOptimized: 148213 // gas legacy: 150737 // gas legacyOptimized: 148690 // from_storage_ptr() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 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 1a7538cae1bc..f3f9bacd9fbf 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 @@ -38,10 +38,10 @@ contract c { // compileViaYul: true // ---- // test1(uint256[][]): 0x20, 2, 0x40, 0x40, 2, 23, 42 -> 2, 65 -// gas irOptimized: 180175 +// gas irOptimized: 180181 // test2(uint256[][2]): 0x20, 0x40, 0x40, 2, 23, 42 -> 2, 65 // gas irOptimized: 157081 // test3(uint256[2][]): 0x20, 2, 23, 42, 23, 42 -> 2, 65 -// gas irOptimized: 134372 +// gas irOptimized: 134378 // test4(uint256[2][2]): 23, 42, 23, 42 -> 65 // gas irOptimized: 111033 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 0eedf950edaa..ea215eab4a07 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 @@ -38,7 +38,7 @@ contract Test { } // ---- // test() -> 24 -// gas irOptimized: 225649 +// gas irOptimized: 225667 // gas legacy: 227083 // gas legacyOptimized: 226529 // test1() -> 3 diff --git a/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic.sol b/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic.sol index f9832971d417..f15097407833 100644 --- a/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic.sol +++ b/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic.sol @@ -45,7 +45,7 @@ contract C { } // ---- // copyExternalStorageArrayOfFunctionType() -> true -// gas irOptimized: 104196 +// gas irOptimized: 104202 // gas legacy: 108554 // gas legacyOptimized: 102405 // copyInternalArrayOfFunctionType() -> true diff --git a/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic_different_mutability.sol b/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic_different_mutability.sol index 3aa44de02bad..0fd41479d5ee 100644 --- a/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic_different_mutability.sol +++ b/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic_different_mutability.sol @@ -48,7 +48,7 @@ contract C { } // ---- // copyExternalStorageArraysOfFunctionType() -> true -// gas irOptimized: 103961 +// gas irOptimized: 103967 // gas legacy: 108295 // gas legacyOptimized: 102162 // copyInternalArrayOfFunctionType() -> true 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 cd309867b989..d60408a01c38 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: 120086 +// gas irOptimized: 120254 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 f51282fbc38e..7675a14abcd2 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: 118989 +// gas irOptimized: 119121 diff --git a/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_calldata_to_storage.sol b/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_calldata_to_storage.sol index 3bd87eef7f4e..4a1ff0853476 100644 --- a/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_calldata_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_calldata_to_storage.sol @@ -23,4 +23,4 @@ contract C { // compileViaYul: true // ---- // f((uint256[])[]): 0x20, 3, 0x60, 0x60, 0x60, 0x20, 3, 1, 2, 3 -> 3, 1 -// gas irOptimized: 324143 +// gas irOptimized: 324167 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 3f992e6966a8..c3b88d5239ad 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: 180374 +// gas irOptimized: 180662 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 45ff6db5e95d..10d4cfaf5859 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: 138095 +// gas irOptimized: 138113 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 7bdc7af84ea3..15e5ac82852b 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: 178650 +// gas irOptimized: 178662 // gas legacy: 180675 // gas legacyOptimized: 179686 // g() -> 0x40, 0xc0, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000, 0x11, 0x3132333435363738393233343536373839000000000000000000000000000000 -// gas irOptimized: 105498 +// gas irOptimized: 105510 // gas legacy: 109415 // gas legacyOptimized: 106600 // h() -> 0x40, 0x60, 0x00, 0x00 diff --git a/test/libsolidity/semanticTests/array/copying/copy_byte_array_to_storage.sol b/test/libsolidity/semanticTests/array/copying/copy_byte_array_to_storage.sol index f2dc8287b254..9efc3b77e4f4 100644 --- a/test/libsolidity/semanticTests/array/copying/copy_byte_array_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/copy_byte_array_to_storage.sol @@ -46,6 +46,6 @@ contract C { } // ---- // f() -> 0xff -// gas irOptimized: 143059 +// gas irOptimized: 143078 // gas legacy: 153404 // gas legacyOptimized: 146676 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 cf807c64d180..9549a514f17a 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: 121923 +// gas irOptimized: 121941 // gas legacy: 205176 // gas legacyOptimized: 204971 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 fe5fef52d5fa..86042ed2a8ae 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: 324312 +// gas irOptimized: 324324 // 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: 139764 +// gas irOptimized: 139770 // 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: 186124 +// gas irOptimized: 186130 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 fd8de524910d..68ff9074841f 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: 327353 +// gas irOptimized: 327449 // 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: 142599 +// gas irOptimized: 142677 // 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: 188653 +// gas irOptimized: 188767 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 956bf662e53c..26caf3c3c5ea 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: 124191 +// gas irOptimized: 124209 // gas legacy: 129077 // gas legacyOptimized: 128210 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 9b6b044c4201..a3c3585fc9a1 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: 301176 +// gas irOptimized: 301182 // 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: 115304 // 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: 185585 +// gas irOptimized: 185591 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 d54f382b167f..821edc1c85ec 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: 303955 +// gas irOptimized: 303961 // 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: 116413 // 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: 187583 +// gas irOptimized: 187589 diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_storage_to_storage.sol b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_storage_to_storage.sol index 89e4f846eaa5..8e6088e29d2a 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_storage_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_storage_to_storage.sol @@ -63,7 +63,7 @@ contract C { // compileViaYul: true // ---- // test1() -// gas irOptimized: 122802 +// gas irOptimized: 122808 // test2() // gas irOptimized: 122829 // test3() diff --git a/test/libsolidity/semanticTests/array/copying/storage_memory_nested.sol b/test/libsolidity/semanticTests/array/copying/storage_memory_nested.sol index 92eeda704527..cf02025dfe6f 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: 205826 +// gas irOptimized: 206066 // gas legacy: 211758 // gas legacyOptimized: 211179 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 ef48accb4851..d6a994abca7f 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: 201436 +// gas irOptimized: 201454 // gas legacy: 204327 // gas legacyOptimized: 202899 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 838853194d96..7414461a9f17 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: 205826 +// gas irOptimized: 206066 // gas legacy: 211770 // gas legacyOptimized: 211191 diff --git a/test/libsolidity/semanticTests/array/copying/storage_memory_nested_struct.sol b/test/libsolidity/semanticTests/array/copying/storage_memory_nested_struct.sol index 21690e0630d7..74df9fdc3006 100644 --- a/test/libsolidity/semanticTests/array/copying/storage_memory_nested_struct.sol +++ b/test/libsolidity/semanticTests/array/copying/storage_memory_nested_struct.sol @@ -24,6 +24,6 @@ contract C { } // ---- // f() -> 11, 0x0c, 1, 0x15, 22, 4 -// gas irOptimized: 290156 +// gas irOptimized: 290192 // gas legacy: 293398 // gas legacyOptimized: 290218 diff --git a/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol b/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol index 41d5407fb884..ce41f1a1280d 100644 --- a/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol +++ b/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol @@ -41,7 +41,7 @@ contract c { // ---- // getLengths() -> 0, 0 // setLengths(uint256,uint256): 48, 49 -> -// gas irOptimized: 107616 +// gas irOptimized: 108198 // gas legacy: 108272 // gas legacyOptimized: 100268 // getLengths() -> 48, 49 diff --git a/test/libsolidity/semanticTests/array/dynamic_multi_array_cleanup.sol b/test/libsolidity/semanticTests/array/dynamic_multi_array_cleanup.sol index a6fc3b3e4fd4..126a96e090aa 100644 --- a/test/libsolidity/semanticTests/array/dynamic_multi_array_cleanup.sol +++ b/test/libsolidity/semanticTests/array/dynamic_multi_array_cleanup.sol @@ -16,7 +16,7 @@ contract c { // ---- // storageEmpty -> 1 // fill() -> 8 -// gas irOptimized: 122187 +// gas irOptimized: 122259 // gas legacy: 121602 // gas legacyOptimized: 120589 // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/array/nested_calldata_storage2.sol b/test/libsolidity/semanticTests/array/nested_calldata_storage2.sol index 81659c91ebcd..e90752e23322 100644 --- a/test/libsolidity/semanticTests/array/nested_calldata_storage2.sol +++ b/test/libsolidity/semanticTests/array/nested_calldata_storage2.sol @@ -8,6 +8,6 @@ contract C { // compileViaYul: true // ---- // i(uint256[][]): 0x20, 2, 0x40, 0xC0, 3, 0x0A01, 0x0A02, 0x0A03, 4, 0x0B01, 0x0B02, 0x0B03, 0x0B04 -// gas irOptimized: 245100 +// gas irOptimized: 245118 // tmp_i(uint256,uint256): 0, 0 -> 0x0A01 // tmp_i(uint256,uint256): 1, 0 -> 0x0B01 diff --git a/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty_garbage_ref.sol b/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty_garbage_ref.sol index 8d8d47280cb9..399f329869a5 100644 --- a/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty_garbage_ref.sol +++ b/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty_garbage_ref.sol @@ -15,7 +15,7 @@ contract c { } // ---- // test() -> -// gas irOptimized: 104364 +// gas irOptimized: 104561 // gas legacy: 131256 // gas legacyOptimized: 126668 // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/push/array_push.sol b/test/libsolidity/semanticTests/array/push/array_push.sol index 3b8b22bafa73..9ec44805f396 100644 --- a/test/libsolidity/semanticTests/array/push/array_push.sol +++ b/test/libsolidity/semanticTests/array/push/array_push.sol @@ -16,6 +16,6 @@ contract c { } // ---- // test() -> 5, 4, 3, 3 -// gas irOptimized: 111690 +// gas irOptimized: 111708 // gas legacy: 111804 // gas legacyOptimized: 111122 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 b058f42acddc..9e317fe455a6 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: 112417 +// gas irOptimized: 112429 // gas legacy: 113657 // gas legacyOptimized: 113465 diff --git a/test/libsolidity/semanticTests/array/push/array_push_struct.sol b/test/libsolidity/semanticTests/array/push/array_push_struct.sol index 22858cded443..d17b7e638bd8 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: 135034 +// gas irOptimized: 135046 // gas legacy: 147437 // gas legacyOptimized: 146429 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 6086d2e3e16a..05dd5ff19314 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: 136676 +// gas irOptimized: 136688 // gas legacy: 142414 // gas legacyOptimized: 137975 diff --git a/test/libsolidity/semanticTests/array/push/nested_bytes_push.sol b/test/libsolidity/semanticTests/array/push/nested_bytes_push.sol index ad50bdc59524..e85fb7c4bcb5 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: 178937 +// gas irOptimized: 178961 // gas legacy: 181013 // gas legacyOptimized: 180397 diff --git a/test/libsolidity/semanticTests/events/event_dynamic_nested_array_storage_v2.sol b/test/libsolidity/semanticTests/events/event_dynamic_nested_array_storage_v2.sol index c6f94aad9f0d..6e723edf9fec 100644 --- a/test/libsolidity/semanticTests/events/event_dynamic_nested_array_storage_v2.sol +++ b/test/libsolidity/semanticTests/events/event_dynamic_nested_array_storage_v2.sol @@ -15,6 +15,6 @@ contract C { // ---- // createEvent(uint256): 42 -> // ~ emit E(uint256[][]): 0x20, 0x02, 0x40, 0xa0, 0x02, 0x2a, 0x2b, 0x02, 0x2c, 0x2d -// gas irOptimized: 184748 +// gas irOptimized: 184772 // gas legacy: 187493 // gas legacyOptimized: 184548 diff --git a/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol b/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol index 447cfae3c89d..398708d5123f 100644 --- a/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol +++ b/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol @@ -75,7 +75,7 @@ contract FixedFeeRegistrar is Registrar { // ---- // constructor() // gas irOptimized: 21029 -// gas irOptimized code: 330400 +// gas irOptimized code: 326400 // gas legacy: 115395 // gas legacy code: 792400 // gas legacyOptimized: 84598 diff --git a/test/libsolidity/semanticTests/externalContracts/base64.sol b/test/libsolidity/semanticTests/externalContracts/base64.sol index deeeb66ce43a..e95240dbc702 100644 --- a/test/libsolidity/semanticTests/externalContracts/base64.sol +++ b/test/libsolidity/semanticTests/externalContracts/base64.sol @@ -34,7 +34,7 @@ contract test { // ---- // constructor() // gas irOptimized: 21029 -// gas irOptimized code: 319400 +// gas irOptimized code: 314200 // gas legacy: 102214 // gas legacy code: 629800 // gas legacyOptimized: 87926 @@ -54,10 +54,10 @@ contract test { // encode_no_asm(bytes): 0x20, 5, "fooba" -> 0x20, 8, "Zm9vYmE=" // encode_no_asm(bytes): 0x20, 6, "foobar" -> 0x20, 8, "Zm9vYmFy" // encode_inline_asm_large() -// gas irOptimized: 1061982 +// gas irOptimized: 1067982 // gas legacy: 1554038 // gas legacyOptimized: 1132031 // encode_no_asm_large() -// gas irOptimized: 2368013 +// gas irOptimized: 2374013 // gas legacy: 4600082 // gas legacyOptimized: 2813075 diff --git a/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol b/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol index a7022b768eb1..3e06a3e95d32 100644 --- a/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol +++ b/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol @@ -177,7 +177,7 @@ contract DepositContract is IDepositContract, ERC165 { // ---- // constructor() // gas irOptimized: 727054 -// gas irOptimized code: 590000 +// gas irOptimized code: 561600 // gas legacy: 920228 // gas legacy code: 1438800 // gas legacyOptimized: 848699 diff --git a/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol b/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol index 7bce1b6cb976..d2a5216e4e97 100644 --- a/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol +++ b/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol @@ -49,7 +49,7 @@ contract test { // ---- // constructor() // gas irOptimized: 21029 -// gas irOptimized code: 1546600 +// gas irOptimized code: 1543200 // gas legacy: 209723 // gas legacy code: 2205000 // gas legacyOptimized: 178012 diff --git a/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol b/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol index f1441be9b602..31fb77deee6e 100644 --- a/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol +++ b/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol @@ -49,7 +49,7 @@ contract test { // ---- // constructor() // gas irOptimized: 21029 -// gas irOptimized code: 1456400 +// gas irOptimized code: 1453000 // gas legacy: 195206 // gas legacy code: 1999000 // gas legacyOptimized: 168857 diff --git a/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol b/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol index bc2e37951b51..9edd393cf89a 100644 --- a/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol +++ b/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol @@ -34,7 +34,7 @@ contract test { // ---- // constructor() // gas irOptimized: 21029 -// gas irOptimized code: 359000 +// gas irOptimized code: 355800 // gas legacy: 92110 // gas legacy code: 523600 // gas legacyOptimized: 82667 diff --git a/test/libsolidity/semanticTests/externalContracts/snark.sol b/test/libsolidity/semanticTests/externalContracts/snark.sol index b6e6a24bbd60..ca94a94f2199 100644 --- a/test/libsolidity/semanticTests/externalContracts/snark.sol +++ b/test/libsolidity/semanticTests/externalContracts/snark.sol @@ -297,6 +297,6 @@ contract Test { // gas legacyOptimized: 276313 // verifyTx() -> true // ~ emit Verified(string): 0x20, 0x16, "Successfully verified." -// gas irOptimized: 789885 +// gas irOptimized: 789891 // gas legacy: 904397 // gas legacyOptimized: 816770 diff --git a/test/libsolidity/semanticTests/externalContracts/strings.sol b/test/libsolidity/semanticTests/externalContracts/strings.sol index cc0ab35c86da..d9939d2c44d4 100644 --- a/test/libsolidity/semanticTests/externalContracts/strings.sol +++ b/test/libsolidity/semanticTests/externalContracts/strings.sol @@ -50,7 +50,7 @@ contract test { // ---- // constructor() // gas irOptimized: 21029 -// gas irOptimized code: 509200 +// gas irOptimized code: 498000 // gas legacy: 126346 // gas legacy code: 932600 // gas legacyOptimized: 102639 @@ -72,6 +72,6 @@ contract test { // gas legacy: 31621 // gas legacyOptimized: 27914 // benchmark(string,bytes32): 0x40, 0x0842021, 8, "solidity" -> 0x2020 -// gas irOptimized: 1192539 +// gas irOptimized: 1192545 // gas legacy: 4234020 // gas legacyOptimized: 2318668 diff --git a/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol b/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol index 52dd40f67e90..3a34898bcb37 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: 97626 +// gas irOptimized: 97632 // gas irOptimized code: 116400 // gas legacy: 156599 // gas legacy code: 236400 diff --git a/test/libsolidity/semanticTests/libraries/internal_types_in_library.sol b/test/libsolidity/semanticTests/libraries/internal_types_in_library.sol index 63b01cd1825b..428ee0b433d0 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: 112502 +// gas irOptimized: 112772 // gas legacy: 132930 // gas legacyOptimized: 118020 diff --git a/test/libsolidity/semanticTests/storageLayoutSpecifier/delete.sol b/test/libsolidity/semanticTests/storageLayoutSpecifier/delete.sol index 27af89d92568..cf3b31a9d66f 100644 --- a/test/libsolidity/semanticTests/storageLayoutSpecifier/delete.sol +++ b/test/libsolidity/semanticTests/storageLayoutSpecifier/delete.sol @@ -19,7 +19,7 @@ contract C layout at 42 { } // ---- // fillArray() -> 3 -// gas irOptimized: 110900 +// gas irOptimized: 110918 // gas legacy: 110730 // gas legacyOptimized: 110307 // arrayLength() -> 3 diff --git a/test/libsolidity/semanticTests/storageLayoutSpecifier/state_variable_dynamic_array.sol b/test/libsolidity/semanticTests/storageLayoutSpecifier/state_variable_dynamic_array.sol index b830d3a8c222..e344b31dd6a8 100644 --- a/test/libsolidity/semanticTests/storageLayoutSpecifier/state_variable_dynamic_array.sol +++ b/test/libsolidity/semanticTests/storageLayoutSpecifier/state_variable_dynamic_array.sol @@ -34,14 +34,14 @@ contract C is A layout at 42 { } // ---- // initA() -> 1, 2, 3 -// gas irOptimized: 111770 +// gas irOptimized: 111788 // gas legacy: 111679 // gas legacyOptimized: 111150 // arrayA(uint256): 0 -> 1 // arrayALength() -> 3 // arrayCLength() -> 0 // initCFromAInReverse() -> 3, 2, 1 -// gas irOptimized: 121075 +// gas irOptimized: 121081 // gas legacy: 121213 // gas legacyOptimized: 120843 // clearA() -> diff --git a/test/libsolidity/semanticTests/storageLayoutSpecifier/state_variable_mapping.sol b/test/libsolidity/semanticTests/storageLayoutSpecifier/state_variable_mapping.sol index 0af0738be55d..e62628374081 100644 --- a/test/libsolidity/semanticTests/storageLayoutSpecifier/state_variable_mapping.sol +++ b/test/libsolidity/semanticTests/storageLayoutSpecifier/state_variable_mapping.sol @@ -25,7 +25,7 @@ contract C layout at 42 is A { } // ---- // setup() -> -// gas irOptimized: 159147 +// gas irOptimized: 159165 // gas legacy: 161738 // gas legacyOptimized: 160222 // open(uint256): 3 -> 0x20, 5, "Empty" diff --git a/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_nested_array_to_storage.sol b/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_nested_array_to_storage.sol index 1fc3a903f31e..49b7bf61a997 100644 --- a/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_nested_array_to_storage.sol +++ b/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_nested_array_to_storage.sol @@ -16,6 +16,6 @@ contract C { } // ---- // f(uint32,(uint128,uint256[][2],uint32)): 55, 0x40, 77, 0x60, 88, 0x40, 0x40, 2, 1, 2 -> 55, 77, 1, 2, 88 -// gas irOptimized: 202285 +// gas irOptimized: 202321 // gas legacy: 207376 // gas legacyOptimized: 203583 diff --git a/test/libsolidity/semanticTests/structs/struct_delete_storage_with_array.sol b/test/libsolidity/semanticTests/structs/struct_delete_storage_with_array.sol index 827a802db837..a6211054e6ee 100644 --- a/test/libsolidity/semanticTests/structs/struct_delete_storage_with_array.sol +++ b/test/libsolidity/semanticTests/structs/struct_delete_storage_with_array.sol @@ -46,6 +46,6 @@ contract C { // gas legacy: 113591 // gas legacyOptimized: 113098 // g() -> -// gas irOptimized: 118755 +// gas irOptimized: 118774 // gas legacy: 118764 // gas legacyOptimized: 118168 diff --git a/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol b/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol index 08e5148d3972..d4cd4e1a30a7 100644 --- a/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol +++ b/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol @@ -114,7 +114,7 @@ contract ERC20 { // constructor() // ~ emit Transfer(address,address,uint256): #0x00, #0x1212121212121212121212121212120000000012, 0x14 // gas irOptimized: 67205 -// gas irOptimized code: 252800 +// gas irOptimized code: 237200 // gas legacy: 163350 // gas legacy code: 671400 // gas legacyOptimized: 127464 diff --git a/test/libsolidity/semanticTests/various/erc20.sol b/test/libsolidity/semanticTests/various/erc20.sol index 4c2835302b74..735c2d723f3e 100644 --- a/test/libsolidity/semanticTests/various/erc20.sol +++ b/test/libsolidity/semanticTests/various/erc20.sol @@ -97,7 +97,7 @@ contract ERC20 { // constructor() // ~ emit Transfer(address,address,uint256): #0x00, #0x1212121212121212121212121212120000000012, 0x14 // gas irOptimized: 67221 -// gas irOptimized code: 246000 +// gas irOptimized code: 230400 // gas legacy: 159957 // gas legacy code: 647600 // gas legacyOptimized: 126934 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 71d463d7b77a..e64914369181 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: 177764 +// gas irOptimized: 177770 // gas legacy: 180653 // gas legacyOptimized: 179144 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 f8466debe133..8d8ac2c261ea 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: 112515 +// gas irOptimized: 112527 // gas legacy: 112888 // gas legacyOptimized: 112580