From 1f4559e1dc0fc923a27b10aebb6bceedfbc146fd Mon Sep 17 00:00:00 2001 From: blishko Date: Tue, 19 May 2026 11:46:20 +0200 Subject: [PATCH 1/2] Optimizer: Do not run Yul constant optimizer --- libsolidity/codegen/CompilerContext.cpp | 2 - libyul/ObjectOptimizer.cpp | 2 - libyul/optimiser/Suite.cpp | 7 - libyul/optimiser/Suite.h | 1 - .../constant_optimizer_yul/output | 2 +- .../output | 2 +- .../output | 2 +- .../output | 2 +- .../debug_info_in_yul_snippet_escaping/output | 12 +- .../output | 4 +- .../output | 2 +- .../output | 36 +- .../ir_compiler_subobjects/output | 4 +- .../output | 4 +- test/cmdlineTests/ir_subobject_order/output | 12 +- .../output | 2 +- .../output | 2 +- .../output | 6 +- .../output | 6 +- test/cmdlineTests/name_simplifier/output | 18 +- .../cmdlineTests/optimizer_array_sload/output | 4 +- .../output | 54 +- .../output | 54 +- .../output | 3 +- .../output | 11 +- .../output | 35 +- .../output | 34 +- .../output.json | 122 +-- .../output.json | 2 +- .../output.json | 2 +- .../output.json | 2 +- .../output.json | 58 +- .../output.json | 942 +++++++++--------- .../output.json | 8 +- .../output.json | 8 +- .../output.json | 8 +- .../output.json | 8 +- .../output.json | 8 +- .../standard_yul_cfg_json_export/output.json | 334 +++---- .../storage_layout_specifier_smoke/output | 4 +- .../output | 6 +- .../strict_asm_yul_cfg_json_export/output | 23 +- .../viair_subobject_optimization/output | 78 +- test/cmdlineTests/viair_subobjects/output | 4 +- test/cmdlineTests/yul_cfg_json_export/output | 334 +++---- .../output | 2 +- .../output | 10 +- .../yul_optimizer_erc7201_param_memory/output | 8 +- .../output | 16 +- .../abi_decode_from_storage_struct_v2.sol | 2 +- .../abicoder/abi_decode_simple_storage.sol | 2 +- .../abicoder/abi_encode_calldata_slice.sol | 6 +- .../semanticTests/abicoder/abi_encode_v2.sol | 2 +- ...2_in_function_inherited_in_v1_contract.sol | 2 +- .../calldata_array_dynamic_of_uint_v2.sol | 4 +- .../abicoder/libraryABI/storage_ptr.sol | 2 +- .../array/array_memory_index_access.sol | 2 +- .../array/array_storage_index_access.sol | 18 +- .../array/array_storage_index_zeroed_test.sol | 8 +- ...rray_storage_push_empty_length_address.sol | 2 +- .../array/array_storage_push_pop.sol | 6 +- .../array/byte_array_storage_layout.sol | 2 +- .../array/byte_array_transitional_2.sol | 2 +- .../array/constant_var_as_array_length.sol | 2 +- .../copying/array_copy_cleanup_uint128.sol | 2 +- .../copying/array_copy_cleanup_uint40.sol | 2 +- .../array_copy_clear_storage_packed.sol | 4 +- .../copying/array_copy_different_packing.sol | 2 +- ...y_copy_storage_storage_dynamic_dynamic.sol | 2 +- .../array_copy_storage_storage_struct.sol | 2 +- .../array_copy_storage_to_memory_nested.sol | 2 +- .../copying/array_copy_target_simple.sol | 2 +- .../copying/array_copy_target_simple_2.sol | 4 +- .../copying/array_elements_to_mapping.sol | 2 +- ...on_external_storage_to_storage_dynamic.sol | 2 +- ...o_storage_dynamic_different_mutability.sol | 2 +- .../array_of_struct_calldata_to_storage.sol | 2 +- .../array_of_struct_memory_to_storage.sol | 2 +- ...ts_containing_arrays_memory_to_storage.sol | 2 +- .../array/copying/array_to_mapping.sol | 2 +- .../array/copying/bytes_inside_mappings.sol | 4 +- .../copying/bytes_storage_to_storage.sol | 12 +- .../copying/calldata_array_to_mapping.sol | 2 +- ...nup_during_multi_element_per_slot_copy.sol | 4 +- .../copy_byte_array_in_struct_to_storage.sol | 4 +- .../copy_function_internal_storage_array.sol | 2 +- .../array/copying/copy_removes_bytes_data.sol | 2 +- ...d_array_of_structs_calldata_to_storage.sol | 6 +- ...ted_array_of_structs_memory_to_storage.sol | 6 +- .../function_type_array_to_storage.sol | 4 +- .../memory_dyn_2d_bytes_to_storage.sol | 2 +- .../nested_array_memory_to_storage.sol | 2 +- ...d_array_of_structs_calldata_to_storage.sol | 6 +- ...ted_array_of_structs_memory_to_storage.sol | 6 +- .../array/copying/storage_memory_nested.sol | 2 +- .../copying/storage_memory_nested_bytes.sol | 2 +- .../storage_memory_nested_from_pointer.sol | 2 +- .../copying/storage_memory_packed_dyn.sol | 2 +- .../array/create_memory_array.sol | 2 +- .../array/delete/bytes_delete_element.sol | 2 +- .../array/delete/delete_bytes_array.sol | 2 +- .../array/dynamic_array_cleanup.sol | 4 +- .../array/dynamic_multi_array_cleanup.sol | 2 +- .../array/fixed_arrays_as_return_type.sol | 2 +- .../array/fixed_arrays_in_constructors.sol | 4 +- .../array/function_array_cross_calls.sol | 6 +- .../array/pop/array_pop_array_transition.sol | 2 +- .../array/pop/array_pop_uint16_transition.sol | 2 +- .../array/pop/array_pop_uint24_transition.sol | 2 +- .../array/pop/byte_array_pop_copy_long.sol | 2 +- .../pop/byte_array_pop_long_storage_empty.sol | 4 +- ...ray_pop_long_storage_empty_garbage_ref.sol | 2 +- .../array/pop/byte_array_pop_masking_long.sol | 2 +- .../semanticTests/array/push/array_push.sol | 2 +- .../array/push/byte_array_push_transition.sol | 2 +- .../array/push/nested_bytes_push.sol | 2 +- .../array/push/push_no_args_2d.sol | 8 +- .../array/push/push_no_args_bytes.sol | 2 +- .../semanticTests/array/reusing_memory.sol | 2 +- .../cleanup/byte_array_to_storage_cleanup.sol | 4 +- .../constructor/arrays_in_constructors.sol | 6 +- .../bytes_in_constructors_packer.sol | 6 +- .../bytes_in_constructors_unpacker.sol | 6 +- .../constructor_arguments_external.sol | 2 +- .../constructor_static_array_argument.sol | 2 +- .../events/event_dynamic_array_storage.sol | 2 +- .../events/event_dynamic_array_storage_v2.sol | 2 +- .../event_dynamic_nested_array_storage_v2.sol | 4 +- .../events/event_emit_from_other_contract.sol | 2 +- .../events/event_indexed_string.sol | 2 +- .../externalContracts/FixedFeeRegistrar.sol | 14 +- .../externalContracts/base64.sol | 22 +- .../externalContracts/deposit_contract.sol | 28 +- .../externalContracts/prbmath_signed.sol | 14 +- .../externalContracts/prbmath_unsigned.sol | 4 +- .../externalContracts/ramanujan_pi.sol | 10 +- .../semanticTests/externalContracts/snark.sol | 4 +- .../externalContracts/strings.sol | 24 +- .../creation_function_call_with_args.sol | 4 +- .../creation_function_call_with_salt.sol | 4 +- .../external_call_to_nonexisting.sol | 8 +- ...ernal_call_to_nonexisting_debugstrings.sol | 10 +- .../functionCall/gas_and_value_basic.sol | 4 +- .../functionCall/send_zero_ether.sol | 4 +- .../functionTypes/store_function.sol | 2 +- .../immutable/immutable_tag_too_large_bug.sol | 4 +- .../immutable/multi_creation.sol | 2 +- .../address_overload_resolution.sol | 4 +- .../inheritance/constructor_with_params.sol | 2 +- ...ructor_with_params_diamond_inheritance.sol | 2 +- .../constructor_with_params_inheritance.sol | 2 +- ...d_function_calldata_calldata_interface.sol | 2 +- ...ted_function_calldata_memory_interface.sol | 2 +- .../inheritance/value_for_constructor.sol | 4 +- .../transient_storage_low_level_calls.sol | 2 +- .../transient_storage_selfdestruct.sol | 4 +- .../using_library_mappings_public.sol | 2 +- .../using_library_mappings_return.sol | 2 +- .../saltedCreate/salted_create_with_value.sol | 2 +- .../semanticTests/smoke/constructor.sol | 2 +- .../storage/empty_nonempty_empty.sol | 4 +- .../storage/packed_storage_structs_bytes.sol | 2 +- .../storage/static_array_copy_cleanup.sol | 4 +- .../storage_boundary_delete_overflow_bug.sol | 14 +- ...rage_boundary_struct_array_mixed_types.sol | 14 +- ...torage_boundary_struct_array_multislot.sol | 2 +- .../storage_boundary_struct_array_packed.sol | 10 +- .../storageLayoutSpecifier/constructor.sol | 2 +- .../storageLayoutSpecifier/delete.sol | 2 +- .../dynamic_array_storage_end.sol | 4 +- .../state_variable_dynamic_array.sol | 4 +- .../storage_reference_array.sol | 2 +- .../structs/copy_from_mapping.sol | 4 +- .../copy_substructures_from_mapping.sol | 4 +- .../structs/copy_substructures_to_mapping.sol | 12 +- .../semanticTests/structs/copy_to_mapping.sol | 16 +- ...ata_to_storage_nested_dynamic_array_v2.sol | 2 +- .../struct_delete_storage_nested_small.sol | 2 +- .../struct_delete_storage_with_array.sol | 2 +- .../struct_memory_to_storage_function_ptr.sol | 2 +- .../userDefinedValueType/calldata.sol | 4 +- .../calldata_to_storage.sol | 2 +- .../userDefinedValueType/erc20.sol | 10 +- .../memory_to_storage.sol | 4 +- .../semanticTests/various/address_code.sol | 4 +- .../semanticTests/various/create_calldata.sol | 4 +- .../various/destructuring_assignment.sol | 2 +- .../various/different_call_type_transient.sol | 2 +- .../semanticTests/various/erc20.sol | 10 +- .../various/selfdestruct_post_cancun.sol | 4 +- ...uct_post_cancun_multiple_beneficiaries.sol | 8 +- .../selfdestruct_post_cancun_redeploy.sol | 8 +- .../semanticTests/various/senders_balance.sol | 4 +- .../skip_dynamic_types_for_structs.sol | 2 +- .../viaYul/copy_struct_invalid_ir_bug.sol | 2 +- test/libyul/YulOptimizerTestCommon.cpp | 2 - .../yulOptimizerTests/fullSuite/abi2.yul | 10 +- .../fullSuite/abi_example1.yul | 2 +- .../fullSuite/ackermann_function.yul | 6 +- .../fullSuite/ackermann_function_if.yul | 4 +- .../yulOptimizerTests/fullSuite/aztec.yul | 4 +- .../fullSuite/combine_shift_and_and_2.yul | 2 +- .../fullSuite/combine_shift_and_and_3.yul | 8 +- .../fullSuite/create2_and_mask.yul | 4 +- .../fullSuite/create_and_mask.yul | 4 +- .../fullSuite/extcodelength.yul | 4 +- .../yulOptimizerTests/fullSuite/fibonacci.yul | 2 +- .../fullSuite/stack_compressor_msize.yul | 4 +- .../static_array_slot_computation.yul | 4 +- .../unusedFunctionParameterPruner_loop.yul | 6 +- 210 files changed, 1380 insertions(+), 1632 deletions(-) diff --git a/libsolidity/codegen/CompilerContext.cpp b/libsolidity/codegen/CompilerContext.cpp index 82f5ea3dc2de..04cef129c8d0 100644 --- a/libsolidity/codegen/CompilerContext.cpp +++ b/libsolidity/codegen/CompilerContext.cpp @@ -542,9 +542,7 @@ void CompilerContext::optimizeYul(yul::Object& _object, OptimiserSettings const& #endif bool const isCreation = runtimeContext() != nullptr; - yul::GasMeter meter(*evmDialect, isCreation, _optimiserSettings.expectedExecutionsPerDeployment); yul::OptimiserSuite::run( - &meter, _object, _optimiserSettings.optimizeStackAllocation, _optimiserSettings.yulOptimiserSteps, diff --git a/libyul/ObjectOptimizer.cpp b/libyul/ObjectOptimizer.cpp index e0a0ddb24a3e..32eab73687e0 100644 --- a/libyul/ObjectOptimizer.cpp +++ b/libyul/ObjectOptimizer.cpp @@ -67,7 +67,6 @@ void ObjectOptimizer::optimize(Object& _object, Settings const& _settings, bool } EVMDialect const& dialect = EVMDialect::strictAssemblyForEVMObjects(_settings.evmVersion, _settings.eofVersion); - GasMeter const meter(dialect, _isCreation, _settings.expectedExecutionsPerDeployment); std::optional cacheKey = calculateCacheKey(_object.code()->root(), *_object.debugData, _settings, _isCreation); if (cacheKey.has_value() && m_cachedObjects.count(*cacheKey) != 0) @@ -77,7 +76,6 @@ void ObjectOptimizer::optimize(Object& _object, Settings const& _settings, bool } OptimiserSuite::run( - &meter, _object, _settings.optimizeStackAllocation, _settings.yulOptimiserSteps, diff --git a/libyul/optimiser/Suite.cpp b/libyul/optimiser/Suite.cpp index 17698d74e2a0..99dd3e2a65be 100644 --- a/libyul/optimiser/Suite.cpp +++ b/libyul/optimiser/Suite.cpp @@ -62,7 +62,6 @@ #include #include #include -#include #include #include #include @@ -89,7 +88,6 @@ using namespace solidity::yul; using namespace std::string_literals; void OptimiserSuite::run( - GasMeter const* _meter, Object& _object, bool _optimizeStackAllocation, std::string_view _optimisationSequence, @@ -156,11 +154,6 @@ void OptimiserSuite::run( if (evmDialect) { - yulAssert(_meter, ""); - { - PROFILER_PROBE("ConstantOptimiser", probe); - ConstantOptimiser{*evmDialect, *_meter}(astRoot); - } if (usesOptimizedCodeGenerator) { if (!evmDialect->eofVersion().has_value()) diff --git a/libyul/optimiser/Suite.h b/libyul/optimiser/Suite.h index b0c3314089b7..86a728638ff2 100644 --- a/libyul/optimiser/Suite.h +++ b/libyul/optimiser/Suite.h @@ -63,7 +63,6 @@ class OptimiserSuite /// The value nullopt for `_expectedExecutionsPerDeployment` represents creation code. static void run( - GasMeter const* _meter, Object& _object, bool _optimizeStackAllocation, std::string_view _optimisationSequence, diff --git a/test/cmdlineTests/constant_optimizer_yul/output b/test/cmdlineTests/constant_optimizer_yul/output index c0d3ab934641..873461bfebf6 100644 --- a/test/cmdlineTests/constant_optimizer_yul/output +++ b/test/cmdlineTests/constant_optimizer_yul/output @@ -8,7 +8,7 @@ object "C_12" { mstore(64, _1) if callvalue() { revert(0, 0) } /// @src 0:103:238 "assembly {..." - sstore(0, shl(180, 1)) + sstore(0, 0x1000000000000000000000000000000000000000000000) /// @src 0:61:418 "contract C {..." let _2 := datasize("C_12_deployed") codecopy(_1, dataoffset("C_12_deployed"), _2) diff --git a/test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_all/output b/test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_all/output index 7ad569ba1107..273dedf4b78c 100644 --- a/test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_all/output +++ b/test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_all/output @@ -186,7 +186,7 @@ object "C_6" { if eq(0x26121ff0, shr(224, calldataload(0))) { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } return(0, 0) } } diff --git a/test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_location_only/output b/test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_location_only/output index 36ef4d8294ab..3487f2c0b8e8 100644 --- a/test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_location_only/output +++ b/test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_location_only/output @@ -185,7 +185,7 @@ object "C_6" { if eq(0x26121ff0, shr(224, calldataload(0))) { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } return(0, 0) } } diff --git a/test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_none/output b/test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_none/output index ea3cb35a2849..7c610736c43f 100644 --- a/test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_none/output +++ b/test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_none/output @@ -174,7 +174,7 @@ object "C_6" { if eq(0x26121ff0, shr(224, calldataload(0))) { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } return(0, 0) } } diff --git a/test/cmdlineTests/debug_info_in_yul_snippet_escaping/output b/test/cmdlineTests/debug_info_in_yul_snippet_escaping/output index c29dfd89265d..e837fc9b4902 100644 --- a/test/cmdlineTests/debug_info_in_yul_snippet_escaping/output +++ b/test/cmdlineTests/debug_info_in_yul_snippet_escaping/output @@ -435,14 +435,14 @@ object "D_27" { if eq(0x26121ff0, shr(224, calldataload(0))) { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } /// @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." let _2 := datasize("C_2") let _3 := add(_1, _2) if or(gt(_3, 0xffffffffffffffff), lt(_3, _1)) { /// @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x41) revert(0, 0x24) } @@ -462,7 +462,7 @@ object "D_27" { let newFreePtr := add(memPtr_1, 64) if or(gt(newFreePtr, /** @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." */ 0xffffffffffffffff), /** @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." */ lt(newFreePtr, memPtr_1)) { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x41) revert(0, 0x24) } @@ -477,7 +477,7 @@ object "D_27" { let newFreePtr_1 := add(memPtr_3, 96) if or(gt(newFreePtr_1, /** @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." */ 0xffffffffffffffff), /** @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." */ lt(newFreePtr_1, memPtr_3)) { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x41) revert(0, 0x24) } @@ -486,14 +486,14 @@ object "D_27" { mstore(memPtr_3, 39) let _4 := add(memPtr_3, 32) mstore(_4, 0x2f2a2a204073726320303a39363a313635202022636f6e74726163742044207b) - mstore(add(memPtr_3, 64), shl(200, 0x2e2e2e22202a2f)) + mstore(add(memPtr_3, 64), 0x2e2e2e22202a2f00000000000000000000000000000000000000000000000000) let memPos := mload(64) mstore(memPos, 32) let length := mload(memPtr_3) mstore(add(memPos, 32), length) mcopy(add(memPos, 64), _4, length) mstore(add(add(memPos, length), 64), 0) - return(memPos, add(sub(add(memPos, and(add(length, 31), not(31))), memPos), 64)) + return(memPos, add(sub(add(memPos, and(add(length, 31), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0)), memPos), 64)) } } revert(0, 0) diff --git a/test/cmdlineTests/evmasm_transient_storage_state_variable/output b/test/cmdlineTests/evmasm_transient_storage_state_variable/output index 0f2580c80564..286dfc48a028 100644 --- a/test/cmdlineTests/evmasm_transient_storage_state_variable/output +++ b/test/cmdlineTests/evmasm_transient_storage_state_variable/output @@ -66,9 +66,7 @@ sub_0: assembly { iszero tag_11 jumpi - 0x4e487b71 - 0xe0 - shl + shl(0xe0, 0x4e487b71) 0x00 mstore 0x11 diff --git a/test/cmdlineTests/evmasm_transient_storage_state_variable_via_ir/output b/test/cmdlineTests/evmasm_transient_storage_state_variable_via_ir/output index b2f55e1d5724..f35a871f10be 100644 --- a/test/cmdlineTests/evmasm_transient_storage_state_variable_via_ir/output +++ b/test/cmdlineTests/evmasm_transient_storage_state_variable_via_ir/output @@ -31,7 +31,7 @@ sub_0: assembly { revert tag_3: jumpi(tag_7, callvalue) - jumpi(tag_7, slt(add(not(0x03), calldatasize), 0x00)) + jumpi(tag_7, slt(add(calldatasize, not(0x03)), 0x00)) tload(0x00) 0x01 dup2 diff --git a/test/cmdlineTests/inline_assembly_function_name_clash/output b/test/cmdlineTests/inline_assembly_function_name_clash/output index d21576ff0ba0..b72801510533 100644 --- a/test/cmdlineTests/inline_assembly_function_name_clash/output +++ b/test/cmdlineTests/inline_assembly_function_name_clash/output @@ -28,7 +28,7 @@ "returnSlots": 1 }, "convert_uint256_to_uint256": { - "entryPoint": 276, + "entryPoint": 307, "parameterSlots": 1, "returnSlots": 1 }, @@ -43,58 +43,58 @@ "returnSlots": 0 }, "fun_f": { - "entryPoint": 442, + "entryPoint": 473, "id": 25, "parameterSlots": 0, "returnSlots": 1 }, "fun_f_inner": { - "entryPoint": 430, + "entryPoint": 461, "parameterSlots": 1, "returnSlots": 1 }, "fun_g": { - "entryPoint": 564, + "entryPoint": 595, "id": 36, "parameterSlots": 0, "returnSlots": 1 }, "fun_g_inner": { - "entryPoint": 552, + "entryPoint": 583, "parameterSlots": 1, "returnSlots": 1 }, "identity": { - "entryPoint": 273, + "entryPoint": 304, "parameterSlots": 1, "returnSlots": 1 }, "modifier_m": { - "entryPoint": 509, + "entryPoint": 540, "id": 14, "parameterSlots": 1, "returnSlots": 1 }, "modifier_m_17": { - "entryPoint": 344, + "entryPoint": 375, "id": 14, "parameterSlots": 1, "returnSlots": 1 }, "modifier_m_19": { - "entryPoint": 387, + "entryPoint": 418, "id": 14, "parameterSlots": 1, "returnSlots": 1 }, "modifier_m_28": { - "entryPoint": 466, + "entryPoint": 497, "id": 14, "parameterSlots": 1, "returnSlots": 1 }, "prepare_store_uint256": { - "entryPoint": 304, + "entryPoint": 335, "parameterSlots": 1, "returnSlots": 1 }, @@ -129,37 +129,37 @@ "returnSlots": 1 }, "update_storage_value_offset_uint256_to_uint256": { - "entryPoint": 307, + "entryPoint": 338, "parameterSlots": 2, "returnSlots": 0 }, "usr$f": { - "entryPoint": 339, + "entryPoint": 370, "parameterSlots": 0, "returnSlots": 1 }, "usr$f_17": { - "entryPoint": 382, + "entryPoint": 413, "parameterSlots": 0, "returnSlots": 1 }, "usr$f_22": { - "entryPoint": 425, + "entryPoint": 456, "parameterSlots": 0, "returnSlots": 1 }, "usr$f_26": { - "entryPoint": 461, + "entryPoint": 492, "parameterSlots": 0, "returnSlots": 1 }, "usr$f_32": { - "entryPoint": 504, + "entryPoint": 535, "parameterSlots": 0, "returnSlots": 1 }, "usr$f_37": { - "entryPoint": 547, + "entryPoint": 578, "parameterSlots": 0, "returnSlots": 1 }, diff --git a/test/cmdlineTests/ir_compiler_subobjects/output b/test/cmdlineTests/ir_compiler_subobjects/output index 08ee8bf5d0b5..772bb38f7fff 100644 --- a/test/cmdlineTests/ir_compiler_subobjects/output +++ b/test/cmdlineTests/ir_compiler_subobjects/output @@ -50,14 +50,14 @@ object "D_16" { if eq(0x26121ff0, shr(224, calldataload(0))) { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } /// @src 0:149:156 "new C()" let _2 := datasize("C_3") let _3 := add(_1, _2) if or(gt(_3, 0xffffffffffffffff), lt(_3, _1)) { /// @src 0:96:165 "contract D {..." - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x41) revert(0, 0x24) } diff --git a/test/cmdlineTests/ir_optimized_transient_storage_value_type/output b/test/cmdlineTests/ir_optimized_transient_storage_value_type/output index 2f6918cabb36..5bcc6fbd07d8 100644 --- a/test/cmdlineTests/ir_optimized_transient_storage_value_type/output +++ b/test/cmdlineTests/ir_optimized_transient_storage_value_type/output @@ -20,12 +20,12 @@ object "C_14" { if eq(0x26121ff0, shr(224, calldataload(0))) { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } let _1 := tload(0) let sum := add(_1, 0x01) if gt(_1, sum) { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x11) revert(0, 0x24) } diff --git a/test/cmdlineTests/ir_subobject_order/output b/test/cmdlineTests/ir_subobject_order/output index d41b65bf9a62..e12094e52bd6 100644 --- a/test/cmdlineTests/ir_subobject_order/output +++ b/test/cmdlineTests/ir_subobject_order/output @@ -30,9 +30,9 @@ object "C_33" { if callvalue() { revert(0, 0) } let _2 := datasize("A_13") let _3 := add(_1, _2) - if or(gt(_3, sub(shl(64, 1), 1)), lt(_3, _1)) + if or(gt(_3, 0xffffffffffffffff), lt(_3, _1)) { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x41) revert(0, 0x24) } @@ -44,13 +44,13 @@ object "C_33" { returndatacopy(pos, 0, returndatasize()) revert(pos, returndatasize()) } - sstore(0, or(and(sload(0), not(sub(shl(160, 1), 1))), and(expr_address, sub(shl(160, 1), 1)))) + sstore(0, or(and(sload(0), 0xffffffffffffffffffffffff0000000000000000000000000000000000000000), and(expr_address, 0xffffffffffffffffffffffffffffffffffffffff))) let _4 := mload(64) let _5 := datasize("B_7") let _6 := add(_4, _5) - if or(gt(_6, sub(shl(64, 1), 1)), lt(_6, _4)) + if or(gt(_6, 0xffffffffffffffff), lt(_6, _4)) { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x41) revert(0, 0x24) } @@ -62,7 +62,7 @@ object "C_33" { returndatacopy(pos_1, 0, returndatasize()) revert(pos_1, returndatasize()) } - sstore(0x01, or(and(sload(0x01), not(sub(shl(160, 1), 1))), and(expr_address_1, sub(shl(160, 1), 1)))) + sstore(0x01, or(and(sload(0x01), 0xffffffffffffffffffffffff0000000000000000000000000000000000000000), and(expr_address_1, 0xffffffffffffffffffffffffffffffffffffffff))) let _7 := mload(64) let _8 := datasize("C_33_deployed") codecopy(_7, dataoffset("C_33_deployed"), _8) diff --git a/test/cmdlineTests/ir_with_assembly_no_memoryguard_creation/output b/test/cmdlineTests/ir_with_assembly_no_memoryguard_creation/output index 03f5564200bf..d86aa577aec8 100644 --- a/test/cmdlineTests/ir_with_assembly_no_memoryguard_creation/output +++ b/test/cmdlineTests/ir_with_assembly_no_memoryguard_creation/output @@ -20,7 +20,7 @@ object "D_12" { if eq(0x26121ff0, shr(224, calldataload(0))) { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } return(0, 0) } } diff --git a/test/cmdlineTests/ir_with_assembly_no_memoryguard_runtime/output b/test/cmdlineTests/ir_with_assembly_no_memoryguard_runtime/output index 9d07cd910e9f..81088d19c72c 100644 --- a/test/cmdlineTests/ir_with_assembly_no_memoryguard_runtime/output +++ b/test/cmdlineTests/ir_with_assembly_no_memoryguard_runtime/output @@ -22,7 +22,7 @@ object "D_8" { if eq(0x26121ff0, shr(224, calldataload(0))) { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } return(0, 0) } } diff --git a/test/cmdlineTests/mcopy_bytes_array_returned_from_function/output b/test/cmdlineTests/mcopy_bytes_array_returned_from_function/output index f3cd766954c5..6ed43e26352e 100644 --- a/test/cmdlineTests/mcopy_bytes_array_returned_from_function/output +++ b/test/cmdlineTests/mcopy_bytes_array_returned_from_function/output @@ -21,11 +21,11 @@ object "C_14" { if eq(0xc2985578, shr(224, calldataload(0))) { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } let newFreePtr := add(_1, 64) if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _1)) { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x41) revert(0, 36) } @@ -39,7 +39,7 @@ object "C_14" { mstore(add(memPos, 32), length) mcopy(add(memPos, 64), _2, length) mstore(add(add(memPos, length), 64), 0) - return(memPos, add(sub(add(memPos, and(add(length, 31), not(31))), memPos), 64)) + return(memPos, add(sub(add(memPos, and(add(length, 31), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0)), memPos), 64)) } } revert(0, 0) diff --git a/test/cmdlineTests/mcopy_string_literal_returned_from_function/output b/test/cmdlineTests/mcopy_string_literal_returned_from_function/output index 3adeae0f58e6..306a4f0249d3 100644 --- a/test/cmdlineTests/mcopy_string_literal_returned_from_function/output +++ b/test/cmdlineTests/mcopy_string_literal_returned_from_function/output @@ -21,11 +21,11 @@ object "C_10" { if eq(0xc2985578, shr(224, calldataload(0))) { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } let newFreePtr := add(_1, 64) if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _1)) { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x41) revert(0, 0x24) } @@ -39,7 +39,7 @@ object "C_10" { mstore(add(memPos, 32), length) mcopy(add(memPos, 64), _2, length) mstore(add(add(memPos, length), 64), 0) - return(memPos, add(sub(add(memPos, and(add(length, 31), not(31))), memPos), 64)) + return(memPos, add(sub(add(memPos, and(add(length, 31), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0)), memPos), 64)) } } revert(0, 0) diff --git a/test/cmdlineTests/name_simplifier/output b/test/cmdlineTests/name_simplifier/output index 8eeff65b91a6..fc6191c3aa15 100644 --- a/test/cmdlineTests/name_simplifier/output +++ b/test/cmdlineTests/name_simplifier/output @@ -23,24 +23,24 @@ object "C_59" { if eq(0xf8eddcc6, shr(224, calldataload(0))) { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 32) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 32) { revert(0, 0) } let offset := calldataload(4) if gt(offset, 0xffffffffffffffff) { revert(0, 0) } if iszero(slt(add(offset, 35), calldatasize())) { revert(0, 0) } let length := calldataload(add(4, offset)) if gt(length, 0xffffffffffffffff) { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x41) revert(0, 36) } let _1 := shl(5, length) let memPtr := 0 memPtr := mload(64) - let newFreePtr := add(memPtr, and(add(_1, 63), not(31))) + let newFreePtr := add(memPtr, and(add(_1, 63), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0)) if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x41) revert(0, 36) } @@ -60,7 +60,7 @@ object "C_59" { let newFreePtr_1 := add(memPtr_1, 32) if or(gt(newFreePtr_1, 0xffffffffffffffff), lt(newFreePtr_1, memPtr_1)) { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x41) revert(0, 36) } @@ -73,7 +73,7 @@ object "C_59" { let addr := /** @src 0:346:625 "contract C {..." */ 0 if iszero(mload(memPtr)) { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x32) revert(0, 36) } @@ -83,7 +83,7 @@ object "C_59" { let addr_1 := /** @src 0:346:625 "contract C {..." */ 0 if iszero(lt(/** @src 0:492:493 "1" */ 0x01, /** @src 0:346:625 "contract C {..." */ mload(memPtr))) { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x32) revert(0, 36) } @@ -96,7 +96,7 @@ object "C_59" { let newFreePtr_2 := add(memPtr_2, 160) if or(gt(newFreePtr_2, 0xffffffffffffffff), lt(newFreePtr_2, memPtr_2)) { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x41) revert(0, 36) } @@ -114,7 +114,7 @@ object "C_59" { mstore(add(memPos, 64), length_1) mcopy(add(memPos, 96), _3, length_1) mstore(add(add(memPos, length_1), 96), 0) - return(memPos, add(sub(add(memPos, and(add(length_1, 0x1f), not(31))), memPos), 96)) + return(memPos, add(sub(add(memPos, and(add(length_1, 0x1f), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0)), memPos), 96)) } } revert(0, 0) diff --git a/test/cmdlineTests/optimizer_array_sload/output b/test/cmdlineTests/optimizer_array_sload/output index a16ac43a0fda..3a932e06e45c 100644 --- a/test/cmdlineTests/optimizer_array_sload/output +++ b/test/cmdlineTests/optimizer_array_sload/output @@ -23,7 +23,7 @@ object "Arraysum_34" { if eq(0x81d73423, shr(224, calldataload(0))) { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } let var_sum := 0 /// @src 0:175:182 "sum = 0" var_sum := /** @src 0:80:429 "contract Arraysum {..." */ 0 @@ -49,7 +49,7 @@ object "Arraysum_34" { let sum := add(var_sum, sload(add(18569430475105882587588266137607568536673111973893317399460219858819262702947, var_i))) if gt(var_sum, sum) { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x11) revert(0, 0x24) } diff --git a/test/cmdlineTests/optimizer_inliner_dynamic_reference/output b/test/cmdlineTests/optimizer_inliner_dynamic_reference/output index 5313893fc735..bd2611f475bf 100644 --- a/test/cmdlineTests/optimizer_inliner_dynamic_reference/output +++ b/test/cmdlineTests/optimizer_inliner_dynamic_reference/output @@ -144,7 +144,7 @@ sub_0: assembly { jump // in tag_25: jump // out - /* "#utility.yul":196:418 */ + /* "#utility.yul":196:475 */ tag_22: /* "#utility.yul":261:270 */ dup1 @@ -154,63 +154,53 @@ sub_0: assembly { dup1 dup3 gt - /* "#utility.yul":279:412 */ + /* "#utility.yul":279:469 */ iszero tag_30 jumpi - /* "#utility.yul":334:344 */ - 0x4e487b71 - /* "#utility.yul":329:332 */ - 0xe0 - /* "#utility.yul":325:345 */ - shl + shl(0xe0, 0x4e487b71) /* "#utility.yul":322:323 */ 0x00 - /* "#utility.yul":315:346 */ + /* "#utility.yul":315:403 */ mstore - /* "#utility.yul":369:373 */ + /* "#utility.yul":426:430 */ 0x11 - /* "#utility.yul":366:367 */ + /* "#utility.yul":423:424 */ 0x04 - /* "#utility.yul":359:374 */ + /* "#utility.yul":416:431 */ mstore - /* "#utility.yul":397:401 */ + /* "#utility.yul":454:458 */ 0x24 - /* "#utility.yul":394:395 */ + /* "#utility.yul":451:452 */ 0x00 - /* "#utility.yul":387:402 */ + /* "#utility.yul":444:459 */ revert - /* "#utility.yul":279:412 */ + /* "#utility.yul":279:469 */ tag_30: - /* "#utility.yul":196:418 */ + /* "#utility.yul":196:475 */ swap3 swap2 pop pop jump // out - /* "#utility.yul":423:550 */ + /* "#utility.yul":480:664 */ tag_26: - /* "#utility.yul":484:494 */ - 0x4e487b71 - /* "#utility.yul":479:482 */ - 0xe0 - /* "#utility.yul":475:495 */ - shl - /* "#utility.yul":472:473 */ + shl(0xe0, 0x4e487b71) + /* "#utility.yul":529:530 */ 0x00 - /* "#utility.yul":465:496 */ + /* "#utility.yul":522:610 */ mstore - /* "#utility.yul":515:519 */ + /* "#utility.yul":629:633 */ 0x51 - /* "#utility.yul":512:513 */ + /* "#utility.yul":626:627 */ 0x04 - /* "#utility.yul":505:520 */ + /* "#utility.yul":619:634 */ mstore - /* "#utility.yul":539:543 */ + /* "#utility.yul":653:657 */ 0x24 - /* "#utility.yul":536:537 */ + /* "#utility.yul":650:651 */ 0x00 - /* "#utility.yul":529:544 */ + /* "#utility.yul":643:658 */ revert auxdata: diff --git a/test/cmdlineTests/optimizer_inliner_dynamic_reference_constructor/output b/test/cmdlineTests/optimizer_inliner_dynamic_reference_constructor/output index 5997bd1c7b60..1f28478e91fa 100644 --- a/test/cmdlineTests/optimizer_inliner_dynamic_reference_constructor/output +++ b/test/cmdlineTests/optimizer_inliner_dynamic_reference_constructor/output @@ -149,7 +149,7 @@ sub_0: assembly { jump // in tag_21: jump // out - /* "#utility.yul":196:418 */ + /* "#utility.yul":196:475 */ tag_19: /* "#utility.yul":261:270 */ dup1 @@ -159,63 +159,53 @@ sub_0: assembly { dup1 dup3 gt - /* "#utility.yul":279:412 */ + /* "#utility.yul":279:469 */ iszero tag_26 jumpi - /* "#utility.yul":334:344 */ - 0x4e487b71 - /* "#utility.yul":329:332 */ - 0xe0 - /* "#utility.yul":325:345 */ - shl + shl(0xe0, 0x4e487b71) /* "#utility.yul":322:323 */ 0x00 - /* "#utility.yul":315:346 */ + /* "#utility.yul":315:403 */ mstore - /* "#utility.yul":369:373 */ + /* "#utility.yul":426:430 */ 0x11 - /* "#utility.yul":366:367 */ + /* "#utility.yul":423:424 */ 0x04 - /* "#utility.yul":359:374 */ + /* "#utility.yul":416:431 */ mstore - /* "#utility.yul":397:401 */ + /* "#utility.yul":454:458 */ 0x24 - /* "#utility.yul":394:395 */ + /* "#utility.yul":451:452 */ 0x00 - /* "#utility.yul":387:402 */ + /* "#utility.yul":444:459 */ revert - /* "#utility.yul":279:412 */ + /* "#utility.yul":279:469 */ tag_26: - /* "#utility.yul":196:418 */ + /* "#utility.yul":196:475 */ swap3 swap2 pop pop jump // out - /* "#utility.yul":423:550 */ + /* "#utility.yul":480:664 */ tag_22: - /* "#utility.yul":484:494 */ - 0x4e487b71 - /* "#utility.yul":479:482 */ - 0xe0 - /* "#utility.yul":475:495 */ - shl - /* "#utility.yul":472:473 */ + shl(0xe0, 0x4e487b71) + /* "#utility.yul":529:530 */ 0x00 - /* "#utility.yul":465:496 */ + /* "#utility.yul":522:610 */ mstore - /* "#utility.yul":515:519 */ + /* "#utility.yul":629:633 */ 0x51 - /* "#utility.yul":512:513 */ + /* "#utility.yul":626:627 */ 0x04 - /* "#utility.yul":505:520 */ + /* "#utility.yul":619:634 */ mstore - /* "#utility.yul":539:543 */ + /* "#utility.yul":653:657 */ 0x24 - /* "#utility.yul":536:537 */ + /* "#utility.yul":650:651 */ 0x00 - /* "#utility.yul":529:544 */ + /* "#utility.yul":643:658 */ revert auxdata: diff --git a/test/cmdlineTests/revert_strings_strip_legacy_require_custom_error/output b/test/cmdlineTests/revert_strings_strip_legacy_require_custom_error/output index b478056ce468..a1b6de41592d 100644 --- a/test/cmdlineTests/revert_strings_strip_legacy_require_custom_error/output +++ b/test/cmdlineTests/revert_strings_strip_legacy_require_custom_error/output @@ -142,8 +142,7 @@ sub_0: assembly { add mstore 0x80 - 0x1f - not + not(0x1f) 0x1f dup4 add diff --git a/test/cmdlineTests/revert_strings_strip_legacy_require_custom_error_constructor_param_side_effect/output b/test/cmdlineTests/revert_strings_strip_legacy_require_custom_error_constructor_param_side_effect/output index b11a94d25a3d..52a819219ca5 100644 --- a/test/cmdlineTests/revert_strings_strip_legacy_require_custom_error_constructor_param_side_effect/output +++ b/test/cmdlineTests/revert_strings_strip_legacy_require_custom_error_constructor_param_side_effect/output @@ -169,9 +169,7 @@ sub_0: assembly { pop jump // out tag_25: - 0x4e487b71 - 0xe0 - shl + shl(0xe0, 0x4e487b71) 0x00 mstore 0x11 @@ -182,9 +180,9 @@ sub_0: assembly { revert tag_17: 0x00 - 0x01 + not(0x00) dup3 - add + sub tag_31 jumpi tag_31 @@ -229,8 +227,7 @@ sub_0: assembly { add mstore 0x60 - 0x1f - not + not(0x1f) 0x1f dup4 add diff --git a/test/cmdlineTests/revert_strings_strip_via_ir_require_custom_error/output b/test/cmdlineTests/revert_strings_strip_via_ir_require_custom_error/output index 7cdf2289b06c..2b36c5665419 100644 --- a/test/cmdlineTests/revert_strings_strip_via_ir_require_custom_error/output +++ b/test/cmdlineTests/revert_strings_strip_via_ir_require_custom_error/output @@ -46,7 +46,7 @@ sub_0: assembly { revert tag_5: jumpi(tag_9, callvalue) - jumpi(tag_9, slt(add(not(0x03), calldatasize), 0x00)) + jumpi(tag_9, slt(add(calldatasize, not(0x03)), 0x00)) 0x20 mload(0x40) 0x00 @@ -59,7 +59,7 @@ sub_0: assembly { revert tag_3: jumpi(tag_9, callvalue) - jumpi(tag_9, slt(add(not(0x03), calldatasize), 0x00)) + jumpi(tag_9, slt(add(calldatasize, not(0x03)), 0x00)) 0x40 dup2 add @@ -85,21 +85,23 @@ sub_0: assembly { shl(0xd9, 0x32b93937b9) dup4 mstore + not(0x1f) + 0x1f mload(0x40) - swap3 - dup4 - swap2 + swap5 + dup6 + swap4 shl(0xe5, 0x01676c8b) - dup4 + dup6 mstore 0x08 0x04 - dup5 + dup7 add mstore 0x60 0x24 - dup5 + dup7 add mstore mload @@ -107,29 +109,26 @@ sub_0: assembly { swap2 dup2 0x64 - dup6 + dup8 add mstore - dup5 - dup5 + dup7 + dup7 add mcopy 0x00 + dup6 dup3 - dup3 + dup7 add - dup5 add - dup2 - swap1 mstore + 0x00 0x44 - dup4 + dup6 add mstore - 0x1f add - not(0x1f) and dup2 add diff --git a/test/cmdlineTests/revert_strings_strip_via_ir_require_custom_error_constructor_param_side_effect/output b/test/cmdlineTests/revert_strings_strip_via_ir_require_custom_error_constructor_param_side_effect/output index d1749e308e75..10a4d7eebb0b 100644 --- a/test/cmdlineTests/revert_strings_strip_via_ir_require_custom_error_constructor_param_side_effect/output +++ b/test/cmdlineTests/revert_strings_strip_via_ir_require_custom_error_constructor_param_side_effect/output @@ -54,7 +54,7 @@ sub_0: assembly { revert tag_8: jumpi(tag_12, callvalue) - jumpi(tag_12, slt(add(not(0x03), calldatasize), 0x00)) + jumpi(tag_12, slt(add(calldatasize, not(0x03)), 0x00)) 0x20 tag_14 tag_1 @@ -71,7 +71,7 @@ sub_0: assembly { revert tag_6: jumpi(tag_12, callvalue) - jumpi(tag_12, slt(add(not(0x03), calldatasize), 0x00)) + jumpi(tag_12, slt(add(calldatasize, not(0x03)), 0x00)) 0x20 sload(0x00) mload(0x40) @@ -81,7 +81,7 @@ sub_0: assembly { return tag_4: jumpi(tag_12, callvalue) - jumpi(tag_12, slt(add(not(0x03), calldatasize), 0x00)) + jumpi(tag_12, slt(add(calldatasize, not(0x03)), 0x00)) 0x40 dup2 add @@ -106,25 +106,27 @@ sub_0: assembly { shl(0xd9, 0x32b93937b9) dup2 mstore + not(0x1f) + 0x1f tag_25 tag_1 jump // in tag_25: - swap1 - mload(0x40) - swap4 - dup5 swap3 + mload(0x40) + swap6 + dup7 + swap5 shl(0xe1, 0x05c9a271) - dup5 + dup7 mstore 0x04 - dup5 + dup7 add mstore 0x40 0x24 - dup5 + dup7 add mstore mload @@ -132,23 +134,21 @@ sub_0: assembly { swap2 dup2 0x44 - dup6 + dup8 add mstore - dup5 - dup5 + dup7 + dup7 add mcopy 0x00 + dup6 dup3 - dup3 + dup7 add - dup5 add mstore - 0x1f add - not(0x1f) and dup2 add diff --git a/test/cmdlineTests/standard_debug_info_in_evm_asm_via_ir_location/output.json b/test/cmdlineTests/standard_debug_info_in_evm_asm_via_ir_location/output.json index 4ef3c6df1873..8250138f7d2c 100644 --- a/test/cmdlineTests/standard_debug_info_in_evm_asm_via_ir_location/output.json +++ b/test/cmdlineTests/standard_debug_info_in_evm_asm_via_ir_location/output.json @@ -6,26 +6,25 @@ "assembly": " /* \"C\":79:503 contract C... */ 0xa0 jumpi(tag_5, callvalue) - 0x1f bytecodeSize + dup1 codesize - dup2 - swap1 sub - swap2 - dup3 - add + swap1 not(0x1f) + 0x1f + dup4 + add and dup4 add swap2 - sub(shl(0x40, 0x01), 0x01) dup4 - gt - dup5 - dup5 + dup4 lt + sub(shl(0x40, 0x01), 0x01) + dup5 + gt or tag_3 jumpi @@ -102,7 +101,7 @@ sub_0: assembly { revert tag_8: jumpi(tag_26, callvalue) - jumpi(tag_26, slt(add(not(0x03), calldatasize), 0x00)) + jumpi(tag_26, slt(add(calldatasize, not(0x03)), 0x00)) sload(0x00) sub(shl(0xff, 0x01), 0x01) dup2 @@ -111,24 +110,22 @@ sub_0: assembly { jumpi 0x01 add + dup1 0x00 - dup2 - swap1 sstore mload(0x40) - shl(0xe4, 0x026121ff) /* \"C\":475:483 this.f() */ - dup2 - mstore - /* \"C\":79:503 contract C... */ swap1 - /* \"C\":475:483 this.f() */ + shl(0xe4, 0x026121ff) + dup3 + mstore 0x20 - /* \"C\":79:503 contract C... */ + /* \"C\":475:479 this */ dup3 + /* \"C\":79:503 contract C... */ 0x04 - dup2 /* \"C\":475:479 this */ + dup2 address /* \"C\":475:483 this.f() */ gas @@ -177,20 +174,20 @@ sub_0: assembly { 0x20 jumpi(tag_22, gt(0x20, returndatasize)) tag_23: + not(0x1f) /* \"C\":79:503 contract C... */ 0x1f - dup2 + dup3 add - not(0x1f) and dup4 add - 0xffffffffffffffff + dup4 dup2 - gt - dup5 - dup3 lt + 0xffffffffffffffff + dup3 + gt or tag_24 jumpi @@ -223,11 +220,7 @@ sub_0: assembly { dup1 revert tag_24: - /* \"C\":120:122 41 */ - shl(0xe0, 0x4e487b71) - /* \"C\":79:503 contract C... */ - 0x00 - mstore + mstore(0x00, shl(0xe0, 0x4e487b71)) mstore(0x04, 0x41) revert(0x00, 0x24) /* \"C\":475:483 this.f() */ @@ -246,9 +239,7 @@ sub_0: assembly { swap1 revert tag_14: - /* \"C\":120:122 41 */ shl(0xe0, 0x4e487b71) - /* \"C\":79:503 contract C... */ 0x00 /* \"C\":120:122 41 */ mstore @@ -265,7 +256,7 @@ sub_0: assembly { /* \"C\":79:503 contract C... */ tag_6: jumpi(tag_26, callvalue) - jumpi(tag_26, slt(add(not(0x03), calldatasize), 0x00)) + jumpi(tag_26, slt(add(calldatasize, not(0x03)), 0x00)) 0x20 sload(0x00) mload(0x40) @@ -275,7 +266,7 @@ sub_0: assembly { return tag_4: jumpi(tag_26, callvalue) - jumpi(tag_26, slt(add(not(0x03), calldatasize), 0x00)) + jumpi(tag_26, slt(add(calldatasize, not(0x03)), 0x00)) /* \"C\":326:334 immutVar */ immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") /* \"C\":120:122 41 */ @@ -336,26 +327,25 @@ sub_0: assembly { "assembly": " /* \"D\":91:181 contract D is C(3)... */ 0xa0 jumpi(tag_5, callvalue) - 0x1f bytecodeSize + dup1 codesize - dup2 - swap1 sub - swap2 - dup3 - add + swap1 not(0x1f) + 0x1f + dup4 + add and dup4 add swap2 - sub(shl(0x40, 0x01), 0x01) dup4 - gt - dup5 - dup5 + dup4 lt + sub(shl(0x40, 0x01), 0x01) + dup5 + gt or tag_3 jumpi @@ -448,7 +438,7 @@ sub_0: assembly { revert tag_8: jumpi(tag_26, callvalue) - jumpi(tag_26, slt(add(not(0x03), calldatasize), 0x00)) + jumpi(tag_26, slt(add(calldatasize, not(0x03)), 0x00)) sload(0x00) sub(shl(0xff, 0x01), 0x01) dup2 @@ -457,24 +447,22 @@ sub_0: assembly { jumpi 0x01 add + dup1 0x00 - dup2 - swap1 sstore mload(0x40) - shl(0xe4, 0x026121ff) /* \"C\":475:483 this.f() */ - dup2 - mstore - /* \"D\":91:181 contract D is C(3)... */ swap1 - /* \"C\":475:483 this.f() */ + shl(0xe4, 0x026121ff) + dup3 + mstore 0x20 - /* \"D\":91:181 contract D is C(3)... */ + /* \"C\":475:479 this */ dup3 + /* \"D\":91:181 contract D is C(3)... */ 0x04 - dup2 /* \"C\":475:479 this */ + dup2 address /* \"C\":475:483 this.f() */ gas @@ -523,20 +511,20 @@ sub_0: assembly { 0x20 jumpi(tag_22, gt(0x20, returndatasize)) tag_23: + not(0x1f) /* \"D\":91:181 contract D is C(3)... */ 0x1f - dup2 + dup3 add - not(0x1f) and dup4 add - 0xffffffffffffffff + dup4 dup2 - gt - dup5 - dup3 lt + 0xffffffffffffffff + dup3 + gt or tag_24 jumpi @@ -569,11 +557,7 @@ sub_0: assembly { dup1 revert tag_24: - /* \"C\":120:122 41 */ - shl(0xe0, 0x4e487b71) - /* \"D\":91:181 contract D is C(3)... */ - 0x00 - mstore + mstore(0x00, shl(0xe0, 0x4e487b71)) mstore(0x04, 0x41) revert(0x00, 0x24) /* \"C\":475:483 this.f() */ @@ -592,9 +576,7 @@ sub_0: assembly { swap1 revert tag_14: - /* \"C\":120:122 41 */ shl(0xe0, 0x4e487b71) - /* \"D\":91:181 contract D is C(3)... */ 0x00 /* \"C\":120:122 41 */ mstore @@ -611,7 +593,7 @@ sub_0: assembly { /* \"D\":91:181 contract D is C(3)... */ tag_6: jumpi(tag_26, callvalue) - jumpi(tag_26, slt(add(not(0x03), calldatasize), 0x00)) + jumpi(tag_26, slt(add(calldatasize, not(0x03)), 0x00)) 0x20 sload(0x00) mload(0x40) @@ -621,7 +603,7 @@ sub_0: assembly { return tag_4: jumpi(tag_26, callvalue) - jumpi(tag_26, slt(add(not(0x03), calldatasize), 0x00)) + jumpi(tag_26, slt(add(calldatasize, not(0x03)), 0x00)) /* \"C\":326:334 immutVar */ immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") /* \"C\":120:122 41 */ diff --git a/test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_all/output.json b/test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_all/output.json index e004ab7424b0..4b904f657034 100644 --- a/test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_all/output.json +++ b/test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_all/output.json @@ -187,7 +187,7 @@ object \"C_6\" { if eq(0x26121ff0, shr(224, calldataload(0))) { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } return(0, 0) } } diff --git a/test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_location_only/output.json b/test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_location_only/output.json index 5c7a93644757..158d237f0b1c 100644 --- a/test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_location_only/output.json +++ b/test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_location_only/output.json @@ -186,7 +186,7 @@ object \"C_6\" { if eq(0x26121ff0, shr(224, calldataload(0))) { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } return(0, 0) } } diff --git a/test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_none/output.json b/test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_none/output.json index 6f2f9243c63a..dd06ece721f9 100644 --- a/test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_none/output.json +++ b/test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_none/output.json @@ -175,7 +175,7 @@ object \"C_6\" { if eq(0x26121ff0, shr(224, calldataload(0))) { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } return(0, 0) } } diff --git a/test/cmdlineTests/standard_debug_info_in_yul_location/output.json b/test/cmdlineTests/standard_debug_info_in_yul_location/output.json index 16220fd619b0..28cf7345d348 100644 --- a/test/cmdlineTests/standard_debug_info_in_yul_location/output.json +++ b/test/cmdlineTests/standard_debug_info_in_yul_location/output.json @@ -619,10 +619,10 @@ object \"C_54\" { if callvalue() { revert(0, 0) } let programSize := datasize(\"C_54\") let argSize := sub(codesize(), programSize) - let newFreePtr := add(_1, and(add(argSize, 31), not(31))) - if or(gt(newFreePtr, sub(shl(64, 1), 1)), lt(newFreePtr, _1)) + let newFreePtr := add(_1, and(add(argSize, 31), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0)) + if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _1)) { - mstore(/** @src -1:-1:-1 */ 0, /** @src 0:79:510 \"contract C...\" */ shl(224, 0x4e487b71)) + mstore(/** @src -1:-1:-1 */ 0, /** @src 0:79:510 \"contract C...\" */ 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x41) revert(/** @src -1:-1:-1 */ 0, /** @src 0:79:510 \"contract C...\" */ 0x24) } @@ -657,7 +657,7 @@ object \"C_54\" { switch shr(224, calldataload(0)) case 0x26121ff0 { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } /// @src 0:333:341 \"immutVar\" let _1 := loadimmutable(\"8\") /// @src 0:322:341 \"constVar + immutVar\" @@ -665,7 +665,7 @@ object \"C_54\" { sum := add(/** @src 0:127:129 \"41\" */ 0x29, /** @src 0:79:510 \"contract C...\" */ _1) if and(1, slt(sum, _1)) { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x11) revert(0, 0x24) } @@ -675,7 +675,7 @@ object \"C_54\" { } case 0x793816ec { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } let _2 := sload(0) let memPos_1 := mload(64) mstore(memPos_1, _2) @@ -683,11 +683,11 @@ object \"C_54\" { } case 0x9942ec6f { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } let _3 := sload(0) - if eq(_3, sub(shl(255, 1), 1)) + if eq(_3, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x11) revert(0, 0x24) } @@ -696,7 +696,7 @@ object \"C_54\" { /// @src 0:482:490 \"this.f()\" let _4 := /** @src 0:79:510 \"contract C...\" */ mload(64) /// @src 0:482:490 \"this.f()\" - mstore(_4, /** @src 0:79:510 \"contract C...\" */ shl(228, 0x026121ff)) + mstore(_4, /** @src 0:79:510 \"contract C...\" */ 0x26121ff000000000000000000000000000000000000000000000000000000000) /// @src 0:482:490 \"this.f()\" let _5 := staticcall(gas(), /** @src 0:482:486 \"this\" */ address(), /** @src 0:482:490 \"this.f()\" */ _4, /** @src 0:79:510 \"contract C...\" */ 4, /** @src 0:482:490 \"this.f()\" */ _4, 32) if iszero(_5) @@ -714,10 +714,10 @@ object \"C_54\" { let _6 := 32 if gt(32, returndatasize()) { _6 := returndatasize() } /// @src 0:79:510 \"contract C...\" - let newFreePtr := add(_4, and(add(_6, 31), not(31))) + let newFreePtr := add(_4, and(add(_6, 31), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0)) if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _4)) { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x41) revert(0, 0x24) } @@ -739,7 +739,7 @@ object \"C_54\" { } case /** @src 0:79:510 \"contract C...\" */ 0xa00b982b { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } let memPos_3 := mload(64) mstore(memPos_3, /** @src 0:127:129 \"41\" */ 0x29) /// @src 0:79:510 \"contract C...\" @@ -755,7 +755,7 @@ object \"C_54\" { let _2 := slt(x, 0) if or(and(iszero(_2), _1), and(_2, iszero(_1))) { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x11) revert(0, 0x24) } @@ -1456,10 +1456,10 @@ object \"D_72\" { if callvalue() { revert(0, 0) } let programSize := datasize(\"D_72\") let argSize := sub(codesize(), programSize) - let newFreePtr := add(_1, and(add(argSize, 31), not(31))) - if or(gt(newFreePtr, sub(shl(64, 1), 1)), lt(newFreePtr, _1)) + let newFreePtr := add(_1, and(add(argSize, 31), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0)) + if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _1)) { - mstore(/** @src -1:-1:-1 */ 0, /** @src 1:91:181 \"contract D is C(3)...\" */ shl(224, 0x4e487b71)) + mstore(/** @src -1:-1:-1 */ 0, /** @src 1:91:181 \"contract D is C(3)...\" */ 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x41) revert(/** @src -1:-1:-1 */ 0, /** @src 1:91:181 \"contract D is C(3)...\" */ 0x24) } @@ -1477,7 +1477,7 @@ object \"D_72\" { let sum := add(/** @src 1:107:108 \"3\" */ 0x03, /** @src 1:91:181 \"contract D is C(3)...\" */ value) if and(1, slt(sum, value)) { - mstore(/** @src -1:-1:-1 */ 0, /** @src 1:91:181 \"contract D is C(3)...\" */ shl(224, 0x4e487b71)) + mstore(/** @src -1:-1:-1 */ 0, /** @src 1:91:181 \"contract D is C(3)...\" */ 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x11) revert(/** @src -1:-1:-1 */ 0, /** @src 1:91:181 \"contract D is C(3)...\" */ 0x24) } @@ -1501,7 +1501,7 @@ object \"D_72\" { switch shr(224, calldataload(0)) case 0x26121ff0 { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } /// @src 0:333:341 \"immutVar\" let _1 := loadimmutable(\"8\") /// @src 0:322:341 \"constVar + immutVar\" @@ -1509,7 +1509,7 @@ object \"D_72\" { sum := add(/** @src 0:127:129 \"41\" */ 0x29, /** @src 1:91:181 \"contract D is C(3)...\" */ _1) if and(1, slt(sum, _1)) { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x11) revert(0, 0x24) } @@ -1519,7 +1519,7 @@ object \"D_72\" { } case 0x793816ec { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } let _2 := sload(0) let memPos_1 := mload(64) mstore(memPos_1, _2) @@ -1527,11 +1527,11 @@ object \"D_72\" { } case 0x9942ec6f { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } let _3 := sload(0) - if eq(_3, sub(shl(255, 1), 1)) + if eq(_3, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x11) revert(0, 0x24) } @@ -1540,7 +1540,7 @@ object \"D_72\" { /// @src 0:482:490 \"this.f()\" let _4 := /** @src 1:91:181 \"contract D is C(3)...\" */ mload(64) /// @src 0:482:490 \"this.f()\" - mstore(_4, /** @src 1:91:181 \"contract D is C(3)...\" */ shl(228, 0x026121ff)) + mstore(_4, /** @src 1:91:181 \"contract D is C(3)...\" */ 0x26121ff000000000000000000000000000000000000000000000000000000000) /// @src 0:482:490 \"this.f()\" let _5 := staticcall(gas(), /** @src 0:482:486 \"this\" */ address(), /** @src 0:482:490 \"this.f()\" */ _4, /** @src 1:91:181 \"contract D is C(3)...\" */ 4, /** @src 0:482:490 \"this.f()\" */ _4, 32) if iszero(_5) @@ -1558,10 +1558,10 @@ object \"D_72\" { let _6 := 32 if gt(32, returndatasize()) { _6 := returndatasize() } /// @src 1:91:181 \"contract D is C(3)...\" - let newFreePtr := add(_4, and(add(_6, 31), not(31))) + let newFreePtr := add(_4, and(add(_6, 31), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0)) if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _4)) { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x41) revert(0, 0x24) } @@ -1583,7 +1583,7 @@ object \"D_72\" { } case /** @src 1:91:181 \"contract D is C(3)...\" */ 0xa00b982b { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } let memPos_3 := mload(64) mstore(memPos_3, /** @src 0:127:129 \"41\" */ 0x29) /// @src 1:91:181 \"contract D is C(3)...\" @@ -1599,7 +1599,7 @@ object \"D_72\" { let _2 := slt(x, 0) if or(and(iszero(_2), _1), and(_2, iszero(_1))) { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x11) revert(0, 0x24) } diff --git a/test/cmdlineTests/standard_optimizer_generatedSources/output.json b/test/cmdlineTests/standard_optimizer_generatedSources/output.json index e5b276b1b9b6..460d4682a882 100644 --- a/test/cmdlineTests/standard_optimizer_generatedSources/output.json +++ b/test/cmdlineTests/standard_optimizer_generatedSources/output.json @@ -11,9 +11,9 @@ "generatedSources": [ { "ast": { - "nativeSrc": "0:1505:1", + "nativeSrc": "0:1621:1", "nodeType": "YulBlock", - "src": "0:1505:1", + "src": "0:1621:1", "statements": [ { "nativeSrc": "6:3:1", @@ -23,9 +23,9 @@ }, { "body": { - "nativeSrc": "46:95:1", + "nativeSrc": "46:152:1", "nodeType": "YulBlock", - "src": "46:95:1", + "src": "46:152:1", "statements": [ { "expression": { @@ -39,33 +39,12 @@ "value": "0" }, { - "arguments": [ - { - "kind": "number", - "nativeSrc": "70:3:1", - "nodeType": "YulLiteral", - "src": "70:3:1", - "type": "", - "value": "224" - }, - { - "kind": "number", - "nativeSrc": "75:10:1", - "nodeType": "YulLiteral", - "src": "75:10:1", - "type": "", - "value": "0x4e487b71" - } - ], - "functionName": { - "name": "shl", - "nativeSrc": "66:3:1", - "nodeType": "YulIdentifier", - "src": "66:3:1" - }, - "nativeSrc": "66:20:1", - "nodeType": "YulFunctionCall", - "src": "66:20:1" + "kind": "number", + "nativeSrc": "66:77:1", + "nodeType": "YulLiteral", + "src": "66:77:1", + "type": "", + "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" } ], "functionName": { @@ -74,134 +53,134 @@ "nodeType": "YulIdentifier", "src": "56:6:1" }, - "nativeSrc": "56:31:1", + "nativeSrc": "56:88:1", "nodeType": "YulFunctionCall", - "src": "56:31:1" + "src": "56:88:1" }, - "nativeSrc": "56:31:1", + "nativeSrc": "56:88:1", "nodeType": "YulExpressionStatement", - "src": "56:31:1" + "src": "56:88:1" }, { "expression": { "arguments": [ { "kind": "number", - "nativeSrc": "103:1:1", + "nativeSrc": "160:1:1", "nodeType": "YulLiteral", - "src": "103:1:1", + "src": "160:1:1", "type": "", "value": "4" }, { "kind": "number", - "nativeSrc": "106:4:1", + "nativeSrc": "163:4:1", "nodeType": "YulLiteral", - "src": "106:4:1", + "src": "163:4:1", "type": "", "value": "0x41" } ], "functionName": { "name": "mstore", - "nativeSrc": "96:6:1", + "nativeSrc": "153:6:1", "nodeType": "YulIdentifier", - "src": "96:6:1" + "src": "153:6:1" }, - "nativeSrc": "96:15:1", + "nativeSrc": "153:15:1", "nodeType": "YulFunctionCall", - "src": "96:15:1" + "src": "153:15:1" }, - "nativeSrc": "96:15:1", + "nativeSrc": "153:15:1", "nodeType": "YulExpressionStatement", - "src": "96:15:1" + "src": "153:15:1" }, { "expression": { "arguments": [ { "kind": "number", - "nativeSrc": "127:1:1", + "nativeSrc": "184:1:1", "nodeType": "YulLiteral", - "src": "127:1:1", + "src": "184:1:1", "type": "", "value": "0" }, { "kind": "number", - "nativeSrc": "130:4:1", + "nativeSrc": "187:4:1", "nodeType": "YulLiteral", - "src": "130:4:1", + "src": "187:4:1", "type": "", "value": "0x24" } ], "functionName": { "name": "revert", - "nativeSrc": "120:6:1", + "nativeSrc": "177:6:1", "nodeType": "YulIdentifier", - "src": "120:6:1" + "src": "177:6:1" }, - "nativeSrc": "120:15:1", + "nativeSrc": "177:15:1", "nodeType": "YulFunctionCall", - "src": "120:15:1" + "src": "177:15:1" }, - "nativeSrc": "120:15:1", + "nativeSrc": "177:15:1", "nodeType": "YulExpressionStatement", - "src": "120:15:1" + "src": "177:15:1" } ] }, "name": "panic_error_0x41", - "nativeSrc": "14:127:1", + "nativeSrc": "14:184:1", "nodeType": "YulFunctionDefinition", - "src": "14:127:1" + "src": "14:184:1" }, { "body": { - "nativeSrc": "241:1080:1", + "nativeSrc": "298:1139:1", "nodeType": "YulBlock", - "src": "241:1080:1", + "src": "298:1139:1", "statements": [ { "body": { - "nativeSrc": "287:16:1", + "nativeSrc": "344:16:1", "nodeType": "YulBlock", - "src": "287:16:1", + "src": "344:16:1", "statements": [ { "expression": { "arguments": [ { "kind": "number", - "nativeSrc": "296:1:1", + "nativeSrc": "353:1:1", "nodeType": "YulLiteral", - "src": "296:1:1", + "src": "353:1:1", "type": "", "value": "0" }, { "kind": "number", - "nativeSrc": "299:1:1", + "nativeSrc": "356:1:1", "nodeType": "YulLiteral", - "src": "299:1:1", + "src": "356:1:1", "type": "", "value": "0" } ], "functionName": { "name": "revert", - "nativeSrc": "289:6:1", + "nativeSrc": "346:6:1", "nodeType": "YulIdentifier", - "src": "289:6:1" + "src": "346:6:1" }, - "nativeSrc": "289:12:1", + "nativeSrc": "346:12:1", "nodeType": "YulFunctionCall", - "src": "289:12:1" + "src": "346:12:1" }, - "nativeSrc": "289:12:1", + "nativeSrc": "346:12:1", "nodeType": "YulExpressionStatement", - "src": "289:12:1" + "src": "346:12:1" } ] }, @@ -211,122 +190,122 @@ "arguments": [ { "name": "dataEnd", - "nativeSrc": "262:7:1", + "nativeSrc": "319:7:1", "nodeType": "YulIdentifier", - "src": "262:7:1" + "src": "319:7:1" }, { "name": "headStart", - "nativeSrc": "271:9:1", + "nativeSrc": "328:9:1", "nodeType": "YulIdentifier", - "src": "271:9:1" + "src": "328:9:1" } ], "functionName": { "name": "sub", - "nativeSrc": "258:3:1", + "nativeSrc": "315:3:1", "nodeType": "YulIdentifier", - "src": "258:3:1" + "src": "315:3:1" }, - "nativeSrc": "258:23:1", + "nativeSrc": "315:23:1", "nodeType": "YulFunctionCall", - "src": "258:23:1" + "src": "315:23:1" }, { "kind": "number", - "nativeSrc": "283:2:1", + "nativeSrc": "340:2:1", "nodeType": "YulLiteral", - "src": "283:2:1", + "src": "340:2:1", "type": "", "value": "32" } ], "functionName": { "name": "slt", - "nativeSrc": "254:3:1", + "nativeSrc": "311:3:1", "nodeType": "YulIdentifier", - "src": "254:3:1" + "src": "311:3:1" }, - "nativeSrc": "254:32:1", + "nativeSrc": "311:32:1", "nodeType": "YulFunctionCall", - "src": "254:32:1" + "src": "311:32:1" }, - "nativeSrc": "251:52:1", + "nativeSrc": "308:52:1", "nodeType": "YulIf", - "src": "251:52:1" + "src": "308:52:1" }, { - "nativeSrc": "312:37:1", + "nativeSrc": "369:37:1", "nodeType": "YulVariableDeclaration", - "src": "312:37:1", + "src": "369:37:1", "value": { "arguments": [ { "name": "headStart", - "nativeSrc": "339:9:1", + "nativeSrc": "396:9:1", "nodeType": "YulIdentifier", - "src": "339:9:1" + "src": "396:9:1" } ], "functionName": { "name": "calldataload", - "nativeSrc": "326:12:1", + "nativeSrc": "383:12:1", "nodeType": "YulIdentifier", - "src": "326:12:1" + "src": "383:12:1" }, - "nativeSrc": "326:23:1", + "nativeSrc": "383:23:1", "nodeType": "YulFunctionCall", - "src": "326:23:1" + "src": "383:23:1" }, "variables": [ { "name": "offset", - "nativeSrc": "316:6:1", + "nativeSrc": "373:6:1", "nodeType": "YulTypedName", - "src": "316:6:1", + "src": "373:6:1", "type": "" } ] }, { "body": { - "nativeSrc": "392:16:1", + "nativeSrc": "449:16:1", "nodeType": "YulBlock", - "src": "392:16:1", + "src": "449:16:1", "statements": [ { "expression": { "arguments": [ { "kind": "number", - "nativeSrc": "401:1:1", + "nativeSrc": "458:1:1", "nodeType": "YulLiteral", - "src": "401:1:1", + "src": "458:1:1", "type": "", "value": "0" }, { "kind": "number", - "nativeSrc": "404:1:1", + "nativeSrc": "461:1:1", "nodeType": "YulLiteral", - "src": "404:1:1", + "src": "461:1:1", "type": "", "value": "0" } ], "functionName": { "name": "revert", - "nativeSrc": "394:6:1", + "nativeSrc": "451:6:1", "nodeType": "YulIdentifier", - "src": "394:6:1" + "src": "451:6:1" }, - "nativeSrc": "394:12:1", + "nativeSrc": "451:12:1", "nodeType": "YulFunctionCall", - "src": "394:12:1" + "src": "451:12:1" }, - "nativeSrc": "394:12:1", + "nativeSrc": "451:12:1", "nodeType": "YulExpressionStatement", - "src": "394:12:1" + "src": "451:12:1" } ] }, @@ -334,111 +313,111 @@ "arguments": [ { "name": "offset", - "nativeSrc": "364:6:1", + "nativeSrc": "421:6:1", "nodeType": "YulIdentifier", - "src": "364:6:1" + "src": "421:6:1" }, { "kind": "number", - "nativeSrc": "372:18:1", + "nativeSrc": "429:18:1", "nodeType": "YulLiteral", - "src": "372:18:1", + "src": "429:18:1", "type": "", "value": "0xffffffffffffffff" } ], "functionName": { "name": "gt", - "nativeSrc": "361:2:1", + "nativeSrc": "418:2:1", "nodeType": "YulIdentifier", - "src": "361:2:1" + "src": "418:2:1" }, - "nativeSrc": "361:30:1", + "nativeSrc": "418:30:1", "nodeType": "YulFunctionCall", - "src": "361:30:1" + "src": "418:30:1" }, - "nativeSrc": "358:50:1", + "nativeSrc": "415:50:1", "nodeType": "YulIf", - "src": "358:50:1" + "src": "415:50:1" }, { - "nativeSrc": "417:32:1", + "nativeSrc": "474:32:1", "nodeType": "YulVariableDeclaration", - "src": "417:32:1", + "src": "474:32:1", "value": { "arguments": [ { "name": "headStart", - "nativeSrc": "431:9:1", + "nativeSrc": "488:9:1", "nodeType": "YulIdentifier", - "src": "431:9:1" + "src": "488:9:1" }, { "name": "offset", - "nativeSrc": "442:6:1", + "nativeSrc": "499:6:1", "nodeType": "YulIdentifier", - "src": "442:6:1" + "src": "499:6:1" } ], "functionName": { "name": "add", - "nativeSrc": "427:3:1", + "nativeSrc": "484:3:1", "nodeType": "YulIdentifier", - "src": "427:3:1" + "src": "484:3:1" }, - "nativeSrc": "427:22:1", + "nativeSrc": "484:22:1", "nodeType": "YulFunctionCall", - "src": "427:22:1" + "src": "484:22:1" }, "variables": [ { "name": "_1", - "nativeSrc": "421:2:1", + "nativeSrc": "478:2:1", "nodeType": "YulTypedName", - "src": "421:2:1", + "src": "478:2:1", "type": "" } ] }, { "body": { - "nativeSrc": "497:16:1", + "nativeSrc": "554:16:1", "nodeType": "YulBlock", - "src": "497:16:1", + "src": "554:16:1", "statements": [ { "expression": { "arguments": [ { "kind": "number", - "nativeSrc": "506:1:1", + "nativeSrc": "563:1:1", "nodeType": "YulLiteral", - "src": "506:1:1", + "src": "563:1:1", "type": "", "value": "0" }, { "kind": "number", - "nativeSrc": "509:1:1", + "nativeSrc": "566:1:1", "nodeType": "YulLiteral", - "src": "509:1:1", + "src": "566:1:1", "type": "", "value": "0" } ], "functionName": { "name": "revert", - "nativeSrc": "499:6:1", + "nativeSrc": "556:6:1", "nodeType": "YulIdentifier", - "src": "499:6:1" + "src": "556:6:1" }, - "nativeSrc": "499:12:1", + "nativeSrc": "556:12:1", "nodeType": "YulFunctionCall", - "src": "499:12:1" + "src": "556:12:1" }, - "nativeSrc": "499:12:1", + "nativeSrc": "556:12:1", "nodeType": "YulExpressionStatement", - "src": "499:12:1" + "src": "556:12:1" } ] }, @@ -450,116 +429,116 @@ "arguments": [ { "name": "_1", - "nativeSrc": "476:2:1", + "nativeSrc": "533:2:1", "nodeType": "YulIdentifier", - "src": "476:2:1" + "src": "533:2:1" }, { "kind": "number", - "nativeSrc": "480:4:1", + "nativeSrc": "537:4:1", "nodeType": "YulLiteral", - "src": "480:4:1", + "src": "537:4:1", "type": "", "value": "0x1f" } ], "functionName": { "name": "add", - "nativeSrc": "472:3:1", + "nativeSrc": "529:3:1", "nodeType": "YulIdentifier", - "src": "472:3:1" + "src": "529:3:1" }, - "nativeSrc": "472:13:1", + "nativeSrc": "529:13:1", "nodeType": "YulFunctionCall", - "src": "472:13:1" + "src": "529:13:1" }, { "name": "dataEnd", - "nativeSrc": "487:7:1", + "nativeSrc": "544:7:1", "nodeType": "YulIdentifier", - "src": "487:7:1" + "src": "544:7:1" } ], "functionName": { "name": "slt", - "nativeSrc": "468:3:1", + "nativeSrc": "525:3:1", "nodeType": "YulIdentifier", - "src": "468:3:1" + "src": "525:3:1" }, - "nativeSrc": "468:27:1", + "nativeSrc": "525:27:1", "nodeType": "YulFunctionCall", - "src": "468:27:1" + "src": "525:27:1" } ], "functionName": { "name": "iszero", - "nativeSrc": "461:6:1", + "nativeSrc": "518:6:1", "nodeType": "YulIdentifier", - "src": "461:6:1" + "src": "518:6:1" }, - "nativeSrc": "461:35:1", + "nativeSrc": "518:35:1", "nodeType": "YulFunctionCall", - "src": "461:35:1" + "src": "518:35:1" }, - "nativeSrc": "458:55:1", + "nativeSrc": "515:55:1", "nodeType": "YulIf", - "src": "458:55:1" + "src": "515:55:1" }, { - "nativeSrc": "522:30:1", + "nativeSrc": "579:30:1", "nodeType": "YulVariableDeclaration", - "src": "522:30:1", + "src": "579:30:1", "value": { "arguments": [ { "name": "_1", - "nativeSrc": "549:2:1", + "nativeSrc": "606:2:1", "nodeType": "YulIdentifier", - "src": "549:2:1" + "src": "606:2:1" } ], "functionName": { "name": "calldataload", - "nativeSrc": "536:12:1", + "nativeSrc": "593:12:1", "nodeType": "YulIdentifier", - "src": "536:12:1" + "src": "593:12:1" }, - "nativeSrc": "536:16:1", + "nativeSrc": "593:16:1", "nodeType": "YulFunctionCall", - "src": "536:16:1" + "src": "593:16:1" }, "variables": [ { "name": "length", - "nativeSrc": "526:6:1", + "nativeSrc": "583:6:1", "nodeType": "YulTypedName", - "src": "526:6:1", + "src": "583:6:1", "type": "" } ] }, { "body": { - "nativeSrc": "595:22:1", + "nativeSrc": "652:22:1", "nodeType": "YulBlock", - "src": "595:22:1", + "src": "652:22:1", "statements": [ { "expression": { "arguments": [], "functionName": { "name": "panic_error_0x41", - "nativeSrc": "597:16:1", + "nativeSrc": "654:16:1", "nodeType": "YulIdentifier", - "src": "597:16:1" + "src": "654:16:1" }, - "nativeSrc": "597:18:1", + "nativeSrc": "654:18:1", "nodeType": "YulFunctionCall", - "src": "597:18:1" + "src": "654:18:1" }, - "nativeSrc": "597:18:1", + "nativeSrc": "654:18:1", "nodeType": "YulExpressionStatement", - "src": "597:18:1" + "src": "654:18:1" } ] }, @@ -567,120 +546,120 @@ "arguments": [ { "name": "length", - "nativeSrc": "567:6:1", + "nativeSrc": "624:6:1", "nodeType": "YulIdentifier", - "src": "567:6:1" + "src": "624:6:1" }, { "kind": "number", - "nativeSrc": "575:18:1", + "nativeSrc": "632:18:1", "nodeType": "YulLiteral", - "src": "575:18:1", + "src": "632:18:1", "type": "", "value": "0xffffffffffffffff" } ], "functionName": { "name": "gt", - "nativeSrc": "564:2:1", + "nativeSrc": "621:2:1", "nodeType": "YulIdentifier", - "src": "564:2:1" + "src": "621:2:1" }, - "nativeSrc": "564:30:1", + "nativeSrc": "621:30:1", "nodeType": "YulFunctionCall", - "src": "564:30:1" + "src": "621:30:1" }, - "nativeSrc": "561:56:1", + "nativeSrc": "618:56:1", "nodeType": "YulIf", - "src": "561:56:1" + "src": "618:56:1" }, { - "nativeSrc": "626:24:1", + "nativeSrc": "683:24:1", "nodeType": "YulVariableDeclaration", - "src": "626:24:1", + "src": "683:24:1", "value": { "arguments": [ { "kind": "number", - "nativeSrc": "640:1:1", + "nativeSrc": "697:1:1", "nodeType": "YulLiteral", - "src": "640:1:1", + "src": "697:1:1", "type": "", "value": "5" }, { "name": "length", - "nativeSrc": "643:6:1", + "nativeSrc": "700:6:1", "nodeType": "YulIdentifier", - "src": "643:6:1" + "src": "700:6:1" } ], "functionName": { "name": "shl", - "nativeSrc": "636:3:1", + "nativeSrc": "693:3:1", "nodeType": "YulIdentifier", - "src": "636:3:1" + "src": "693:3:1" }, - "nativeSrc": "636:14:1", + "nativeSrc": "693:14:1", "nodeType": "YulFunctionCall", - "src": "636:14:1" + "src": "693:14:1" }, "variables": [ { "name": "_2", - "nativeSrc": "630:2:1", + "nativeSrc": "687:2:1", "nodeType": "YulTypedName", - "src": "630:2:1", + "src": "687:2:1", "type": "" } ] }, { - "nativeSrc": "659:23:1", + "nativeSrc": "716:23:1", "nodeType": "YulVariableDeclaration", - "src": "659:23:1", + "src": "716:23:1", "value": { "arguments": [ { "kind": "number", - "nativeSrc": "679:2:1", + "nativeSrc": "736:2:1", "nodeType": "YulLiteral", - "src": "679:2:1", + "src": "736:2:1", "type": "", "value": "64" } ], "functionName": { "name": "mload", - "nativeSrc": "673:5:1", + "nativeSrc": "730:5:1", "nodeType": "YulIdentifier", - "src": "673:5:1" + "src": "730:5:1" }, - "nativeSrc": "673:9:1", + "nativeSrc": "730:9:1", "nodeType": "YulFunctionCall", - "src": "673:9:1" + "src": "730:9:1" }, "variables": [ { "name": "memPtr", - "nativeSrc": "663:6:1", + "nativeSrc": "720:6:1", "nodeType": "YulTypedName", - "src": "663:6:1", + "src": "720:6:1", "type": "" } ] }, { - "nativeSrc": "691:56:1", + "nativeSrc": "748:115:1", "nodeType": "YulVariableDeclaration", - "src": "691:56:1", + "src": "748:115:1", "value": { "arguments": [ { "name": "memPtr", - "nativeSrc": "713:6:1", + "nativeSrc": "770:6:1", "nodeType": "YulIdentifier", - "src": "713:6:1" + "src": "770:6:1" }, { "arguments": [ @@ -688,104 +667,91 @@ "arguments": [ { "name": "_2", - "nativeSrc": "729:2:1", + "nativeSrc": "786:2:1", "nodeType": "YulIdentifier", - "src": "729:2:1" + "src": "786:2:1" }, { "kind": "number", - "nativeSrc": "733:2:1", + "nativeSrc": "790:2:1", "nodeType": "YulLiteral", - "src": "733:2:1", + "src": "790:2:1", "type": "", "value": "63" } ], "functionName": { "name": "add", - "nativeSrc": "725:3:1", + "nativeSrc": "782:3:1", "nodeType": "YulIdentifier", - "src": "725:3:1" + "src": "782:3:1" }, - "nativeSrc": "725:11:1", + "nativeSrc": "782:11:1", "nodeType": "YulFunctionCall", - "src": "725:11:1" + "src": "782:11:1" }, { - "arguments": [ - { - "kind": "number", - "nativeSrc": "742:2:1", - "nodeType": "YulLiteral", - "src": "742:2:1", - "type": "", - "value": "31" - } - ], - "functionName": { - "name": "not", - "nativeSrc": "738:3:1", - "nodeType": "YulIdentifier", - "src": "738:3:1" - }, - "nativeSrc": "738:7:1", - "nodeType": "YulFunctionCall", - "src": "738:7:1" + "kind": "number", + "nativeSrc": "795:66:1", + "nodeType": "YulLiteral", + "src": "795:66:1", + "type": "", + "value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0" } ], "functionName": { "name": "and", - "nativeSrc": "721:3:1", + "nativeSrc": "778:3:1", "nodeType": "YulIdentifier", - "src": "721:3:1" + "src": "778:3:1" }, - "nativeSrc": "721:25:1", + "nativeSrc": "778:84:1", "nodeType": "YulFunctionCall", - "src": "721:25:1" + "src": "778:84:1" } ], "functionName": { "name": "add", - "nativeSrc": "709:3:1", + "nativeSrc": "766:3:1", "nodeType": "YulIdentifier", - "src": "709:3:1" + "src": "766:3:1" }, - "nativeSrc": "709:38:1", + "nativeSrc": "766:97:1", "nodeType": "YulFunctionCall", - "src": "709:38:1" + "src": "766:97:1" }, "variables": [ { "name": "newFreePtr", - "nativeSrc": "695:10:1", + "nativeSrc": "752:10:1", "nodeType": "YulTypedName", - "src": "695:10:1", + "src": "752:10:1", "type": "" } ] }, { "body": { - "nativeSrc": "822:22:1", + "nativeSrc": "938:22:1", "nodeType": "YulBlock", - "src": "822:22:1", + "src": "938:22:1", "statements": [ { "expression": { "arguments": [], "functionName": { "name": "panic_error_0x41", - "nativeSrc": "824:16:1", + "nativeSrc": "940:16:1", "nodeType": "YulIdentifier", - "src": "824:16:1" + "src": "940:16:1" }, - "nativeSrc": "824:18:1", + "nativeSrc": "940:18:1", "nodeType": "YulFunctionCall", - "src": "824:18:1" + "src": "940:18:1" }, - "nativeSrc": "824:18:1", + "nativeSrc": "940:18:1", "nodeType": "YulExpressionStatement", - "src": "824:18:1" + "src": "940:18:1" } ] }, @@ -795,117 +761,117 @@ "arguments": [ { "name": "newFreePtr", - "nativeSrc": "765:10:1", + "nativeSrc": "881:10:1", "nodeType": "YulIdentifier", - "src": "765:10:1" + "src": "881:10:1" }, { "kind": "number", - "nativeSrc": "777:18:1", + "nativeSrc": "893:18:1", "nodeType": "YulLiteral", - "src": "777:18:1", + "src": "893:18:1", "type": "", "value": "0xffffffffffffffff" } ], "functionName": { "name": "gt", - "nativeSrc": "762:2:1", + "nativeSrc": "878:2:1", "nodeType": "YulIdentifier", - "src": "762:2:1" + "src": "878:2:1" }, - "nativeSrc": "762:34:1", + "nativeSrc": "878:34:1", "nodeType": "YulFunctionCall", - "src": "762:34:1" + "src": "878:34:1" }, { "arguments": [ { "name": "newFreePtr", - "nativeSrc": "801:10:1", + "nativeSrc": "917:10:1", "nodeType": "YulIdentifier", - "src": "801:10:1" + "src": "917:10:1" }, { "name": "memPtr", - "nativeSrc": "813:6:1", + "nativeSrc": "929:6:1", "nodeType": "YulIdentifier", - "src": "813:6:1" + "src": "929:6:1" } ], "functionName": { "name": "lt", - "nativeSrc": "798:2:1", + "nativeSrc": "914:2:1", "nodeType": "YulIdentifier", - "src": "798:2:1" + "src": "914:2:1" }, - "nativeSrc": "798:22:1", + "nativeSrc": "914:22:1", "nodeType": "YulFunctionCall", - "src": "798:22:1" + "src": "914:22:1" } ], "functionName": { "name": "or", - "nativeSrc": "759:2:1", + "nativeSrc": "875:2:1", "nodeType": "YulIdentifier", - "src": "759:2:1" + "src": "875:2:1" }, - "nativeSrc": "759:62:1", + "nativeSrc": "875:62:1", "nodeType": "YulFunctionCall", - "src": "759:62:1" + "src": "875:62:1" }, - "nativeSrc": "756:88:1", + "nativeSrc": "872:88:1", "nodeType": "YulIf", - "src": "756:88:1" + "src": "872:88:1" }, { "expression": { "arguments": [ { "kind": "number", - "nativeSrc": "860:2:1", + "nativeSrc": "976:2:1", "nodeType": "YulLiteral", - "src": "860:2:1", + "src": "976:2:1", "type": "", "value": "64" }, { "name": "newFreePtr", - "nativeSrc": "864:10:1", + "nativeSrc": "980:10:1", "nodeType": "YulIdentifier", - "src": "864:10:1" + "src": "980:10:1" } ], "functionName": { "name": "mstore", - "nativeSrc": "853:6:1", + "nativeSrc": "969:6:1", "nodeType": "YulIdentifier", - "src": "853:6:1" + "src": "969:6:1" }, - "nativeSrc": "853:22:1", + "nativeSrc": "969:22:1", "nodeType": "YulFunctionCall", - "src": "853:22:1" + "src": "969:22:1" }, - "nativeSrc": "853:22:1", + "nativeSrc": "969:22:1", "nodeType": "YulExpressionStatement", - "src": "853:22:1" + "src": "969:22:1" }, { - "nativeSrc": "884:17:1", + "nativeSrc": "1000:17:1", "nodeType": "YulVariableDeclaration", - "src": "884:17:1", + "src": "1000:17:1", "value": { "name": "memPtr", - "nativeSrc": "895:6:1", + "nativeSrc": "1011:6:1", "nodeType": "YulIdentifier", - "src": "895:6:1" + "src": "1011:6:1" }, "variables": [ { "name": "dst", - "nativeSrc": "888:3:1", + "nativeSrc": "1004:3:1", "nodeType": "YulTypedName", - "src": "888:3:1", + "src": "1004:3:1", "type": "" } ] @@ -915,170 +881,170 @@ "arguments": [ { "name": "memPtr", - "nativeSrc": "917:6:1", + "nativeSrc": "1033:6:1", "nodeType": "YulIdentifier", - "src": "917:6:1" + "src": "1033:6:1" }, { "name": "length", - "nativeSrc": "925:6:1", + "nativeSrc": "1041:6:1", "nodeType": "YulIdentifier", - "src": "925:6:1" + "src": "1041:6:1" } ], "functionName": { "name": "mstore", - "nativeSrc": "910:6:1", + "nativeSrc": "1026:6:1", "nodeType": "YulIdentifier", - "src": "910:6:1" + "src": "1026:6:1" }, - "nativeSrc": "910:22:1", + "nativeSrc": "1026:22:1", "nodeType": "YulFunctionCall", - "src": "910:22:1" + "src": "1026:22:1" }, - "nativeSrc": "910:22:1", + "nativeSrc": "1026:22:1", "nodeType": "YulExpressionStatement", - "src": "910:22:1" + "src": "1026:22:1" }, { - "nativeSrc": "941:22:1", + "nativeSrc": "1057:22:1", "nodeType": "YulAssignment", - "src": "941:22:1", + "src": "1057:22:1", "value": { "arguments": [ { "name": "memPtr", - "nativeSrc": "952:6:1", + "nativeSrc": "1068:6:1", "nodeType": "YulIdentifier", - "src": "952:6:1" + "src": "1068:6:1" }, { "kind": "number", - "nativeSrc": "960:2:1", + "nativeSrc": "1076:2:1", "nodeType": "YulLiteral", - "src": "960:2:1", + "src": "1076:2:1", "type": "", "value": "32" } ], "functionName": { "name": "add", - "nativeSrc": "948:3:1", + "nativeSrc": "1064:3:1", "nodeType": "YulIdentifier", - "src": "948:3:1" + "src": "1064:3:1" }, - "nativeSrc": "948:15:1", + "nativeSrc": "1064:15:1", "nodeType": "YulFunctionCall", - "src": "948:15:1" + "src": "1064:15:1" }, "variableNames": [ { "name": "dst", - "nativeSrc": "941:3:1", + "nativeSrc": "1057:3:1", "nodeType": "YulIdentifier", - "src": "941:3:1" + "src": "1057:3:1" } ] }, { - "nativeSrc": "972:34:1", + "nativeSrc": "1088:34:1", "nodeType": "YulVariableDeclaration", - "src": "972:34:1", + "src": "1088:34:1", "value": { "arguments": [ { "arguments": [ { "name": "_1", - "nativeSrc": "994:2:1", + "nativeSrc": "1110:2:1", "nodeType": "YulIdentifier", - "src": "994:2:1" + "src": "1110:2:1" }, { "name": "_2", - "nativeSrc": "998:2:1", + "nativeSrc": "1114:2:1", "nodeType": "YulIdentifier", - "src": "998:2:1" + "src": "1114:2:1" } ], "functionName": { "name": "add", - "nativeSrc": "990:3:1", + "nativeSrc": "1106:3:1", "nodeType": "YulIdentifier", - "src": "990:3:1" + "src": "1106:3:1" }, - "nativeSrc": "990:11:1", + "nativeSrc": "1106:11:1", "nodeType": "YulFunctionCall", - "src": "990:11:1" + "src": "1106:11:1" }, { "kind": "number", - "nativeSrc": "1003:2:1", + "nativeSrc": "1119:2:1", "nodeType": "YulLiteral", - "src": "1003:2:1", + "src": "1119:2:1", "type": "", "value": "32" } ], "functionName": { "name": "add", - "nativeSrc": "986:3:1", + "nativeSrc": "1102:3:1", "nodeType": "YulIdentifier", - "src": "986:3:1" + "src": "1102:3:1" }, - "nativeSrc": "986:20:1", + "nativeSrc": "1102:20:1", "nodeType": "YulFunctionCall", - "src": "986:20:1" + "src": "1102:20:1" }, "variables": [ { "name": "srcEnd", - "nativeSrc": "976:6:1", + "nativeSrc": "1092:6:1", "nodeType": "YulTypedName", - "src": "976:6:1", + "src": "1092:6:1", "type": "" } ] }, { "body": { - "nativeSrc": "1038:16:1", + "nativeSrc": "1154:16:1", "nodeType": "YulBlock", - "src": "1038:16:1", + "src": "1154:16:1", "statements": [ { "expression": { "arguments": [ { "kind": "number", - "nativeSrc": "1047:1:1", + "nativeSrc": "1163:1:1", "nodeType": "YulLiteral", - "src": "1047:1:1", + "src": "1163:1:1", "type": "", "value": "0" }, { "kind": "number", - "nativeSrc": "1050:1:1", + "nativeSrc": "1166:1:1", "nodeType": "YulLiteral", - "src": "1050:1:1", + "src": "1166:1:1", "type": "", "value": "0" } ], "functionName": { "name": "revert", - "nativeSrc": "1040:6:1", + "nativeSrc": "1156:6:1", "nodeType": "YulIdentifier", - "src": "1040:6:1" + "src": "1156:6:1" }, - "nativeSrc": "1040:12:1", + "nativeSrc": "1156:12:1", "nodeType": "YulFunctionCall", - "src": "1040:12:1" + "src": "1156:12:1" }, - "nativeSrc": "1040:12:1", + "nativeSrc": "1156:12:1", "nodeType": "YulExpressionStatement", - "src": "1040:12:1" + "src": "1156:12:1" } ] }, @@ -1086,129 +1052,129 @@ "arguments": [ { "name": "srcEnd", - "nativeSrc": "1021:6:1", + "nativeSrc": "1137:6:1", "nodeType": "YulIdentifier", - "src": "1021:6:1" + "src": "1137:6:1" }, { "name": "dataEnd", - "nativeSrc": "1029:7:1", + "nativeSrc": "1145:7:1", "nodeType": "YulIdentifier", - "src": "1029:7:1" + "src": "1145:7:1" } ], "functionName": { "name": "gt", - "nativeSrc": "1018:2:1", + "nativeSrc": "1134:2:1", "nodeType": "YulIdentifier", - "src": "1018:2:1" + "src": "1134:2:1" }, - "nativeSrc": "1018:19:1", + "nativeSrc": "1134:19:1", "nodeType": "YulFunctionCall", - "src": "1018:19:1" + "src": "1134:19:1" }, - "nativeSrc": "1015:39:1", + "nativeSrc": "1131:39:1", "nodeType": "YulIf", - "src": "1015:39:1" + "src": "1131:39:1" }, { - "nativeSrc": "1063:22:1", + "nativeSrc": "1179:22:1", "nodeType": "YulVariableDeclaration", - "src": "1063:22:1", + "src": "1179:22:1", "value": { "arguments": [ { "name": "_1", - "nativeSrc": "1078:2:1", + "nativeSrc": "1194:2:1", "nodeType": "YulIdentifier", - "src": "1078:2:1" + "src": "1194:2:1" }, { "kind": "number", - "nativeSrc": "1082:2:1", + "nativeSrc": "1198:2:1", "nodeType": "YulLiteral", - "src": "1082:2:1", + "src": "1198:2:1", "type": "", "value": "32" } ], "functionName": { "name": "add", - "nativeSrc": "1074:3:1", + "nativeSrc": "1190:3:1", "nodeType": "YulIdentifier", - "src": "1074:3:1" + "src": "1190:3:1" }, - "nativeSrc": "1074:11:1", + "nativeSrc": "1190:11:1", "nodeType": "YulFunctionCall", - "src": "1074:11:1" + "src": "1190:11:1" }, "variables": [ { "name": "src", - "nativeSrc": "1067:3:1", + "nativeSrc": "1183:3:1", "nodeType": "YulTypedName", - "src": "1067:3:1", + "src": "1183:3:1", "type": "" } ] }, { "body": { - "nativeSrc": "1150:140:1", + "nativeSrc": "1266:140:1", "nodeType": "YulBlock", - "src": "1150:140:1", + "src": "1266:140:1", "statements": [ { - "nativeSrc": "1164:14:1", + "nativeSrc": "1280:14:1", "nodeType": "YulVariableDeclaration", - "src": "1164:14:1", + "src": "1280:14:1", "value": { "kind": "number", - "nativeSrc": "1177:1:1", + "nativeSrc": "1293:1:1", "nodeType": "YulLiteral", - "src": "1177:1:1", + "src": "1293:1:1", "type": "", "value": "0" }, "variables": [ { "name": "value", - "nativeSrc": "1168:5:1", + "nativeSrc": "1284:5:1", "nodeType": "YulTypedName", - "src": "1168:5:1", + "src": "1284:5:1", "type": "" } ] }, { - "nativeSrc": "1191:26:1", + "nativeSrc": "1307:26:1", "nodeType": "YulAssignment", - "src": "1191:26:1", + "src": "1307:26:1", "value": { "arguments": [ { "name": "src", - "nativeSrc": "1213:3:1", + "nativeSrc": "1329:3:1", "nodeType": "YulIdentifier", - "src": "1213:3:1" + "src": "1329:3:1" } ], "functionName": { "name": "calldataload", - "nativeSrc": "1200:12:1", + "nativeSrc": "1316:12:1", "nodeType": "YulIdentifier", - "src": "1200:12:1" + "src": "1316:12:1" }, - "nativeSrc": "1200:17:1", + "nativeSrc": "1316:17:1", "nodeType": "YulFunctionCall", - "src": "1200:17:1" + "src": "1316:17:1" }, "variableNames": [ { "name": "value", - "nativeSrc": "1191:5:1", + "nativeSrc": "1307:5:1", "nodeType": "YulIdentifier", - "src": "1191:5:1" + "src": "1307:5:1" } ] }, @@ -1217,68 +1183,68 @@ "arguments": [ { "name": "dst", - "nativeSrc": "1237:3:1", + "nativeSrc": "1353:3:1", "nodeType": "YulIdentifier", - "src": "1237:3:1" + "src": "1353:3:1" }, { "name": "value", - "nativeSrc": "1242:5:1", + "nativeSrc": "1358:5:1", "nodeType": "YulIdentifier", - "src": "1242:5:1" + "src": "1358:5:1" } ], "functionName": { "name": "mstore", - "nativeSrc": "1230:6:1", + "nativeSrc": "1346:6:1", "nodeType": "YulIdentifier", - "src": "1230:6:1" + "src": "1346:6:1" }, - "nativeSrc": "1230:18:1", + "nativeSrc": "1346:18:1", "nodeType": "YulFunctionCall", - "src": "1230:18:1" + "src": "1346:18:1" }, - "nativeSrc": "1230:18:1", + "nativeSrc": "1346:18:1", "nodeType": "YulExpressionStatement", - "src": "1230:18:1" + "src": "1346:18:1" }, { - "nativeSrc": "1261:19:1", + "nativeSrc": "1377:19:1", "nodeType": "YulAssignment", - "src": "1261:19:1", + "src": "1377:19:1", "value": { "arguments": [ { "name": "dst", - "nativeSrc": "1272:3:1", + "nativeSrc": "1388:3:1", "nodeType": "YulIdentifier", - "src": "1272:3:1" + "src": "1388:3:1" }, { "kind": "number", - "nativeSrc": "1277:2:1", + "nativeSrc": "1393:2:1", "nodeType": "YulLiteral", - "src": "1277:2:1", + "src": "1393:2:1", "type": "", "value": "32" } ], "functionName": { "name": "add", - "nativeSrc": "1268:3:1", + "nativeSrc": "1384:3:1", "nodeType": "YulIdentifier", - "src": "1268:3:1" + "src": "1384:3:1" }, - "nativeSrc": "1268:12:1", + "nativeSrc": "1384:12:1", "nodeType": "YulFunctionCall", - "src": "1268:12:1" + "src": "1384:12:1" }, "variableNames": [ { "name": "dst", - "nativeSrc": "1261:3:1", + "nativeSrc": "1377:3:1", "nodeType": "YulIdentifier", - "src": "1261:3:1" + "src": "1377:3:1" } ] } @@ -1288,178 +1254,178 @@ "arguments": [ { "name": "src", - "nativeSrc": "1105:3:1", + "nativeSrc": "1221:3:1", "nodeType": "YulIdentifier", - "src": "1105:3:1" + "src": "1221:3:1" }, { "name": "srcEnd", - "nativeSrc": "1110:6:1", + "nativeSrc": "1226:6:1", "nodeType": "YulIdentifier", - "src": "1110:6:1" + "src": "1226:6:1" } ], "functionName": { "name": "lt", - "nativeSrc": "1102:2:1", + "nativeSrc": "1218:2:1", "nodeType": "YulIdentifier", - "src": "1102:2:1" + "src": "1218:2:1" }, - "nativeSrc": "1102:15:1", + "nativeSrc": "1218:15:1", "nodeType": "YulFunctionCall", - "src": "1102:15:1" + "src": "1218:15:1" }, - "nativeSrc": "1094:196:1", + "nativeSrc": "1210:196:1", "nodeType": "YulForLoop", "post": { - "nativeSrc": "1118:23:1", + "nativeSrc": "1234:23:1", "nodeType": "YulBlock", - "src": "1118:23:1", + "src": "1234:23:1", "statements": [ { - "nativeSrc": "1120:19:1", + "nativeSrc": "1236:19:1", "nodeType": "YulAssignment", - "src": "1120:19:1", + "src": "1236:19:1", "value": { "arguments": [ { "name": "src", - "nativeSrc": "1131:3:1", + "nativeSrc": "1247:3:1", "nodeType": "YulIdentifier", - "src": "1131:3:1" + "src": "1247:3:1" }, { "kind": "number", - "nativeSrc": "1136:2:1", + "nativeSrc": "1252:2:1", "nodeType": "YulLiteral", - "src": "1136:2:1", + "src": "1252:2:1", "type": "", "value": "32" } ], "functionName": { "name": "add", - "nativeSrc": "1127:3:1", + "nativeSrc": "1243:3:1", "nodeType": "YulIdentifier", - "src": "1127:3:1" + "src": "1243:3:1" }, - "nativeSrc": "1127:12:1", + "nativeSrc": "1243:12:1", "nodeType": "YulFunctionCall", - "src": "1127:12:1" + "src": "1243:12:1" }, "variableNames": [ { "name": "src", - "nativeSrc": "1120:3:1", + "nativeSrc": "1236:3:1", "nodeType": "YulIdentifier", - "src": "1120:3:1" + "src": "1236:3:1" } ] } ] }, "pre": { - "nativeSrc": "1098:3:1", + "nativeSrc": "1214:3:1", "nodeType": "YulBlock", - "src": "1098:3:1", + "src": "1214:3:1", "statements": [] }, - "src": "1094:196:1" + "src": "1210:196:1" }, { - "nativeSrc": "1299:16:1", + "nativeSrc": "1415:16:1", "nodeType": "YulAssignment", - "src": "1299:16:1", + "src": "1415:16:1", "value": { "name": "memPtr", - "nativeSrc": "1309:6:1", + "nativeSrc": "1425:6:1", "nodeType": "YulIdentifier", - "src": "1309:6:1" + "src": "1425:6:1" }, "variableNames": [ { "name": "value0", - "nativeSrc": "1299:6:1", + "nativeSrc": "1415:6:1", "nodeType": "YulIdentifier", - "src": "1299:6:1" + "src": "1415:6:1" } ] } ] }, "name": "abi_decode_tuple_t_array$_t_uint256_$dyn_memory_ptr", - "nativeSrc": "146:1175:1", + "nativeSrc": "203:1234:1", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "headStart", - "nativeSrc": "207:9:1", + "nativeSrc": "264:9:1", "nodeType": "YulTypedName", - "src": "207:9:1", + "src": "264:9:1", "type": "" }, { "name": "dataEnd", - "nativeSrc": "218:7:1", + "nativeSrc": "275:7:1", "nodeType": "YulTypedName", - "src": "218:7:1", + "src": "275:7:1", "type": "" } ], "returnVariables": [ { "name": "value0", - "nativeSrc": "230:6:1", + "nativeSrc": "287:6:1", "nodeType": "YulTypedName", - "src": "230:6:1", + "src": "287:6:1", "type": "" } ], - "src": "146:1175:1" + "src": "203:1234:1" }, { "body": { - "nativeSrc": "1427:76:1", + "nativeSrc": "1543:76:1", "nodeType": "YulBlock", - "src": "1427:76:1", + "src": "1543:76:1", "statements": [ { - "nativeSrc": "1437:26:1", + "nativeSrc": "1553:26:1", "nodeType": "YulAssignment", - "src": "1437:26:1", + "src": "1553:26:1", "value": { "arguments": [ { "name": "headStart", - "nativeSrc": "1449:9:1", + "nativeSrc": "1565:9:1", "nodeType": "YulIdentifier", - "src": "1449:9:1" + "src": "1565:9:1" }, { "kind": "number", - "nativeSrc": "1460:2:1", + "nativeSrc": "1576:2:1", "nodeType": "YulLiteral", - "src": "1460:2:1", + "src": "1576:2:1", "type": "", "value": "32" } ], "functionName": { "name": "add", - "nativeSrc": "1445:3:1", + "nativeSrc": "1561:3:1", "nodeType": "YulIdentifier", - "src": "1445:3:1" + "src": "1561:3:1" }, - "nativeSrc": "1445:18:1", + "nativeSrc": "1561:18:1", "nodeType": "YulFunctionCall", - "src": "1445:18:1" + "src": "1561:18:1" }, "variableNames": [ { "name": "tail", - "nativeSrc": "1437:4:1", + "nativeSrc": "1553:4:1", "nodeType": "YulIdentifier", - "src": "1437:4:1" + "src": "1553:4:1" } ] }, @@ -1468,62 +1434,62 @@ "arguments": [ { "name": "headStart", - "nativeSrc": "1479:9:1", + "nativeSrc": "1595:9:1", "nodeType": "YulIdentifier", - "src": "1479:9:1" + "src": "1595:9:1" }, { "name": "value0", - "nativeSrc": "1490:6:1", + "nativeSrc": "1606:6:1", "nodeType": "YulIdentifier", - "src": "1490:6:1" + "src": "1606:6:1" } ], "functionName": { "name": "mstore", - "nativeSrc": "1472:6:1", + "nativeSrc": "1588:6:1", "nodeType": "YulIdentifier", - "src": "1472:6:1" + "src": "1588:6:1" }, - "nativeSrc": "1472:25:1", + "nativeSrc": "1588:25:1", "nodeType": "YulFunctionCall", - "src": "1472:25:1" + "src": "1588:25:1" }, - "nativeSrc": "1472:25:1", + "nativeSrc": "1588:25:1", "nodeType": "YulExpressionStatement", - "src": "1472:25:1" + "src": "1588:25:1" } ] }, "name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed", - "nativeSrc": "1326:177:1", + "nativeSrc": "1442:177:1", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "headStart", - "nativeSrc": "1396:9:1", + "nativeSrc": "1512:9:1", "nodeType": "YulTypedName", - "src": "1396:9:1", + "src": "1512:9:1", "type": "" }, { "name": "value0", - "nativeSrc": "1407:6:1", + "nativeSrc": "1523:6:1", "nodeType": "YulTypedName", - "src": "1407:6:1", + "src": "1523:6:1", "type": "" } ], "returnVariables": [ { "name": "tail", - "nativeSrc": "1418:4:1", + "nativeSrc": "1534:4:1", "nodeType": "YulTypedName", - "src": "1418:4:1", + "src": "1534:4:1", "type": "" } ], - "src": "1326:177:1" + "src": "1442:177:1" } ] }, @@ -1531,7 +1497,7 @@ { } function panic_error_0x41() { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x41) revert(0, 0x24) } @@ -1546,7 +1512,7 @@ if gt(length, 0xffffffffffffffff) { panic_error_0x41() } let _2 := shl(5, length) let memPtr := mload(64) - let newFreePtr := add(memPtr, and(add(_2, 63), not(31))) + let newFreePtr := add(memPtr, and(add(_2, 63), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0)) if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } mstore(64, newFreePtr) let dst := memPtr diff --git a/test/cmdlineTests/standard_output_debuginfo_ethdebug_compatible/output.json b/test/cmdlineTests/standard_output_debuginfo_ethdebug_compatible/output.json index 8f198f1f3adb..7fcec50c2c75 100644 --- a/test/cmdlineTests/standard_output_debuginfo_ethdebug_compatible/output.json +++ b/test/cmdlineTests/standard_output_debuginfo_ethdebug_compatible/output.json @@ -268,7 +268,7 @@ object \"A1_14\" { } function panic_error_0x01() { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x01) revert(0, 0x24) } @@ -562,7 +562,7 @@ object \"A2_27\" { } function panic_error_0x01() { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x01) revert(0, 0x24) } @@ -858,7 +858,7 @@ object \"A1_42\" { } function panic_error_0x01() { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x01) revert(0, 0x24) } @@ -1152,7 +1152,7 @@ object \"B2_55\" { } function panic_error_0x01() { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x01) revert(0, 0x24) } diff --git a/test/cmdlineTests/standard_output_selection_ethdebug_bytecode_and_deployedbytecode_iroptimized/output.json b/test/cmdlineTests/standard_output_selection_ethdebug_bytecode_and_deployedbytecode_iroptimized/output.json index b129a0c91b85..89f96fe4f82f 100644 --- a/test/cmdlineTests/standard_output_selection_ethdebug_bytecode_and_deployedbytecode_iroptimized/output.json +++ b/test/cmdlineTests/standard_output_selection_ethdebug_bytecode_and_deployedbytecode_iroptimized/output.json @@ -99,7 +99,7 @@ object \"A1_14\" { } function panic_error_0x01() { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x01) revert(0, 0x24) } @@ -224,7 +224,7 @@ object \"A2_27\" { } function panic_error_0x01() { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x01) revert(0, 0x24) } @@ -351,7 +351,7 @@ object \"A1_42\" { } function panic_error_0x01() { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x01) revert(0, 0x24) } @@ -476,7 +476,7 @@ object \"B2_55\" { } function panic_error_0x01() { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x01) revert(0, 0x24) } diff --git a/test/cmdlineTests/standard_output_selection_ethdebug_bytecode_iroptimized/output.json b/test/cmdlineTests/standard_output_selection_ethdebug_bytecode_iroptimized/output.json index eab40879c4c5..239f71b7154c 100644 --- a/test/cmdlineTests/standard_output_selection_ethdebug_bytecode_iroptimized/output.json +++ b/test/cmdlineTests/standard_output_selection_ethdebug_bytecode_iroptimized/output.json @@ -96,7 +96,7 @@ object \"A1_14\" { } function panic_error_0x01() { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x01) revert(0, 0x24) } @@ -218,7 +218,7 @@ object \"A2_27\" { } function panic_error_0x01() { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x01) revert(0, 0x24) } @@ -342,7 +342,7 @@ object \"A1_42\" { } function panic_error_0x01() { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x01) revert(0, 0x24) } @@ -464,7 +464,7 @@ object \"B2_55\" { } function panic_error_0x01() { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x01) revert(0, 0x24) } diff --git a/test/cmdlineTests/standard_output_selection_ethdebug_deployedbytecode_iroptimized/output.json b/test/cmdlineTests/standard_output_selection_ethdebug_deployedbytecode_iroptimized/output.json index 4f3bd68eed09..031d75cd1d03 100644 --- a/test/cmdlineTests/standard_output_selection_ethdebug_deployedbytecode_iroptimized/output.json +++ b/test/cmdlineTests/standard_output_selection_ethdebug_deployedbytecode_iroptimized/output.json @@ -96,7 +96,7 @@ object \"A1_14\" { } function panic_error_0x01() { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x01) revert(0, 0x24) } @@ -218,7 +218,7 @@ object \"A2_27\" { } function panic_error_0x01() { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x01) revert(0, 0x24) } @@ -342,7 +342,7 @@ object \"A1_42\" { } function panic_error_0x01() { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x01) revert(0, 0x24) } @@ -464,7 +464,7 @@ object \"B2_55\" { } function panic_error_0x01() { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x01) revert(0, 0x24) } diff --git a/test/cmdlineTests/standard_output_selection_ethdebug_iroptimized/output.json b/test/cmdlineTests/standard_output_selection_ethdebug_iroptimized/output.json index eab40879c4c5..239f71b7154c 100644 --- a/test/cmdlineTests/standard_output_selection_ethdebug_iroptimized/output.json +++ b/test/cmdlineTests/standard_output_selection_ethdebug_iroptimized/output.json @@ -96,7 +96,7 @@ object \"A1_14\" { } function panic_error_0x01() { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x01) revert(0, 0x24) } @@ -218,7 +218,7 @@ object \"A2_27\" { } function panic_error_0x01() { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x01) revert(0, 0x24) } @@ -342,7 +342,7 @@ object \"A1_42\" { } function panic_error_0x01() { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x01) revert(0, 0x24) } @@ -464,7 +464,7 @@ object \"B2_55\" { } function panic_error_0x01() { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x01) revert(0, 0x24) } diff --git a/test/cmdlineTests/standard_yul_cfg_json_export/output.json b/test/cmdlineTests/standard_yul_cfg_json_export/output.json index d457c56a3f50..861dc4138fcd 100644 --- a/test/cmdlineTests/standard_yul_cfg_json_export/output.json +++ b/test/cmdlineTests/standard_yul_cfg_json_export/output.json @@ -301,7 +301,7 @@ }, { "exit": { - "cond": "v20", + "cond": "v19", "targets": [ "Block9", "Block8" @@ -310,40 +310,31 @@ }, "id": "Block6", "instructions": [ - { - "in": [ - "0x03" - ], - "op": "not", - "out": [ - "v17" - ] - }, { "in": [], "op": "calldatasize", "out": [ - "v18" + "v17" ] }, { "in": [ - "v17", - "v18" + "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc", + "v17" ], "op": "add", "out": [ - "v19" + "v18" ] }, { "in": [ "0x00", - "v19" + "v18" ], "op": "slt", "out": [ - "v20" + "v19" ] } ], @@ -765,7 +756,7 @@ }, { "exit": { - "cond": "v20", + "cond": "v19", "targets": [ "Block9", "Block8" @@ -774,40 +765,31 @@ }, "id": "Block6", "instructions": [ - { - "in": [ - "0x03" - ], - "op": "not", - "out": [ - "v17" - ] - }, { "in": [], "op": "calldatasize", "out": [ - "v18" + "v17" ] }, { "in": [ - "v17", - "v18" + "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc", + "v17" ], "op": "add", "out": [ - "v19" + "v18" ] }, { "in": [ "0x00", - "v19" + "v18" ], "op": "slt", "out": [ - "v20" + "v19" ] } ], @@ -841,7 +823,7 @@ }, { "exit": { - "cond": "v36", + "cond": "v35", "targets": [ "Block12", "Block11" @@ -857,47 +839,47 @@ ], "op": "datasize", "out": [ - "v23" + "v22" ] }, { "in": [ - "v23", + "v22", "v0" ], "op": "add", "out": [ - "v32" + "v31" ] }, { "in": [ "v0", - "v32" + "v31" ], "op": "lt", "out": [ - "v33" + "v32" ] }, { "in": [ "0xffffffffffffffff", - "v32" + "v31" ], "op": "gt", "out": [ - "v35" + "v34" ] }, { "in": [ - "v33", - "v35" + "v32", + "v34" ], "op": "or", "out": [ - "v36" + "v35" ] } ], @@ -907,8 +889,8 @@ ], "out": [ "v0", - "v32", - "v23" + "v31", + "v22" ] }, "type": "BuiltinCall" @@ -933,7 +915,7 @@ }, { "exit": { - "cond": "v61", + "cond": "v59", "targets": [ "Block15", "Block14" @@ -949,13 +931,13 @@ ], "op": "dataoffset", "out": [ - "v49" + "v47" ] }, { "in": [ - "v23", - "v49", + "v22", + "v47", "v0" ], "op": "datacopy", @@ -964,42 +946,42 @@ { "in": [ "v0", - "v32" + "v31" ], "op": "sub", "out": [ - "v59" + "v57" ] }, { "in": [ - "v59", + "v57", "v0", "0x00" ], "op": "create", "out": [ - "v60" + "v58" ] }, { "in": [ - "v60" + "v58" ], "op": "iszero", "out": [ - "v61" + "v59" ] } ], "liveness": { "in": [ "v0", - "v32", - "v23" + "v31", + "v22" ], "out": [ - "v60" + "v58" ] }, "type": "BuiltinCall" @@ -1024,7 +1006,7 @@ }, { "exit": { - "cond": "v85", + "cond": "v78", "targets": [ "Block18", "Block17" @@ -1039,95 +1021,65 @@ ], "op": "mload", "out": [ - "v68" + "v66" ] }, { "in": [ - "0x026121ff", - "0xe4" - ], - "op": "shl", - "out": [ - "v71" - ] - }, - { - "in": [ - "v71", - "v68" + "0x26121ff000000000000000000000000000000000000000000000000000000000", + "v66" ], "op": "mstore", "out": [] }, { "in": [ - "0x01", - "0xa0" - ], - "op": "shl", - "out": [ - "v76" - ] - }, - { - "in": [ - "0x01", - "v76" - ], - "op": "sub", - "out": [ - "v77" - ] - }, - { - "in": [ - "v77", - "v60" + "0xffffffffffffffffffffffffffffffffffffffff", + "v58" ], "op": "and", "out": [ - "v82" + "v75" ] }, { "in": [], "op": "gas", "out": [ - "v83" + "v76" ] }, { "in": [ "0x20", - "v68", + "v66", "0x04", - "v68", - "v82", - "v83" + "v66", + "v75", + "v76" ], "op": "staticcall", "out": [ - "v84" + "v77" ] }, { "in": [ - "v84" + "v77" ], "op": "iszero", "out": [ - "v85" + "v78" ] } ], "liveness": { "in": [ - "v60" + "v58" ], "out": [ - "v68", - "v84" + "v66", + "v77" ] }, "type": "BuiltinCall" @@ -1152,7 +1104,7 @@ }, { "exit": { - "cond": "v84", + "cond": "v77", "targets": [ "Block21", "Block20" @@ -1163,11 +1115,11 @@ "instructions": [], "liveness": { "in": [ - "v68", - "v84" + "v66", + "v77" ], "out": [ - "v68" + "v66" ] } }, @@ -1202,11 +1154,11 @@ { "in": [ "0x00", - "v144" + "v136" ], "op": "PhiFunction", "out": [ - "phi146" + "phi138" ] }, { @@ -1215,13 +1167,13 @@ ], "op": "mload", "out": [ - "v145" + "v137" ] }, { "in": [ - "phi146", - "v145" + "phi138", + "v137" ], "op": "mstore", "out": [] @@ -1229,7 +1181,7 @@ { "in": [ "0x20", - "v145" + "v137" ], "op": "return", "out": [] @@ -1237,7 +1189,7 @@ ], "liveness": { "in": [ - "phi146" + "phi138" ], "out": [] }, @@ -1245,7 +1197,7 @@ }, { "exit": { - "cond": "v97", + "cond": "v90", "targets": [ "Block23", "Block22" @@ -1258,26 +1210,26 @@ "in": [], "op": "returndatasize", "out": [ - "v96" + "v89" ] }, { "in": [ - "v96", + "v89", "0x20" ], "op": "gt", "out": [ - "v97" + "v90" ] } ], "liveness": { "in": [ - "v68" + "v66" ], "out": [ - "v68" + "v66" ] }, "type": "BuiltinCall" @@ -1288,7 +1240,7 @@ "Block22" ], "exit": { - "cond": "v116", + "cond": "v109", "targets": [ "Block25", "Block24" @@ -1300,92 +1252,83 @@ { "in": [ "0x20", - "v98" + "v91" ], "op": "PhiFunction", "out": [ - "phi101" - ] - }, - { - "in": [ - "0x1f" - ], - "op": "not", - "out": [ - "v100" + "phi94" ] }, { "in": [ "0x1f", - "phi101" + "phi94" ], "op": "add", "out": [ - "v104" + "v97" ] }, { "in": [ - "v100", - "v104" + "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0", + "v97" ], "op": "and", "out": [ - "v105" + "v98" ] }, { "in": [ - "v105", - "v68" + "v98", + "v66" ], "op": "add", "out": [ - "v113" + "v106" ] }, { "in": [ - "v68", - "v113" + "v66", + "v106" ], "op": "lt", "out": [ - "v114" + "v107" ] }, { "in": [ "0xffffffffffffffff", - "v113" + "v106" ], "op": "gt", "out": [ - "v115" + "v108" ] }, { "in": [ - "v114", - "v115" + "v107", + "v108" ], "op": "or", "out": [ - "v116" + "v109" ] } ], "liveness": { "in": [ - "v68", - "phi101" + "v66", + "phi94" ], "out": [ - "v68", - "phi101", - "v113" + "v66", + "phi94", + "v106" ] }, "type": "BuiltinCall" @@ -1403,24 +1346,24 @@ "in": [], "op": "returndatasize", "out": [ - "v98" + "v91" ] } ], "liveness": { "in": [ - "v68" + "v66" ], "out": [ - "v98", - "v68" + "v91", + "v66" ] }, "type": "BuiltinCall" }, { "exit": { - "cond": "v137", + "cond": "v129", "targets": [ "Block28", "Block27" @@ -1431,7 +1374,7 @@ "instructions": [ { "in": [ - "v113", + "v106", "0x40" ], "op": "mstore", @@ -1439,43 +1382,43 @@ }, { "in": [ - "phi101", - "v68" + "phi94", + "v66" ], "op": "add", "out": [ - "v135" + "v127" ] }, { "in": [ - "v68", - "v135" + "v66", + "v127" ], "op": "sub", "out": [ - "v136" + "v128" ] }, { "in": [ "0x20", - "v136" + "v128" ], "op": "slt", "out": [ - "v137" + "v129" ] } ], "liveness": { "in": [ - "v68", - "phi101", - "v113" + "v66", + "phi94", + "v106" ], "out": [ - "v68" + "v66" ] }, "type": "BuiltinCall" @@ -1509,20 +1452,20 @@ "instructions": [ { "in": [ - "v68" + "v66" ], "op": "mload", "out": [ - "v144" + "v136" ] } ], "liveness": { "in": [ - "v68" + "v66" ], "out": [ - "v144" + "v136" ] }, "type": "BuiltinCall" @@ -1558,17 +1501,7 @@ "instructions": [ { "in": [ - "0x4e487b71", - "0xe0" - ], - "op": "shl", - "out": [ - "v2" - ] - }, - { - "in": [ - "v2", + "0x4e487b7100000000000000000000000000000000000000000000000000000000", "0x00" ], "op": "mstore", @@ -1993,7 +1926,7 @@ }, { "exit": { - "cond": "v20", + "cond": "v19", "targets": [ "Block9", "Block8" @@ -2002,40 +1935,31 @@ }, "id": "Block6", "instructions": [ - { - "in": [ - "0x03" - ], - "op": "not", - "out": [ - "v17" - ] - }, { "in": [], "op": "calldatasize", "out": [ - "v18" + "v17" ] }, { "in": [ - "v17", - "v18" + "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc", + "v17" ], "op": "add", "out": [ - "v19" + "v18" ] }, { "in": [ "0x00", - "v19" + "v18" ], "op": "slt", "out": [ - "v20" + "v19" ] } ], diff --git a/test/cmdlineTests/storage_layout_specifier_smoke/output b/test/cmdlineTests/storage_layout_specifier_smoke/output index d1c54c99b7d0..64f94f0aff7c 100644 --- a/test/cmdlineTests/storage_layout_specifier_smoke/output +++ b/test/cmdlineTests/storage_layout_specifier_smoke/output @@ -65,9 +65,7 @@ sub_0: assembly { iszero tag_11 jumpi - 0x4e487b71 - 0xe0 - shl + shl(0xe0, 0x4e487b71) 0x00 mstore 0x11 diff --git a/test/cmdlineTests/storage_transient_storage_collision_ir_output/output b/test/cmdlineTests/storage_transient_storage_collision_ir_output/output index dd8abeb333b0..13d09d2ba434 100644 --- a/test/cmdlineTests/storage_transient_storage_collision_ir_output/output +++ b/test/cmdlineTests/storage_transient_storage_collision_ir_output/output @@ -21,7 +21,7 @@ object "C_25" { { newValue := shl(0, value) } function update_byte_slice_shift(value, toInsert) -> result { - let mask := not(0) + let mask := 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff toInsert := shift_left(toInsert) value := and(value, not(mask)) result := or(value, and(toInsert, mask)) @@ -148,7 +148,7 @@ object "C_25" { { newValue := shl(0, value) } function update_byte_slice_shift(value, toInsert) -> result { - let mask := not(0) + let mask := 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff toInsert := shift_left(toInsert) value := and(value, not(mask)) result := or(value, and(toInsert, mask)) @@ -169,7 +169,7 @@ object "C_25" { function update_byte_slice_dynamic32(value, shiftBytes, toInsert) -> result { let shiftBits := mul(shiftBytes, 8) - let mask := shift_left_dynamic(shiftBits, not(0)) + let mask := shift_left_dynamic(shiftBits, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) toInsert := shift_left_dynamic(shiftBits, toInsert) value := and(value, not(mask)) result := or(value, and(toInsert, mask)) diff --git a/test/cmdlineTests/strict_asm_yul_cfg_json_export/output b/test/cmdlineTests/strict_asm_yul_cfg_json_export/output index 8ec19f13b241..ae87472e4500 100644 --- a/test/cmdlineTests/strict_asm_yul_cfg_json_export/output +++ b/test/cmdlineTests/strict_asm_yul_cfg_json_export/output @@ -301,7 +301,7 @@ Yul Control Flow Graph: }, { "exit": { - "cond": "v20", + "cond": "v19", "targets": [ "Block9", "Block8" @@ -310,40 +310,31 @@ Yul Control Flow Graph: }, "id": "Block6", "instructions": [ - { - "in": [ - "0x03" - ], - "op": "not", - "out": [ - "v17" - ] - }, { "in": [], "op": "calldatasize", "out": [ - "v18" + "v17" ] }, { "in": [ - "v17", - "v18" + "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc", + "v17" ], "op": "add", "out": [ - "v19" + "v18" ] }, { "in": [ "0x00", - "v19" + "v18" ], "op": "slt", "out": [ - "v20" + "v19" ] } ], diff --git a/test/cmdlineTests/viair_subobject_optimization/output b/test/cmdlineTests/viair_subobject_optimization/output index 523cff79e0fa..8f65746ab13b 100644 --- a/test/cmdlineTests/viair_subobject_optimization/output +++ b/test/cmdlineTests/viair_subobject_optimization/output @@ -4,26 +4,25 @@ EVM assembly: /* "input.sol":61:668 contract C {... */ 0x80 jumpi(tag_7, callvalue) - 0x1f bytecodeSize + dup1 codesize - dup2 - swap1 sub - swap2 - dup3 - add + swap1 not(0x1f) + 0x1f + dup4 + add and dup4 add swap2 - sub(shl(0x40, 0x01), 0x01) dup4 - gt - dup5 - dup5 + dup4 lt + sub(shl(0x40, 0x01), 0x01) + dup5 + gt or tag_3 jumpi @@ -116,25 +115,25 @@ sub_0: assembly { revert tag_3: jumpi(tag_7, callvalue) - jumpi(tag_7, slt(add(not(0x03), calldatasize), 0x00)) + jumpi(tag_7, slt(add(calldatasize, not(0x03)), 0x00)) /* "input.sol":745:765 type(C).creationCode */ dataSize(sub_0) - swap1 /* "input.sol":669:772 contract D {... */ + swap1 + not(0x1f) 0x3f - dup3 + dup4 add - not(0x1f) and dup2 add swap1 - 0xffffffffffffffff + dup1 dup3 - gt - dup2 - dup4 lt + 0xffffffffffffffff + dup4 + gt or tag_9 jumpi @@ -153,16 +152,18 @@ sub_0: assembly { dataOffset(sub_0) dup5 codecopy + not(0x1f) /* "input.sol":669:772 contract D {... */ - dup2 - mload - swap3 + 0x1f dup4 - swap2 + mload + swap5 + dup6 + swap4 /* "input.sol":745:765 type(C).creationCode */ 0x20 /* "input.sol":669:772 contract D {... */ - dup4 + dup6 mstore mload dup1 @@ -171,23 +172,21 @@ sub_0: assembly { /* "input.sol":745:765 type(C).creationCode */ 0x20 /* "input.sol":669:772 contract D {... */ - dup6 + dup8 add mstore - dup5 - dup5 + dup7 + dup7 add mcopy 0x00 + dup6 dup3 - dup3 + dup7 add - dup5 add mstore - 0x1f add - not(0x1f) and dup2 add @@ -209,26 +208,25 @@ sub_0: assembly { /* "input.sol":61:668 contract C {... */ 0x80 jumpi(tag_7, callvalue) - 0x1f bytecodeSize + dup1 codesize - dup2 - swap1 sub - swap2 - dup3 - add + swap1 not(0x1f) + 0x1f + dup4 + add and dup4 add swap2 - sub(shl(0x40, 0x01), 0x01) dup4 - gt - dup5 - dup5 + dup4 lt + sub(shl(0x40, 0x01), 0x01) + dup5 + gt or tag_3 jumpi diff --git a/test/cmdlineTests/viair_subobjects/output b/test/cmdlineTests/viair_subobjects/output index 783756e67681..74b3637bc10f 100644 --- a/test/cmdlineTests/viair_subobjects/output +++ b/test/cmdlineTests/viair_subobjects/output @@ -62,14 +62,14 @@ object "D_16" { if eq(0x26121ff0, shr(224, calldataload(0))) { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } /// @src 0:149:156 "new C()" let _2 := datasize("C_3") let _3 := add(_1, _2) if or(gt(_3, 0xffffffffffffffff), lt(_3, _1)) { /// @src 0:96:165 "contract D {..." - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x41) revert(0, 0x24) } diff --git a/test/cmdlineTests/yul_cfg_json_export/output b/test/cmdlineTests/yul_cfg_json_export/output index 08d7bb6dd9d9..f2835372b717 100644 --- a/test/cmdlineTests/yul_cfg_json_export/output +++ b/test/cmdlineTests/yul_cfg_json_export/output @@ -300,7 +300,7 @@ Yul Control Flow Graph: }, { "exit": { - "cond": "v20", + "cond": "v19", "targets": [ "Block9", "Block8" @@ -309,40 +309,31 @@ Yul Control Flow Graph: }, "id": "Block6", "instructions": [ - { - "in": [ - "0x03" - ], - "op": "not", - "out": [ - "v17" - ] - }, { "in": [], "op": "calldatasize", "out": [ - "v18" + "v17" ] }, { "in": [ - "v17", - "v18" + "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc", + "v17" ], "op": "add", "out": [ - "v19" + "v18" ] }, { "in": [ "0x00", - "v19" + "v18" ], "op": "slt", "out": [ - "v20" + "v19" ] } ], @@ -765,7 +756,7 @@ Yul Control Flow Graph: }, { "exit": { - "cond": "v20", + "cond": "v19", "targets": [ "Block9", "Block8" @@ -774,40 +765,31 @@ Yul Control Flow Graph: }, "id": "Block6", "instructions": [ - { - "in": [ - "0x03" - ], - "op": "not", - "out": [ - "v17" - ] - }, { "in": [], "op": "calldatasize", "out": [ - "v18" + "v17" ] }, { "in": [ - "v17", - "v18" + "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc", + "v17" ], "op": "add", "out": [ - "v19" + "v18" ] }, { "in": [ "0x00", - "v19" + "v18" ], "op": "slt", "out": [ - "v20" + "v19" ] } ], @@ -841,7 +823,7 @@ Yul Control Flow Graph: }, { "exit": { - "cond": "v36", + "cond": "v35", "targets": [ "Block12", "Block11" @@ -857,47 +839,47 @@ Yul Control Flow Graph: ], "op": "datasize", "out": [ - "v23" + "v22" ] }, { "in": [ - "v23", + "v22", "v0" ], "op": "add", "out": [ - "v32" + "v31" ] }, { "in": [ "v0", - "v32" + "v31" ], "op": "lt", "out": [ - "v33" + "v32" ] }, { "in": [ "0xffffffffffffffff", - "v32" + "v31" ], "op": "gt", "out": [ - "v35" + "v34" ] }, { "in": [ - "v33", - "v35" + "v32", + "v34" ], "op": "or", "out": [ - "v36" + "v35" ] } ], @@ -907,8 +889,8 @@ Yul Control Flow Graph: ], "out": [ "v0", - "v32", - "v23" + "v31", + "v22" ] }, "type": "BuiltinCall" @@ -933,7 +915,7 @@ Yul Control Flow Graph: }, { "exit": { - "cond": "v61", + "cond": "v59", "targets": [ "Block15", "Block14" @@ -949,13 +931,13 @@ Yul Control Flow Graph: ], "op": "dataoffset", "out": [ - "v49" + "v47" ] }, { "in": [ - "v23", - "v49", + "v22", + "v47", "v0" ], "op": "datacopy", @@ -964,42 +946,42 @@ Yul Control Flow Graph: { "in": [ "v0", - "v32" + "v31" ], "op": "sub", "out": [ - "v59" + "v57" ] }, { "in": [ - "v59", + "v57", "v0", "0x00" ], "op": "create", "out": [ - "v60" + "v58" ] }, { "in": [ - "v60" + "v58" ], "op": "iszero", "out": [ - "v61" + "v59" ] } ], "liveness": { "in": [ "v0", - "v32", - "v23" + "v31", + "v22" ], "out": [ - "v60" + "v58" ] }, "type": "BuiltinCall" @@ -1024,7 +1006,7 @@ Yul Control Flow Graph: }, { "exit": { - "cond": "v85", + "cond": "v78", "targets": [ "Block18", "Block17" @@ -1039,95 +1021,65 @@ Yul Control Flow Graph: ], "op": "mload", "out": [ - "v68" + "v66" ] }, { "in": [ - "0x026121ff", - "0xe4" - ], - "op": "shl", - "out": [ - "v71" - ] - }, - { - "in": [ - "v71", - "v68" + "0x26121ff000000000000000000000000000000000000000000000000000000000", + "v66" ], "op": "mstore", "out": [] }, { "in": [ - "0x01", - "0xa0" - ], - "op": "shl", - "out": [ - "v76" - ] - }, - { - "in": [ - "0x01", - "v76" - ], - "op": "sub", - "out": [ - "v77" - ] - }, - { - "in": [ - "v77", - "v60" + "0xffffffffffffffffffffffffffffffffffffffff", + "v58" ], "op": "and", "out": [ - "v82" + "v75" ] }, { "in": [], "op": "gas", "out": [ - "v83" + "v76" ] }, { "in": [ "0x20", - "v68", + "v66", "0x04", - "v68", - "v82", - "v83" + "v66", + "v75", + "v76" ], "op": "staticcall", "out": [ - "v84" + "v77" ] }, { "in": [ - "v84" + "v77" ], "op": "iszero", "out": [ - "v85" + "v78" ] } ], "liveness": { "in": [ - "v60" + "v58" ], "out": [ - "v68", - "v84" + "v66", + "v77" ] }, "type": "BuiltinCall" @@ -1152,7 +1104,7 @@ Yul Control Flow Graph: }, { "exit": { - "cond": "v84", + "cond": "v77", "targets": [ "Block21", "Block20" @@ -1163,11 +1115,11 @@ Yul Control Flow Graph: "instructions": [], "liveness": { "in": [ - "v68", - "v84" + "v66", + "v77" ], "out": [ - "v68" + "v66" ] } }, @@ -1202,11 +1154,11 @@ Yul Control Flow Graph: { "in": [ "0x00", - "v144" + "v136" ], "op": "PhiFunction", "out": [ - "phi146" + "phi138" ] }, { @@ -1215,13 +1167,13 @@ Yul Control Flow Graph: ], "op": "mload", "out": [ - "v145" + "v137" ] }, { "in": [ - "phi146", - "v145" + "phi138", + "v137" ], "op": "mstore", "out": [] @@ -1229,7 +1181,7 @@ Yul Control Flow Graph: { "in": [ "0x20", - "v145" + "v137" ], "op": "return", "out": [] @@ -1237,7 +1189,7 @@ Yul Control Flow Graph: ], "liveness": { "in": [ - "phi146" + "phi138" ], "out": [] }, @@ -1245,7 +1197,7 @@ Yul Control Flow Graph: }, { "exit": { - "cond": "v97", + "cond": "v90", "targets": [ "Block23", "Block22" @@ -1258,26 +1210,26 @@ Yul Control Flow Graph: "in": [], "op": "returndatasize", "out": [ - "v96" + "v89" ] }, { "in": [ - "v96", + "v89", "0x20" ], "op": "gt", "out": [ - "v97" + "v90" ] } ], "liveness": { "in": [ - "v68" + "v66" ], "out": [ - "v68" + "v66" ] }, "type": "BuiltinCall" @@ -1288,7 +1240,7 @@ Yul Control Flow Graph: "Block22" ], "exit": { - "cond": "v116", + "cond": "v109", "targets": [ "Block25", "Block24" @@ -1300,92 +1252,83 @@ Yul Control Flow Graph: { "in": [ "0x20", - "v98" + "v91" ], "op": "PhiFunction", "out": [ - "phi101" - ] - }, - { - "in": [ - "0x1f" - ], - "op": "not", - "out": [ - "v100" + "phi94" ] }, { "in": [ "0x1f", - "phi101" + "phi94" ], "op": "add", "out": [ - "v104" + "v97" ] }, { "in": [ - "v100", - "v104" + "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0", + "v97" ], "op": "and", "out": [ - "v105" + "v98" ] }, { "in": [ - "v105", - "v68" + "v98", + "v66" ], "op": "add", "out": [ - "v113" + "v106" ] }, { "in": [ - "v68", - "v113" + "v66", + "v106" ], "op": "lt", "out": [ - "v114" + "v107" ] }, { "in": [ "0xffffffffffffffff", - "v113" + "v106" ], "op": "gt", "out": [ - "v115" + "v108" ] }, { "in": [ - "v114", - "v115" + "v107", + "v108" ], "op": "or", "out": [ - "v116" + "v109" ] } ], "liveness": { "in": [ - "v68", - "phi101" + "v66", + "phi94" ], "out": [ - "v68", - "phi101", - "v113" + "v66", + "phi94", + "v106" ] }, "type": "BuiltinCall" @@ -1403,24 +1346,24 @@ Yul Control Flow Graph: "in": [], "op": "returndatasize", "out": [ - "v98" + "v91" ] } ], "liveness": { "in": [ - "v68" + "v66" ], "out": [ - "v98", - "v68" + "v91", + "v66" ] }, "type": "BuiltinCall" }, { "exit": { - "cond": "v137", + "cond": "v129", "targets": [ "Block28", "Block27" @@ -1431,7 +1374,7 @@ Yul Control Flow Graph: "instructions": [ { "in": [ - "v113", + "v106", "0x40" ], "op": "mstore", @@ -1439,43 +1382,43 @@ Yul Control Flow Graph: }, { "in": [ - "phi101", - "v68" + "phi94", + "v66" ], "op": "add", "out": [ - "v135" + "v127" ] }, { "in": [ - "v68", - "v135" + "v66", + "v127" ], "op": "sub", "out": [ - "v136" + "v128" ] }, { "in": [ "0x20", - "v136" + "v128" ], "op": "slt", "out": [ - "v137" + "v129" ] } ], "liveness": { "in": [ - "v68", - "phi101", - "v113" + "v66", + "phi94", + "v106" ], "out": [ - "v68" + "v66" ] }, "type": "BuiltinCall" @@ -1509,20 +1452,20 @@ Yul Control Flow Graph: "instructions": [ { "in": [ - "v68" + "v66" ], "op": "mload", "out": [ - "v144" + "v136" ] } ], "liveness": { "in": [ - "v68" + "v66" ], "out": [ - "v144" + "v136" ] }, "type": "BuiltinCall" @@ -1558,17 +1501,7 @@ Yul Control Flow Graph: "instructions": [ { "in": [ - "0x4e487b71", - "0xe0" - ], - "op": "shl", - "out": [ - "v2" - ] - }, - { - "in": [ - "v2", + "0x4e487b7100000000000000000000000000000000000000000000000000000000", "0x00" ], "op": "mstore", @@ -1993,7 +1926,7 @@ Yul Control Flow Graph: }, { "exit": { - "cond": "v20", + "cond": "v19", "targets": [ "Block9", "Block8" @@ -2002,40 +1935,31 @@ Yul Control Flow Graph: }, "id": "Block6", "instructions": [ - { - "in": [ - "0x03" - ], - "op": "not", - "out": [ - "v17" - ] - }, { "in": [], "op": "calldatasize", "out": [ - "v18" + "v17" ] }, { "in": [ - "v17", - "v18" + "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc", + "v17" ], "op": "add", "out": [ - "v19" + "v18" ] }, { "in": [ "0x00", - "v19" + "v18" ], "op": "slt", "out": [ - "v20" + "v19" ] } ], diff --git a/test/cmdlineTests/yul_optimizer_erc7201_literal_comptime_evaluation/output b/test/cmdlineTests/yul_optimizer_erc7201_literal_comptime_evaluation/output index c25f058ddf00..70975f843635 100644 --- a/test/cmdlineTests/yul_optimizer_erc7201_literal_comptime_evaluation/output +++ b/test/cmdlineTests/yul_optimizer_erc7201_literal_comptime_evaluation/output @@ -22,7 +22,7 @@ object "C_12" { if eq(0x26121ff0, shr(224, calldataload(0))) { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } mstore(_1, 0x183a6125c38840424c4a85fa12bab2ab606c4b6d0e7cc73c0c06ba5300eab500) return(_1, 32) } diff --git a/test/cmdlineTests/yul_optimizer_erc7201_param_calldata/output b/test/cmdlineTests/yul_optimizer_erc7201_param_calldata/output index 4ab15b8483a0..f5d7787c390e 100644 --- a/test/cmdlineTests/yul_optimizer_erc7201_param_calldata/output +++ b/test/cmdlineTests/yul_optimizer_erc7201_param_calldata/output @@ -21,7 +21,7 @@ object "C_14" { if eq(0x91e145ef, shr(224, calldataload(0))) { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 32) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 32) { revert(0, 0) } let offset := calldataload(4) if gt(offset, 0xffffffffffffffff) { revert(0, 0) } if iszero(slt(add(offset, 35), calldatasize())) { revert(0, 0) } @@ -31,10 +31,10 @@ object "C_14" { let _3 := gt(add(add(offset, length), 36), calldatasize()) if _3 { revert(0, 0) } _2 := 0 - let newFreePtr := add(_1, and(add(and(add(length, 0x1f), not(31)), 63), not(31))) + let newFreePtr := add(_1, and(add(and(add(length, 0x1f), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0), 63), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0)) if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _1)) { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x41) revert(0, 36) } @@ -44,8 +44,8 @@ object "C_14" { _3 := 0 calldatacopy(dst, add(offset, 36), length) mstore(add(add(_1, length), 32), 0) - mstore(0, add(keccak256(dst, mload(_1)), not(0))) - let slot := and(keccak256(0, 32), not(255)) + mstore(0, add(keccak256(dst, mload(_1)), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)) + let slot := and(keccak256(0, 32), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00) let memPos := mload(64) mstore(memPos, slot) return(memPos, 32) diff --git a/test/cmdlineTests/yul_optimizer_erc7201_param_memory/output b/test/cmdlineTests/yul_optimizer_erc7201_param_memory/output index aa9f5871e15d..8ecd6a46976f 100644 --- a/test/cmdlineTests/yul_optimizer_erc7201_param_memory/output +++ b/test/cmdlineTests/yul_optimizer_erc7201_param_memory/output @@ -21,11 +21,11 @@ object "C_16" { if eq(0x26121ff0, shr(224, calldataload(0))) { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } let newFreePtr := add(_1, 64) if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _1)) { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x41) revert(0, 0x24) } @@ -33,8 +33,8 @@ object "C_16" { mstore(_1, 12) let _2 := add(_1, 32) mstore(_2, "example.main") - mstore(0, add(keccak256(_2, 12), not(0))) - let slot := and(keccak256(0, 32), not(255)) + mstore(0, add(keccak256(_2, 12), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)) + let slot := and(keccak256(0, 32), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00) let memPos := mload(64) mstore(memPos, slot) return(memPos, 32) diff --git a/test/cmdlineTests/yul_optimizer_erc7201_param_storage/output b/test/cmdlineTests/yul_optimizer_erc7201_param_storage/output index dea93fb0d1a0..11c9b0b5cc97 100644 --- a/test/cmdlineTests/yul_optimizer_erc7201_param_storage/output +++ b/test/cmdlineTests/yul_optimizer_erc7201_param_storage/output @@ -13,7 +13,7 @@ object "C_15" { if iszero(outOfPlaceEncoding) { length := and(length, 0x7f) } if eq(outOfPlaceEncoding, lt(length, 32)) { - mstore(0x00, shl(224, 0x4e487b71)) + mstore(0x00, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x22) revert(0x00, 0x24) } @@ -45,7 +45,7 @@ object "C_15" { if eq(0x26121ff0, shr(224, calldataload(0))) { if callvalue() { revert(0, 0) } - if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } let ret := 0 let slotValue := sload(0) let length := 0 @@ -54,7 +54,7 @@ object "C_15" { if iszero(outOfPlaceEncoding) { length := and(length, 0x7f) } if eq(outOfPlaceEncoding, lt(length, 32)) { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x22) revert(0, 0x24) } @@ -62,7 +62,7 @@ object "C_15" { let updated_pos := add(_1, 32) switch outOfPlaceEncoding case 0 { - mstore(updated_pos, and(slotValue, not(255))) + mstore(updated_pos, and(slotValue, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00)) ret := add(add(_1, shl(5, iszero(iszero(length)))), 32) } case 1 { @@ -76,16 +76,16 @@ object "C_15" { } ret := add(add(_1, i), 32) } - let newFreePtr := add(_1, and(add(sub(ret, _1), 31), not(31))) + let newFreePtr := add(_1, and(add(sub(ret, _1), 31), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0)) if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _1)) { - mstore(0, shl(224, 0x4e487b71)) + mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) mstore(4, 0x41) revert(0, 0x24) } mstore(64, newFreePtr) - mstore(0, add(keccak256(updated_pos, mload(_1)), not(0))) - mstore(newFreePtr, and(keccak256(0, 32), not(255))) + mstore(0, add(keccak256(updated_pos, mload(_1)), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)) + mstore(newFreePtr, and(keccak256(0, 32), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00)) return(newFreePtr, 32) } } diff --git a/test/libsolidity/semanticTests/abicoder/abi_decode_from_storage_struct_v2.sol b/test/libsolidity/semanticTests/abicoder/abi_decode_from_storage_struct_v2.sol index e5aa910ce1be..9eb739effa55 100644 --- a/test/libsolidity/semanticTests/abicoder/abi_decode_from_storage_struct_v2.sol +++ b/test/libsolidity/semanticTests/abicoder/abi_decode_from_storage_struct_v2.sol @@ -21,6 +21,6 @@ contract C { } // ---- // f() -> 0x20, 0x8, 0x40, 0x3, 0x9, 0xa, 0xb -// gas irOptimized: 203109 +// gas irOptimized: 203106 // gas legacy: 206263 // gas legacyOptimized: 203177 diff --git a/test/libsolidity/semanticTests/abicoder/abi_decode_simple_storage.sol b/test/libsolidity/semanticTests/abicoder/abi_decode_simple_storage.sol index 6c4fd52b36ed..9cd52568d2cb 100644 --- a/test/libsolidity/semanticTests/abicoder/abi_decode_simple_storage.sol +++ b/test/libsolidity/semanticTests/abicoder/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: 135441 +// gas irOptimized: 135438 // gas legacy: 137095 // gas legacyOptimized: 135828 diff --git a/test/libsolidity/semanticTests/abicoder/abi_encode_calldata_slice.sol b/test/libsolidity/semanticTests/abicoder/abi_encode_calldata_slice.sol index a6a4f8fd870d..77cba356762b 100644 --- a/test/libsolidity/semanticTests/abicoder/abi_encode_calldata_slice.sol +++ b/test/libsolidity/semanticTests/abicoder/abi_encode_calldata_slice.sol @@ -59,10 +59,10 @@ contract C { // EVMVersion: >homestead // ---- // test_bytes() -> -// gas irOptimized: 314884 +// gas irOptimized: 315100 // gas legacy: 305816 -// gas legacyOptimized: 253573 +// gas legacyOptimized: 253519 // test_uint256() -> // gas irOptimized: 448346 // gas legacy: 421304 -// gas legacyOptimized: 351544 +// gas legacyOptimized: 351508 diff --git a/test/libsolidity/semanticTests/abicoder/abi_encode_v2.sol b/test/libsolidity/semanticTests/abicoder/abi_encode_v2.sol index edfe075ddd79..da271c800801 100644 --- a/test/libsolidity/semanticTests/abicoder/abi_encode_v2.sol +++ b/test/libsolidity/semanticTests/abicoder/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: 111825 // gas legacy: 113890 // gas legacyOptimized: 111658 diff --git a/test/libsolidity/semanticTests/abicoder/abi_encode_v2_in_function_inherited_in_v1_contract.sol b/test/libsolidity/semanticTests/abicoder/abi_encode_v2_in_function_inherited_in_v1_contract.sol index bb3ad1aad1a9..72002e20dbff 100644 --- a/test/libsolidity/semanticTests/abicoder/abi_encode_v2_in_function_inherited_in_v1_contract.sol +++ b/test/libsolidity/semanticTests/abicoder/abi_encode_v2_in_function_inherited_in_v1_contract.sol @@ -30,7 +30,7 @@ contract C is B { } // ---- // test() -> 77 -// gas irOptimized: 55117 +// gas irOptimized: 55111 // gas irOptimized code: 56800 // gas legacy: 57266 // gas legacy code: 94600 diff --git a/test/libsolidity/semanticTests/abicoder/calldataDecoding/array/calldata_array_dynamic_of_uint_v2.sol b/test/libsolidity/semanticTests/abicoder/calldataDecoding/array/calldata_array_dynamic_of_uint_v2.sol index 739c4c84076b..c446381a8553 100644 --- a/test/libsolidity/semanticTests/abicoder/calldataDecoding/array/calldata_array_dynamic_of_uint_v2.sol +++ b/test/libsolidity/semanticTests/abicoder/calldataDecoding/array/calldata_array_dynamic_of_uint_v2.sol @@ -20,6 +20,6 @@ contract C { // f(uint256[][1]): 32, 32, 0 -> true // f(uint256[][1]): 32, 32, 1, 42 -> true // f(uint256[][1]): 32, 32, 8, 421, 422, 423, 424, 425, 426, 427, 428 -> true -// gas irOptimized: 120978 +// gas irOptimized: 120975 // gas legacy: 98324 -// gas legacyOptimized: 94348 +// gas legacyOptimized: 94345 diff --git a/test/libsolidity/semanticTests/abicoder/libraryABI/storage_ptr.sol b/test/libsolidity/semanticTests/abicoder/libraryABI/storage_ptr.sol index ff98c66ca9c6..57747cfec7af 100644 --- a/test/libsolidity/semanticTests/abicoder/libraryABI/storage_ptr.sol +++ b/test/libsolidity/semanticTests/abicoder/libraryABI/storage_ptr.sol @@ -24,6 +24,6 @@ contract C { // ---- // library: L // f() -> 8, 7, 1, 2, 7, 12 -// gas irOptimized: 166766 +// gas irOptimized: 166763 // gas legacy: 170486 // gas legacyOptimized: 167252 diff --git a/test/libsolidity/semanticTests/array/array_memory_index_access.sol b/test/libsolidity/semanticTests/array/array_memory_index_access.sol index d992014c4a50..a4de0ca6e040 100644 --- a/test/libsolidity/semanticTests/array/array_memory_index_access.sol +++ b/test/libsolidity/semanticTests/array/array_memory_index_access.sol @@ -26,7 +26,7 @@ contract C { // index(uint256): 10 -> true // index(uint256): 20 -> true // index(uint256): 0xFF -> true -// gas irOptimized: 108272 +// gas irOptimized: 108269 // gas legacy: 181536 // gas legacyOptimized: 117442 // accessIndex(uint256,int256): 10, 1 -> 2 diff --git a/test/libsolidity/semanticTests/array/array_storage_index_access.sol b/test/libsolidity/semanticTests/array/array_storage_index_access.sol index 325323c5cb84..60a5e8563adb 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: 3017300 // gas legacy: 3038668 // gas legacyOptimized: 2995964 // test_indices(uint256): 5 -> -// gas irOptimized: 579670 +// gas irOptimized: 579360 // gas legacy: 573821 // gas legacyOptimized: 571847 // test_indices(uint256): 10 -> -// gas irOptimized: 157953 +// gas irOptimized: 157923 // gas legacy: 160122 // gas legacyOptimized: 156996 // test_indices(uint256): 15 -> -// gas irOptimized: 172733 +// gas irOptimized: 172688 // gas legacy: 175987 // gas legacyOptimized: 171596 // test_indices(uint256): 0xFF -> -// gas irOptimized: 5673823 +// gas irOptimized: 5673058 // gas legacy: 5715762 // gas legacyOptimized: 5632556 // test_indices(uint256): 1000 -> -// gas irOptimized: 18173005 +// gas irOptimized: 18170005 // gas legacy: 18347824 // gas legacyOptimized: 18037248 // test_indices(uint256): 129 -> -// gas irOptimized: 4166279 +// gas irOptimized: 4163879 // gas legacy: 4140124 // gas legacyOptimized: 4108272 // test_indices(uint256): 128 -> -// gas irOptimized: 405522 +// gas irOptimized: 405135 // gas legacy: 433512 // gas legacyOptimized: 400909 // test_indices(uint256): 1 -> -// gas irOptimized: 583437 +// gas irOptimized: 583130 // 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 cdd6b70f559d..dad527a653c5 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: 133751 // gas legacy: 131664 // gas legacyOptimized: 129990 // test_zeroed_indices(uint256): 10 -> -// gas irOptimized: 228556 +// gas irOptimized: 228532 // gas legacy: 225215 // gas legacyOptimized: 222351 // test_zeroed_indices(uint256): 15 -> -// gas irOptimized: 327360 +// gas irOptimized: 327324 // gas legacy: 322899 // gas legacyOptimized: 318907 // test_zeroed_indices(uint256): 0xFF -> -// gas irOptimized: 5180120 +// gas irOptimized: 5179508 // gas legacy: 5093135 // gas legacyOptimized: 5020523 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 bf06393a63ff..3803ab95ca84 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 @@ -17,7 +17,7 @@ contract C { // set_get_length(uint256): 10 -> 10 // set_get_length(uint256): 20 -> 20 // set_get_length(uint256): 0 -> 0 -// gas irOptimized: 76123 +// gas irOptimized: 76063 // gas legacy: 75618 // gas legacyOptimized: 75076 // set_get_length(uint256): 0xFF -> 0xFF diff --git a/test/libsolidity/semanticTests/array/array_storage_push_pop.sol b/test/libsolidity/semanticTests/array/array_storage_push_pop.sol index 609944ddc086..2ae1654fd1f3 100644 --- a/test/libsolidity/semanticTests/array/array_storage_push_pop.sol +++ b/test/libsolidity/semanticTests/array/array_storage_push_pop.sol @@ -13,15 +13,15 @@ contract C { // set_get_length(uint256): 1 -> 0 // set_get_length(uint256): 10 -> 0 // set_get_length(uint256): 20 -> 0 -// gas irOptimized: 87226 +// gas irOptimized: 87166 // gas legacy: 85609 // gas legacyOptimized: 83462 // set_get_length(uint256): 0xFF -> 0 -// gas irOptimized: 833586 +// gas irOptimized: 832821 // gas legacy: 807764 // gas legacyOptimized: 784467 // set_get_length(uint256): 0xFFF -> 0 -// gas irOptimized: 13029438 +// gas irOptimized: 13017153 // gas legacy: 12608096 // gas legacyOptimized: 12239199 // set_get_length(uint256): 0xFFFF -> FAILURE # Out-of-gas # diff --git a/test/libsolidity/semanticTests/array/byte_array_storage_layout.sol b/test/libsolidity/semanticTests/array/byte_array_storage_layout.sol index 68e4b5d62caa..e287bf33feca 100644 --- a/test/libsolidity/semanticTests/array/byte_array_storage_layout.sol +++ b/test/libsolidity/semanticTests/array/byte_array_storage_layout.sol @@ -45,7 +45,7 @@ contract c { // gas legacyOptimized: 57073 // storageEmpty -> 0 // test_long() -> 67 -// gas irOptimized: 89482 +// gas irOptimized: 89779 // gas legacy: 101607 // gas legacyOptimized: 100479 // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/array/byte_array_transitional_2.sol b/test/libsolidity/semanticTests/array/byte_array_transitional_2.sol index e83cc545809d..45b942d727fd 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: 123469 // gas legacy: 147108 // gas legacyOptimized: 144200 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 833c9dec3e42..61930c2366d4 100644 --- a/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol +++ b/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol @@ -8,7 +8,7 @@ contract C { } // ---- // constructor(): 1, 2, 3 -> -// gas irOptimized: 124991 +// gas irOptimized: 124972 // gas irOptimized code: 14800 // gas legacy: 142553 // gas legacy code: 46200 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_cleanup_uint128.sol b/test/libsolidity/semanticTests/array/copying/array_copy_cleanup_uint128.sol index ba05d8fb670d..32c25f606823 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_cleanup_uint128.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_cleanup_uint128.sol @@ -21,6 +21,6 @@ contract C { } // ---- // f() -> true -// gas irOptimized: 73981 +// gas irOptimized: 73979 // gas legacy: 75550 // gas legacyOptimized: 73812 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 e4e7bf62f3a0..478c9f50a8d0 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: 122596 +// gas irOptimized: 122594 // gas legacy: 125651 // gas legacyOptimized: 121668 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_clear_storage_packed.sol b/test/libsolidity/semanticTests/array/copying/array_copy_clear_storage_packed.sol index 12d9bf1fd3c0..cab61c805998 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_clear_storage_packed.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_clear_storage_packed.sol @@ -40,11 +40,11 @@ contract C { } // ---- // f() -> 0 -// gas irOptimized: 74044 +// gas irOptimized: 74041 // gas legacy: 75528 // gas legacyOptimized: 73861 // g() -> 0 // h() -> 0 -// gas irOptimized: 74114 +// gas irOptimized: 74112 // gas legacy: 75553 // gas legacyOptimized: 73904 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 1bbb541911a0..41aeefd0e86f 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: 208485 // gas legacy: 220059 // gas legacyOptimized: 211458 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 5a66704b5506..37e0cb5e0e00 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: 253573 // gas legacy: 253664 // gas legacyOptimized: 252200 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 f1cd76a3adc5..682e16124991 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: 190676 +// gas irOptimized: 190674 // gas legacy: 210706 // gas legacyOptimized: 190472 // 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..49f6726d8624 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: 161777 // 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 054d61c6772b..20b735224f1d 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: 273548 +// gas irOptimized: 273476 // gas legacy: 280148 // gas legacyOptimized: 274502 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 7ceadf481c66..fc590ffc07f7 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: 233012 +// gas irOptimized: 233078 // gas legacy: 239400 -// gas legacyOptimized: 233948 +// gas legacyOptimized: 233920 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 a1849bd65fce..869ddd163a9c 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: 149856 +// gas irOptimized: 149880 // gas legacy: 156721 // gas legacyOptimized: 149000 // from_storage_ptr() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 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 e3b9cdaadcb9..fb51996ba3a7 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: 104629 +// gas irOptimized: 104611 // gas legacy: 111170 // gas legacyOptimized: 104620 // 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 92b61b9291cd..c3a99698e54a 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: 104220 // gas legacy: 110911 // gas legacyOptimized: 104377 // 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 e4b3d14fd76b..fc5bdf2d2df0 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: 120751 +// gas irOptimized: 120706 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..fd7b1166518f 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: 119414 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..f4592d2676ae 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: 181856 diff --git a/test/libsolidity/semanticTests/array/copying/array_to_mapping.sol b/test/libsolidity/semanticTests/array/copying/array_to_mapping.sol index 667685c9c83f..072d10c9e361 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: 147749 +// gas irOptimized: 147773 // gas legacy: 154218 // gas legacyOptimized: 147020 // 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 4ab381f4e614..97e96a3f0a5b 100644 --- a/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol +++ b/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol @@ -17,8 +17,8 @@ contract c { // gas irOptimized: 48421 // storageEmpty -> 0 // copy(uint256,uint256): 99, 1 -> true -// gas irOptimized: 35641 +// gas irOptimized: 35639 // storageEmpty -> 0 // copy(uint256,uint256): 99, 2 -> true -// gas irOptimized: 35641 +// gas irOptimized: 35639 // storageEmpty -> 1 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 37769cb4966c..66980eab9985 100644 --- a/test/libsolidity/semanticTests/array/copying/bytes_storage_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/bytes_storage_to_storage.sol @@ -17,26 +17,26 @@ contract c { // ---- // f(uint256): 0 -> 0x20, 0x00 // f(uint256): 31 -> 0x20, 0x1f, 0x0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e00 -// gas irOptimized: 103268 +// gas irOptimized: 103355 // gas legacy: 112904 // gas legacyOptimized: 112645 // f(uint256): 32 -> 0x20, 0x20, 1780731860627700044960722568376592200742329637303199754547598369979440671 -// gas irOptimized: 117825 +// gas irOptimized: 117920 // gas legacy: 128964 // gas legacyOptimized: 128859 // f(uint256): 33 -> 0x20, 33, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x2000000000000000000000000000000000000000000000000000000000000000 -// gas irOptimized: 123888 +// gas irOptimized: 123986 // gas legacy: 135510 // gas legacyOptimized: 135218 // f(uint256): 63 -> 0x20, 0x3f, 1780731860627700044960722568376592200742329637303199754547598369979440671, 14532552714582660066924456880521368950258152170031413196862950297402215316992 -// gas irOptimized: 126948 +// gas irOptimized: 127136 // gas legacy: 148110 // gas legacyOptimized: 148448 // f(uint256): 12 -> 0x20, 0x0c, 0x0102030405060708090a0b0000000000000000000000000000000000000000 -// gas irOptimized: 54204 +// gas irOptimized: 54228 // gas legacy: 59832 // gas legacyOptimized: 57268 // f(uint256): 129 -> 0x20, 0x81, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f, 29063324697304692433803953038474361308315562010425523193971352996434451193439, 0x606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f, -57896044618658097711785492504343953926634992332820282019728792003956564819968 -// gas irOptimized: 416918 +// gas irOptimized: 417304 // gas legacy: 458997 // gas legacyOptimized: 460669 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..a13791fc2b97 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: 139583 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 cdc3c4f66765..e0952baa1596 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: 89349 -// gas irOptimized code: 140200 +// gas irOptimized: 89771 +// gas irOptimized code: 145400 // gas legacy: 100902 // gas legacy code: 271400 // gas legacyOptimized: 83062 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 9a68f88d8971..ce98a502a98f 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: 179408 // gas legacy: 180675 // gas legacyOptimized: 179690 // g() -> 0x40, 0xc0, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000, 0x11, 0x3132333435363738393233343536373839000000000000000000000000000000 -// gas irOptimized: 106381 +// gas irOptimized: 106384 // gas legacy: 109472 // gas legacyOptimized: 106648 // h() -> 0x40, 0x60, 0x00, 0x00 diff --git a/test/libsolidity/semanticTests/array/copying/copy_function_internal_storage_array.sol b/test/libsolidity/semanticTests/array/copying/copy_function_internal_storage_array.sol index 5fc981340942..2426edf31ce0 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: 122575 +// gas irOptimized: 122581 // gas legacy: 208558 // gas legacyOptimized: 202409 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 6872995d1cbb..32bc67d8124f 100644 --- a/test/libsolidity/semanticTests/array/copying/copy_removes_bytes_data.sol +++ b/test/libsolidity/semanticTests/array/copying/copy_removes_bytes_data.sol @@ -12,5 +12,5 @@ contract c { // gas legacyOptimized: 177551 // storageEmpty -> 0 // reset() -> true -// gas irOptimized: 47341 +// gas irOptimized: 47339 // storageEmpty -> 1 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 5c64ba63f8f8..098b046ea5c2 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: 327936 +// gas irOptimized: 327932 // 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: 141168 +// gas irOptimized: 141163 // 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: 188448 +// gas irOptimized: 188444 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 12c40849fe6f..bbbb39756afd 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: 332582 +// gas irOptimized: 332578 // 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: 145415 +// gas irOptimized: 145410 // 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: 192254 +// gas irOptimized: 192250 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 a5cf48011226..feb170e368e1 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: 116512 +// gas irOptimized: 116506 // gas legacy: 120226 // gas legacyOptimized: 116941 // test2() -> 0x20, 0x14, "[b called][a called]" // test3() -> 0x20, 0x14, "[b called][a called]" -// gas irOptimized: 103138 +// gas irOptimized: 103120 // gas legacy: 105192 // gas legacyOptimized: 103752 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 93eb84427d66..2fe891c3c64d 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: 128301 +// gas irOptimized: 128262 // gas legacy: 129528 // gas legacyOptimized: 128171 diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_memory_to_storage.sol b/test/libsolidity/semanticTests/array/copying/nested_array_memory_to_storage.sol index 933a1ab1b1c5..4689ba42620d 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_memory_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_memory_to_storage.sol @@ -46,6 +46,6 @@ contract Test { // gas irOptimized: 95905 // gas legacy: 100519 // test3() -> 24 -// gas irOptimized: 141297 +// gas irOptimized: 141295 // gas legacy: 146668 // gas legacyOptimized: 141331 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 b27fe9e06453..a7f7acf7b14c 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: 304750 +// gas irOptimized: 304746 // 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: 116659 +// gas irOptimized: 116654 // 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: 187942 +// gas irOptimized: 187938 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 146de2f2af6a..ec099b22b42d 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: 309034 +// gas irOptimized: 309030 // 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: 118320 +// gas irOptimized: 118315 // 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: 190993 +// gas irOptimized: 190989 diff --git a/test/libsolidity/semanticTests/array/copying/storage_memory_nested.sol b/test/libsolidity/semanticTests/array/copying/storage_memory_nested.sol index 2a486d256355..21e9e5766076 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: 206428 // 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 3f52085f4b34..299eeaf10ab0 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: 202067 // gas legacy: 204327 // gas legacyOptimized: 202903 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..88c15368e60c 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: 206428 // gas legacy: 211770 // gas legacyOptimized: 211191 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..bdf59dadfb28 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: 114361 // 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..7902656bf992 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: 136667 // 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 03c47f69b414..bdcd1b956c16 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: 218420 +// gas irOptimized: 218438 // gas legacy: 242263 // gas legacyOptimized: 241187 diff --git a/test/libsolidity/semanticTests/array/delete/delete_bytes_array.sol b/test/libsolidity/semanticTests/array/delete/delete_bytes_array.sol index 32a96c72c310..a2ba92aabe68 100644 --- a/test/libsolidity/semanticTests/array/delete/delete_bytes_array.sol +++ b/test/libsolidity/semanticTests/array/delete/delete_bytes_array.sol @@ -32,4 +32,4 @@ contract C { // ---- // f() -> 0 // g() -> 0 -// gas irOptimized: 56617 +// gas irOptimized: 56639 diff --git a/test/libsolidity/semanticTests/array/dynamic_array_cleanup.sol b/test/libsolidity/semanticTests/array/dynamic_array_cleanup.sol index 285bc5f6f878..a5a981dc9ddb 100644 --- a/test/libsolidity/semanticTests/array/dynamic_array_cleanup.sol +++ b/test/libsolidity/semanticTests/array/dynamic_array_cleanup.sol @@ -14,12 +14,12 @@ contract c { // ---- // storageEmpty -> 1 // fill() -> -// gas irOptimized: 519494 +// gas irOptimized: 519431 // gas legacy: 518943 // gas legacyOptimized: 515555 // storageEmpty -> 0 // halfClear() -> -// gas irOptimized: 91472 +// gas irOptimized: 91433 // gas legacy: 90567 // gas legacyOptimized: 90457 // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/array/dynamic_multi_array_cleanup.sol b/test/libsolidity/semanticTests/array/dynamic_multi_array_cleanup.sol index 2db14a939e5a..d05bf50cc2e0 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: 122982 // gas legacy: 121602 // gas legacyOptimized: 120589 // 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..b0898b717b49 100644 --- a/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol +++ b/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol @@ -18,7 +18,7 @@ contract B { } // ---- // f() -> 2, 3, 4, 5, 6, 1000, 1001, 1002, 1003, 1004 -// gas irOptimized: 59212 +// gas irOptimized: 59197 // gas irOptimized code: 56600 // gas legacy: 68001 // gas legacy code: 162000 diff --git a/test/libsolidity/semanticTests/array/fixed_arrays_in_constructors.sol b/test/libsolidity/semanticTests/array/fixed_arrays_in_constructors.sol index 8e9780e3376f..aed20a1ddaa6 100644 --- a/test/libsolidity/semanticTests/array/fixed_arrays_in_constructors.sol +++ b/test/libsolidity/semanticTests/array/fixed_arrays_in_constructors.sol @@ -9,8 +9,8 @@ contract Creator { } // ---- // constructor(): 1, 2, 3, 4 -> -// gas irOptimized: 104102 -// gas irOptimized code: 22400 +// gas irOptimized: 103933 +// gas irOptimized code: 22000 // gas legacy: 115185 // gas legacy code: 59000 // gas legacyOptimized: 104908 diff --git a/test/libsolidity/semanticTests/array/function_array_cross_calls.sol b/test/libsolidity/semanticTests/array/function_array_cross_calls.sol index f3dea83bfbab..e84a5f050486 100644 --- a/test/libsolidity/semanticTests/array/function_array_cross_calls.sol +++ b/test/libsolidity/semanticTests/array/function_array_cross_calls.sol @@ -42,9 +42,9 @@ contract C { } // ---- // test() -> 5, 6, 7 -// gas irOptimized: 86484 -// gas irOptimized code: 161200 +// gas irOptimized: 86483 +// gas irOptimized code: 161400 // gas legacy: 97551 // gas legacy code: 342800 -// gas legacyOptimized: 87808 +// gas legacyOptimized: 87812 // gas legacyOptimized code: 193000 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 ed4e9b87737c..8200834e9880 100644 --- a/test/libsolidity/semanticTests/array/pop/array_pop_array_transition.sol +++ b/test/libsolidity/semanticTests/array/pop/array_pop_array_transition.sol @@ -25,5 +25,5 @@ contract c { // test() -> 1, 2, 3 // gas irOptimized: 1828383 // gas legacy: 1841877 -// gas legacyOptimized: 1821569 +// gas legacyOptimized: 1821723 // 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..419dd18a3b93 100644 --- a/test/libsolidity/semanticTests/array/pop/array_pop_uint16_transition.sol +++ b/test/libsolidity/semanticTests/array/pop/array_pop_uint16_transition.sol @@ -20,5 +20,5 @@ contract c { // test() -> 38, 28, 18 // gas irOptimized: 148380 // gas legacy: 151182 -// gas legacyOptimized: 142418 +// gas legacyOptimized: 142572 // 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..ba0480f6ae7b 100644 --- a/test/libsolidity/semanticTests/array/pop/array_pop_uint24_transition.sol +++ b/test/libsolidity/semanticTests/array/pop/array_pop_uint24_transition.sol @@ -20,5 +20,5 @@ contract c { // test() -> 20, 10 // gas irOptimized: 125889 // gas legacy: 127215 -// gas legacyOptimized: 122224 +// gas legacyOptimized: 122320 // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/pop/byte_array_pop_copy_long.sol b/test/libsolidity/semanticTests/array/pop/byte_array_pop_copy_long.sol index 01d2d83f9a44..8ecb213e21b3 100644 --- a/test/libsolidity/semanticTests/array/pop/byte_array_pop_copy_long.sol +++ b/test/libsolidity/semanticTests/array/pop/byte_array_pop_copy_long.sol @@ -9,6 +9,6 @@ contract c { } // ---- // test() -> 0x20, 29, 0x0303030303030303030303030303030303030303030303030303030303000000 -// gas irOptimized: 85778 +// gas irOptimized: 85785 // gas legacy: 97666 // gas legacyOptimized: 96874 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..81a9dee3fff9 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: 139062 // gas legacy: 178396 -// gas legacyOptimized: 163832 +// gas legacyOptimized: 163897 // 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..cde73cc74637 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: 113600 // 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..674e6cf6663e 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: 106800 // 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..2910dd3d0495 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: 111825 // gas legacy: 111804 // gas legacyOptimized: 111122 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..1378aeba6bf3 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: 168391 // 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 04b2a4a736c9..0cf91c6e4678 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: 179516 // gas legacy: 181013 // gas legacyOptimized: 180406 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 626c65871ff2..c8d1b8e37153 100644 --- a/test/libsolidity/semanticTests/array/push/push_no_args_2d.sol +++ b/test/libsolidity/semanticTests/array/push/push_no_args_2d.sol @@ -27,16 +27,16 @@ contract C { // ---- // l() -> 0 // f(uint256,uint256): 42, 64 -> -// gas irOptimized: 112288 +// gas irOptimized: 112285 // gas legacy: 107925 -// gas legacyOptimized: 101896 +// gas legacyOptimized: 101982 // l() -> 1 // ll(uint256): 0 -> 43 // a(uint256,uint256): 0, 42 -> 64 // f(uint256,uint256): 84, 128 -> -// gas irOptimized: 118708 +// gas irOptimized: 118705 // gas legacy: 109977 -// gas legacyOptimized: 98446 +// gas legacyOptimized: 98616 // l() -> 2 // ll(uint256): 1 -> 85 // a(uint256,uint256): 0, 42 -> 64 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..e506e8a73195 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: 181685 // 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..1b30912d016c 100644 --- a/test/libsolidity/semanticTests/array/reusing_memory.sol +++ b/test/libsolidity/semanticTests/array/reusing_memory.sol @@ -24,7 +24,7 @@ contract Main { } // ---- // f(uint256): 0x34 -> 0x46bddb1178e94d7f2892ff5f366840eb658911794f2c3a44c450aa2c505186c1 -// gas irOptimized: 99552 +// gas irOptimized: 99535 // gas irOptimized code: 12400 // gas legacy: 101551 // gas legacy code: 23600 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 4c75ad452b8d..cd2b7506e329 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: 82586 -// gas irOptimized code: 363600 +// gas irOptimized: 82036 +// gas irOptimized code: 356800 // gas legacy: 101811 // gas legacy code: 608200 // gas legacyOptimized: 85196 diff --git a/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol b/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol index 76a4dd961fe4..91e7fe8a3730 100644 --- a/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol +++ b/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol @@ -26,9 +26,9 @@ 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: 327767 +// gas irOptimized code: 93800 // gas legacy: 338477 // gas legacy code: 244800 -// gas legacyOptimized: 329166 +// gas legacyOptimized: 329160 // gas legacyOptimized code: 117000 diff --git a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol index 91be8e3789f3..8acc25c4ade1 100644 --- a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol +++ b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol @@ -26,9 +26,9 @@ contract Creator { // bytecodeFormat: legacy,>=EOFv1 // ---- // f(uint256,bytes): 7, 0x40, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" -> 7, "h" -// gas irOptimized: 169297 -// gas irOptimized code: 99600 +// gas irOptimized: 169322 +// gas irOptimized code: 100200 // gas legacy: 172946 // gas legacy code: 239800 // gas legacyOptimized: 169823 -// gas legacyOptimized code: 118600 +// gas legacyOptimized code: 118800 diff --git a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol index 8a072f3ebed6..2f15ff5e943a 100644 --- a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol +++ b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol @@ -10,11 +10,11 @@ contract Test { // bytecodeFormat: legacy,>=EOFv1 // ---- // constructor(): 7, 0x40, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" -> -// gas irOptimized: 181629 -// gas irOptimized code: 78400 +// gas irOptimized: 181697 +// gas irOptimized code: 79600 // gas legacy: 195484 // gas legacy code: 109400 -// gas legacyOptimized: 181853 +// gas legacyOptimized: 181850 // gas legacyOptimized code: 71400 // m_x() -> 7 // m_s() -> 0x20, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" diff --git a/test/libsolidity/semanticTests/constructor/constructor_arguments_external.sol b/test/libsolidity/semanticTests/constructor/constructor_arguments_external.sol index e59cb4214a23..fc90f0e62064 100644 --- a/test/libsolidity/semanticTests/constructor/constructor_arguments_external.sol +++ b/test/libsolidity/semanticTests/constructor/constructor_arguments_external.sol @@ -19,7 +19,7 @@ contract Main { // bytecodeFormat: legacy,>=EOFv1 // ---- // constructor(): "abc", true -// gas irOptimized: 80174 +// gas irOptimized: 80155 // gas irOptimized code: 24200 // gas legacy: 85098 // gas legacy code: 58200 diff --git a/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol b/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol index cc196a95c802..09fe65521674 100644 --- a/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol +++ b/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol @@ -11,7 +11,7 @@ contract C { // bytecodeFormat: legacy,>=EOFv1 // ---- // constructor(): 1, 2, 3, 4 -> -// gas irOptimized: 148129 +// gas irOptimized: 148110 // gas irOptimized code: 23000 // gas legacy: 166201 // gas legacy code: 60400 diff --git a/test/libsolidity/semanticTests/events/event_dynamic_array_storage.sol b/test/libsolidity/semanticTests/events/event_dynamic_array_storage.sol index bdd355f68927..2833198b808c 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: 114263 // 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..c8fabaa27c05 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: 114263 // 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 42b9b50dd779..2fb054f6bf85 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: 185136 // gas legacy: 188615 -// gas legacyOptimized: 184548 +// gas legacyOptimized: 184542 diff --git a/test/libsolidity/semanticTests/events/event_emit_from_other_contract.sol b/test/libsolidity/semanticTests/events/event_emit_from_other_contract.sol index e6d800d9b229..d834e372def2 100644 --- a/test/libsolidity/semanticTests/events/event_emit_from_other_contract.sol +++ b/test/libsolidity/semanticTests/events/event_emit_from_other_contract.sol @@ -19,7 +19,7 @@ contract C { // bytecodeFormat: legacy // ---- // constructor() -> -// gas irOptimized: 113970 +// gas irOptimized: 113836 // gas irOptimized code: 51400 // gas legacy: 119791 // gas legacy code: 125200 diff --git a/test/libsolidity/semanticTests/events/event_indexed_string.sol b/test/libsolidity/semanticTests/events/event_indexed_string.sol index 2e4b110692fb..c981432270a1 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: 332791 // gas legacy: 366022 // gas legacyOptimized: 362429 diff --git a/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol b/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol index 1f196479dac3..6c56297723d0 100644 --- a/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol +++ b/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol @@ -77,17 +77,17 @@ contract FixedFeeRegistrar is Registrar { // experimental: true // ---- // constructor() -// gas irOptimized: 78076 -// gas irOptimized code: 307400 +// gas irOptimized: 77978 +// gas irOptimized code: 306400 // gas legacy: 115395 // gas legacy code: 792400 -// gas legacyOptimized: 84598 -// gas legacyOptimized code: 388000 -// gas ssaCFGOptimized: 78924 -// gas ssaCFGOptimized code: 322800 +// gas legacyOptimized: 84614 +// gas legacyOptimized code: 388200 +// gas ssaCFGOptimized: 78630 +// gas ssaCFGOptimized code: 319200 // reserve(string), 69 ether: 0x20, 3, "abc" -> // ~ emit Changed(string): #0x4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45 -// gas irOptimized: 45741 +// gas irOptimized: 45732 // gas legacy: 46698 // gas legacyOptimized: 45948 // owner(string): 0x20, 3, "abc" -> 0x1212121212121212121212121212120000000012 diff --git a/test/libsolidity/semanticTests/externalContracts/base64.sol b/test/libsolidity/semanticTests/externalContracts/base64.sol index dc924a571c43..3931a2fe59a7 100644 --- a/test/libsolidity/semanticTests/externalContracts/base64.sol +++ b/test/libsolidity/semanticTests/externalContracts/base64.sol @@ -35,14 +35,14 @@ contract test { // experimental: true // ---- // constructor() -// gas irOptimized: 79076 -// gas irOptimized code: 322000 +// gas irOptimized: 79032 +// gas irOptimized code: 321600 // gas legacy: 102214 // gas legacy code: 629800 -// gas legacyOptimized: 87926 -// gas legacyOptimized code: 429800 -// gas ssaCFGOptimized: 79463 -// gas ssaCFGOptimized code: 327800 +// gas legacyOptimized: 87942 +// gas legacyOptimized code: 430000 +// gas ssaCFGOptimized: 79356 +// gas ssaCFGOptimized code: 326400 // encode_inline_asm(bytes): 0x20, 0 -> 0x20, 0 // encode_inline_asm(bytes): 0x20, 1, "f" -> 0x20, 4, "Zg==" // encode_inline_asm(bytes): 0x20, 2, "fo" -> 0x20, 4, "Zm8=" @@ -58,12 +58,12 @@ 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: 1400025 // gas legacy: 1554038 // gas legacyOptimized: 1132031 -// gas ssaCFGOptimized: 1388025 +// gas ssaCFGOptimized: 1373025 // encode_no_asm_large() -// gas irOptimized: 3512081 +// gas irOptimized: 3506081 // gas legacy: 4600082 -// gas legacyOptimized: 2813075 -// gas ssaCFGOptimized: 3077081 +// gas legacyOptimized: 2821075 +// gas ssaCFGOptimized: 3062081 diff --git a/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol b/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol index f988070ae9dc..f4a992d19419 100644 --- a/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol +++ b/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol @@ -179,44 +179,44 @@ contract DepositContract is IDepositContract, ERC165 { // experimental: true // ---- // constructor() -// gas irOptimized: 809570 -// gas irOptimized code: 558000 +// gas irOptimized: 808859 +// gas irOptimized code: 555600 // gas legacy: 920228 // gas legacy code: 1438800 -// gas legacyOptimized: 848699 -// gas legacyOptimized code: 878200 -// gas ssaCFGOptimized: 809718 -// gas ssaCFGOptimized code: 570200 +// gas legacyOptimized: 848715 +// gas legacyOptimized code: 878400 +// gas ssaCFGOptimized: 809554 +// gas ssaCFGOptimized code: 569200 // supportsInterface(bytes4): 0x0 -> 0 // supportsInterface(bytes4): 0xffffffff00000000000000000000000000000000000000000000000000000000 -> false # defined to be false by ERC-165 # // supportsInterface(bytes4): 0x01ffc9a700000000000000000000000000000000000000000000000000000000 -> true # ERC-165 id # // supportsInterface(bytes4): 0x8564090700000000000000000000000000000000000000000000000000000000 -> true # the deposit interface id # // get_deposit_root() -> 0xd70a234731285c6804c2a4f56711ddb8c82c99740f207854891028af34e27e5e -// gas irOptimized: 109178 +// gas irOptimized: 109184 // gas legacy: 142741 // gas legacyOptimized: 117558 -// gas ssaCFGOptimized: 109652 +// gas ssaCFGOptimized: 109340 // 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: 109184 // gas legacy: 142741 // gas legacyOptimized: 117558 -// gas ssaCFGOptimized: 109652 +// gas ssaCFGOptimized: 109340 // 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: 109180 // gas legacy: 142750 // gas legacyOptimized: 117570 -// gas ssaCFGOptimized: 109645 +// gas ssaCFGOptimized: 109333 // 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: 109180 // gas legacy: 142750 // gas legacyOptimized: 117570 -// gas ssaCFGOptimized: 109645 +// gas ssaCFGOptimized: 109333 // 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 02c32706f750..6df03fabe04f 100644 --- a/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol +++ b/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol @@ -51,16 +51,16 @@ contract test { // experimental: true // ---- // constructor() -// gas irOptimized: 177903 -// gas irOptimized code: 1674400 +// gas irOptimized: 177931 +// gas irOptimized code: 1675200 // gas legacy: 209723 // gas legacy code: 2205000 // gas legacyOptimized: 178012 // gas legacyOptimized code: 1669600 -// gas ssaCFGOptimized: 174817 -// gas ssaCFGOptimized code: 1636800 +// gas ssaCFGOptimized: 174833 +// gas ssaCFGOptimized code: 1637000 // div(int256,int256): 3141592653589793238, 88714123 -> 35412542528203691288251815328 -// gas irOptimized: 22045 +// gas irOptimized: 22050 // gas legacy: 22736 // gas legacyOptimized: 22264 // exp(int256): 3141592653589793238 -> 23140692632779268978 @@ -84,7 +84,7 @@ contract test { // gas legacy: 30979 // gas legacyOptimized: 28357 // mul(int256,int256): 3141592653589793238, 88714123 -> 278703637 -// gas irOptimized: 22147 +// gas irOptimized: 22152 // gas legacy: 22775 // gas legacyOptimized: 22288 // pow(int256,uint256): 3141592653589793238, 5 -> 306019684785281453040 @@ -96,6 +96,6 @@ contract test { // gas legacy: 22784 // gas legacyOptimized: 22420 // benchmark(int256): 3141592653589793238 -> 998882724338592125, 1000000000000000000, 1000000000000000000 -// gas irOptimized: 34893 +// gas irOptimized: 34898 // gas legacy: 35244 // gas legacyOptimized: 33996 diff --git a/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol b/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol index a1795b14c7e3..407899659efc 100644 --- a/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol +++ b/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol @@ -57,8 +57,8 @@ contract test { // gas legacy code: 1999000 // gas legacyOptimized: 168857 // gas legacyOptimized code: 1556200 -// gas ssaCFGOptimized: 167703 -// gas ssaCFGOptimized code: 1545800 +// gas ssaCFGOptimized: 167707 +// gas ssaCFGOptimized code: 1546000 // div(uint256,uint256): 3141592653589793238, 88714123 -> 35412542528203691288251815328 // gas irOptimized: 21912 // gas legacy: 22475 diff --git a/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol b/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol index ae5daa81dc05..b84694282fa9 100644 --- a/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol +++ b/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol @@ -36,15 +36,15 @@ contract test { // experimental: true // ---- // constructor() -// gas irOptimized: 77816 -// gas irOptimized code: 307600 +// gas irOptimized: 77892 +// gas irOptimized code: 309000 // gas legacy: 92110 // gas legacy code: 523600 // gas legacyOptimized: 82667 // gas legacyOptimized code: 369200 -// gas ssaCFGOptimized: 78042 -// gas ssaCFGOptimized code: 314400 +// gas ssaCFGOptimized: 77868 +// gas ssaCFGOptimized code: 313200 // prb_pi() -> 3141592656369545286 -// gas irOptimized: 55036 +// gas irOptimized: 55137 // gas legacy: 100657 // gas legacyOptimized: 74311 diff --git a/test/libsolidity/semanticTests/externalContracts/snark.sol b/test/libsolidity/semanticTests/externalContracts/snark.sol index f7e450487310..85aa7e18deae 100644 --- a/test/libsolidity/semanticTests/externalContracts/snark.sol +++ b/test/libsolidity/semanticTests/externalContracts/snark.sol @@ -297,10 +297,10 @@ contract Test { // gas irOptimized: 275229 // gas legacy: 293579 // gas legacyOptimized: 276313 -// gas ssaCFGOptimized: 275795 +// gas ssaCFGOptimized: 275585 // verifyTx() -> true // ~ emit Verified(string): 0x20, 0x16, "Successfully verified." // gas irOptimized: 818076 // gas legacy: 904397 // gas legacyOptimized: 816770 -// gas ssaCFGOptimized: 820130 +// gas ssaCFGOptimized: 818786 diff --git a/test/libsolidity/semanticTests/externalContracts/strings.sol b/test/libsolidity/semanticTests/externalContracts/strings.sol index 8bc0ec8e5f5a..e15f10cec4cb 100644 --- a/test/libsolidity/semanticTests/externalContracts/strings.sol +++ b/test/libsolidity/semanticTests/externalContracts/strings.sol @@ -52,32 +52,32 @@ contract test { // experimental: true // ---- // constructor() -// gas irOptimized: 95303 -// gas irOptimized code: 520000 +// gas irOptimized: 95259 +// gas irOptimized code: 519600 // gas legacy: 126346 // gas legacy code: 932600 -// gas legacyOptimized: 102639 -// gas legacyOptimized code: 612400 -// gas ssaCFGOptimized: 95825 -// gas ssaCFGOptimized code: 527800 +// gas legacyOptimized: 102655 +// gas legacyOptimized code: 612600 +// gas ssaCFGOptimized: 95657 +// gas ssaCFGOptimized code: 526000 // toSlice(string): 0x20, 11, "hello world" -> 11, 0xa0 // gas irOptimized: 22646 // gas legacy: 23168 // gas legacyOptimized: 22488 // roundtrip(string): 0x20, 11, "hello world" -> 0x20, 11, "hello world" -// gas irOptimized: 23225 +// gas irOptimized: 23222 // gas legacy: 23674 // gas legacyOptimized: 22991 // utf8len(string): 0x20, 16, "\xf0\x9f\x98\x83\xf0\x9f\x98\x83\xf0\x9f\x98\x83\xf0\x9f\x98\x83" -> 4 # Input: "😃😃😃😃" # // gas irOptimized: 23956 // gas legacy: 25621 -// gas legacyOptimized: 24096 +// gas legacyOptimized: 24104 // multiconcat(string,uint256): 0x40, 3, 11, "hello world" -> 0x20, 0x58, 0x68656c6c6f20776f726c6468656c6c6f20776f726c6468656c6c6f20776f726c, 0x6468656c6c6f20776f726c6468656c6c6f20776f726c6468656c6c6f20776f72, 49027192869463622675296414541903001712009715982962058146354235762728281047040 # concatenating 3 times # -// gas irOptimized: 27630 +// gas irOptimized: 27618 // gas legacy: 30778 // gas legacyOptimized: 27519 // benchmark(string,bytes32): 0x40, 0x0842021, 8, "solidity" -> 0x2020 -// gas irOptimized: 1976778 +// gas irOptimized: 1976742 // gas legacy: 4234020 -// gas legacyOptimized: 2318668 -// gas ssaCFGOptimized: 1882325 +// gas legacyOptimized: 2335116 +// gas ssaCFGOptimized: 1882158 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..0a76c7182bba 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: 138689 +// gas irOptimized code: 53000 // 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..48be04ee04fc 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: 138884 +// gas irOptimized code: 53000 // gas legacy: 145935 // gas legacy code: 95600 // gas legacyOptimized: 138529 diff --git a/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting.sol b/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting.sol index 0031059c021a..7e7360c470cc 100644 --- a/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting.sol +++ b/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting.sol @@ -24,12 +24,12 @@ contract C { // bytecodeFormat: legacy // ---- // constructor(), 1 ether -> -// gas irOptimized: 88853 -// gas irOptimized code: 164400 +// gas irOptimized: 88678 +// gas irOptimized code: 162400 // gas legacy: 102721 // gas legacy code: 334400 -// gas legacyOptimized: 91499 -// gas legacyOptimized code: 196400 +// gas legacyOptimized: 91515 +// gas legacyOptimized code: 196600 // f(uint256): 0 -> FAILURE // f(uint256): 1 -> FAILURE // f(uint256): 2 -> FAILURE diff --git a/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting_debugstrings.sol b/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting_debugstrings.sol index a8eafb38ea1a..290810c821b4 100644 --- a/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting_debugstrings.sol +++ b/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting_debugstrings.sol @@ -22,16 +22,16 @@ contract C { } // ==== // EVMVersion: >=byzantium -// revertStrings: debug // bytecodeFormat: legacy +// revertStrings: debug // ---- // constructor(), 1 ether -> -// gas irOptimized: 98698 -// gas irOptimized code: 284200 +// gas irOptimized: 98579 +// gas irOptimized code: 283200 // gas legacy: 123258 // gas legacy code: 682400 -// gas legacyOptimized: 106969 -// gas legacyOptimized code: 386400 +// gas legacyOptimized: 106985 +// gas legacyOptimized code: 386600 // f(uint256): 0 -> FAILURE, hex"08c379a0", 0x20, 37, "Target contract does not contain", " code" // f(uint256): 1 -> FAILURE, hex"08c379a0", 0x20, 37, "Target contract does not contain", " code" // f(uint256): 2 -> FAILURE, hex"08c379a0", 0x20, 37, "Target contract does not contain", " code" diff --git a/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol b/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol index 7415accabcd2..de8263e59b89 100644 --- a/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol +++ b/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol @@ -38,8 +38,8 @@ contract test { // bytecodeFormat: legacy // ---- // constructor(), 20 wei -> -// gas irOptimized: 120218 -// gas irOptimized code: 132000 +// gas irOptimized: 119969 +// gas irOptimized code: 130800 // gas legacy: 130583 // gas legacy code: 261200 // gas legacyOptimized: 121069 diff --git a/test/libsolidity/semanticTests/functionCall/send_zero_ether.sol b/test/libsolidity/semanticTests/functionCall/send_zero_ether.sol index 8eeaf7b51cad..58003a998960 100644 --- a/test/libsolidity/semanticTests/functionCall/send_zero_ether.sol +++ b/test/libsolidity/semanticTests/functionCall/send_zero_ether.sol @@ -15,8 +15,8 @@ contract Main { } // ---- // constructor(), 20 wei -> -// gas irOptimized: 56314 -// gas irOptimized code: 37400 +// gas irOptimized: 56330 +// gas irOptimized code: 37600 // gas legacy: 57555 // gas legacy code: 53000 // gas legacyOptimized: 56463 diff --git a/test/libsolidity/semanticTests/functionTypes/store_function.sol b/test/libsolidity/semanticTests/functionTypes/store_function.sol index 904bc705f725..e22d0ba610c7 100644 --- a/test/libsolidity/semanticTests/functionTypes/store_function.sol +++ b/test/libsolidity/semanticTests/functionTypes/store_function.sol @@ -25,7 +25,7 @@ contract C { } // ---- // t() -> 9 -// gas irOptimized: 77300 +// gas irOptimized: 77288 // gas irOptimized code: 19000 // gas legacy: 79492 // gas legacy code: 69600 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..b591bf014df8 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: 73107 +// gas irOptimized code: 290400 // 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..8489f0fd72f8 100644 --- a/test/libsolidity/semanticTests/immutable/multi_creation.sol +++ b/test/libsolidity/semanticTests/immutable/multi_creation.sol @@ -29,7 +29,7 @@ contract C { // EVMVersion: >=constantinople // ---- // f() -> 3, 7, 5 -// gas irOptimized: 86892 +// gas irOptimized: 86880 // gas irOptimized code: 37200 // gas legacy: 87839 // gas legacy code: 60800 diff --git a/test/libsolidity/semanticTests/inheritance/address_overload_resolution.sol b/test/libsolidity/semanticTests/inheritance/address_overload_resolution.sol index f339b52445a4..729d69999394 100644 --- a/test/libsolidity/semanticTests/inheritance/address_overload_resolution.sol +++ b/test/libsolidity/semanticTests/inheritance/address_overload_resolution.sol @@ -22,12 +22,12 @@ contract D { // EVMVersion: >=constantinople // ---- // f() -> 1 -// gas irOptimized: 54014 +// gas irOptimized: 54008 // gas irOptimized code: 20200 // gas legacy: 54553 // gas legacy code: 57800 // g() -> 5 -// gas irOptimized: 54042 +// gas irOptimized: 54036 // gas irOptimized code: 20200 // gas legacy: 55090 // gas legacy code: 57800 diff --git a/test/libsolidity/semanticTests/inheritance/constructor_with_params.sol b/test/libsolidity/semanticTests/inheritance/constructor_with_params.sol index c88802029258..cb81847aed36 100644 --- a/test/libsolidity/semanticTests/inheritance/constructor_with_params.sol +++ b/test/libsolidity/semanticTests/inheritance/constructor_with_params.sol @@ -9,7 +9,7 @@ contract C { } // ---- // constructor(): 2, 0 -> -// gas irOptimized: 81170 +// gas irOptimized: 81151 // gas irOptimized code: 20200 // gas legacy: 83613 // gas legacy code: 32000 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..21d2298e557c 100644 --- a/test/libsolidity/semanticTests/inheritance/constructor_with_params_diamond_inheritance.sol +++ b/test/libsolidity/semanticTests/inheritance/constructor_with_params_diamond_inheritance.sol @@ -21,7 +21,7 @@ contract D is B, C { } // ---- // constructor(): 2, 0 -> -// gas irOptimized: 124350 +// gas irOptimized: 124331 // gas irOptimized code: 27600 // gas legacy: 128222 // gas legacy code: 40400 diff --git a/test/libsolidity/semanticTests/inheritance/constructor_with_params_inheritance.sol b/test/libsolidity/semanticTests/inheritance/constructor_with_params_inheritance.sol index 097e2f8088c9..99533b7e07b8 100644 --- a/test/libsolidity/semanticTests/inheritance/constructor_with_params_inheritance.sol +++ b/test/libsolidity/semanticTests/inheritance/constructor_with_params_inheritance.sol @@ -12,7 +12,7 @@ contract D is C { } // ---- // constructor(): 2, 0 -> -// gas irOptimized: 101581 +// gas irOptimized: 101562 // gas irOptimized code: 20200 // gas legacy: 105192 // gas legacy code: 32000 diff --git a/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_calldata_interface.sol b/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_calldata_interface.sol index e9013d6f52be..1c0073b7167a 100644 --- a/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_calldata_interface.sol +++ b/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_calldata_interface.sol @@ -22,7 +22,7 @@ contract B { } // ---- // g() -> 42 -// gas irOptimized: 54536 +// gas irOptimized: 54524 // gas irOptimized code: 24800 // gas legacy: 55868 // gas legacy code: 66600 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 36ed3706243a..ff773ad93d78 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,7 @@ contract B { } // ---- // g() -> 42 -// gas irOptimized: 54828 +// gas irOptimized: 54816 // gas irOptimized code: 42000 // gas legacy: 56839 // gas legacy code: 123600 diff --git a/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol b/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol index 39b25c005f0e..6deb9eaf556d 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: 143564 +// 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 d3714e7dfca5..9f078fd6b63a 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/transient_storage_low_level_calls.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/transient_storage_low_level_calls.sol @@ -68,7 +68,7 @@ contract C { // testCall() -> true // tloadAllowedStaticCall() -> true // tstoreNotAllowedStaticCall() -> true -// gas irOptimized: 98419721 +// gas irOptimized: 98419720 // gas irOptimized code: 19000 // gas legacy: 98409087 // gas legacy code: 30000 diff --git a/test/libsolidity/semanticTests/inlineAssembly/transient_storage_selfdestruct.sol b/test/libsolidity/semanticTests/inlineAssembly/transient_storage_selfdestruct.sol index 26bb09edca7a..fa8827b82e17 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/transient_storage_selfdestruct.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/transient_storage_selfdestruct.sol @@ -41,8 +41,8 @@ contract D { // bytecodeFormat: legacy // ---- // constructor() -> -// gas irOptimized: 127596 -// gas irOptimized code: 221000 +// gas irOptimized: 127216 +// gas irOptimized code: 218000 // gas legacy: 149480 // gas legacy code: 501200 // gas legacyOptimized: 125846 diff --git a/test/libsolidity/semanticTests/libraries/using_library_mappings_public.sol b/test/libsolidity/semanticTests/libraries/using_library_mappings_public.sol index 17406a907a47..3a5262c6a925 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: 119834 // 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..85376381e233 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: 119564 // gas legacy: 125087 // gas legacyOptimized: 120120 diff --git a/test/libsolidity/semanticTests/saltedCreate/salted_create_with_value.sol b/test/libsolidity/semanticTests/saltedCreate/salted_create_with_value.sol index c810000e5b3c..ecbe03fadaf5 100644 --- a/test/libsolidity/semanticTests/saltedCreate/salted_create_with_value.sol +++ b/test/libsolidity/semanticTests/saltedCreate/salted_create_with_value.sol @@ -22,7 +22,7 @@ contract A { // bytecodeFormat: legacy // ---- // f(), 10 ether -> 3007, 3008, 3009 -// gas irOptimized: 187022 +// gas irOptimized: 186995 // gas irOptimized code: 67200 // gas legacy: 190858 // gas legacy code: 190200 diff --git a/test/libsolidity/semanticTests/smoke/constructor.sol b/test/libsolidity/semanticTests/smoke/constructor.sol index d5c5280aef4b..5a551d544678 100644 --- a/test/libsolidity/semanticTests/smoke/constructor.sol +++ b/test/libsolidity/semanticTests/smoke/constructor.sol @@ -12,7 +12,7 @@ contract C { } // ---- // constructor(), 2 wei: 3 -> -// gas irOptimized: 78996 +// gas irOptimized: 78977 // gas irOptimized code: 25400 // gas legacy: 83055 // gas legacy code: 65200 diff --git a/test/libsolidity/semanticTests/storage/empty_nonempty_empty.sol b/test/libsolidity/semanticTests/storage/empty_nonempty_empty.sol index 8d72f7c04358..d1706ab1bb59 100644 --- a/test/libsolidity/semanticTests/storage/empty_nonempty_empty.sol +++ b/test/libsolidity/semanticTests/storage/empty_nonempty_empty.sol @@ -22,12 +22,12 @@ contract Test { // set(bytes): 0x20, 0 // storageEmpty -> 1 // set(bytes): 0x20, 66, "12345678901234567890123456789012", "12345678901234567890123456789012", "12" -// gas irOptimized: 111820 +// gas irOptimized: 111817 // gas legacy: 112734 // gas legacyOptimized: 112089 // storageEmpty -> 0 // set(bytes): 0x20, 3, "abc" -// gas irOptimized: 33989 +// gas irOptimized: 33984 // storageEmpty -> 0 // set(bytes): 0x20, 0 // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol b/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol index 7d19bc47162e..c10bc9d53e20 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: 132626 // gas legacy: 136010 // gas legacyOptimized: 133478 diff --git a/test/libsolidity/semanticTests/storage/static_array_copy_cleanup.sol b/test/libsolidity/semanticTests/storage/static_array_copy_cleanup.sol index ca471161d5e2..411aa63e1a6b 100644 --- a/test/libsolidity/semanticTests/storage/static_array_copy_cleanup.sol +++ b/test/libsolidity/semanticTests/storage/static_array_copy_cleanup.sol @@ -68,13 +68,13 @@ contract C { // getSourceAsUint() -> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // getDestAsUint() -> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // fillSource() -// gas irOptimized: 135018 +// gas irOptimized: 137648 // gas legacy: 146851 // gas legacyOptimized: 137549 // canary() -> 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff // getSourceAsUint() -> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 // fillDest() -// gas irOptimized: 248706 +// gas irOptimized: 253966 // gas legacy: 272468 // gas legacyOptimized: 253871 // canary() -> 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff diff --git a/test/libsolidity/semanticTests/storage/storage_boundary_delete_overflow_bug.sol b/test/libsolidity/semanticTests/storage/storage_boundary_delete_overflow_bug.sol index 09aae988e511..a3069f378bbb 100644 --- a/test/libsolidity/semanticTests/storage/storage_boundary_delete_overflow_bug.sol +++ b/test/libsolidity/semanticTests/storage/storage_boundary_delete_overflow_bug.sol @@ -51,30 +51,30 @@ contract C { // ---- // x() -> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -// gas irOptimized: 604108 +// gas irOptimized: 604105 // gas legacy: 644983 // gas legacyOptimized: 598016 // fillArray() -// gas irOptimized: 5782148 +// gas irOptimized: 5781383 // gas legacy: 6044562 // gas legacyOptimized: 5853893 // x() -> 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 -// gas irOptimized: 604108 +// gas irOptimized: 604105 // gas legacy: 644983 // gas legacyOptimized: 598016 // partialAssignArray() -// gas irOptimized: 1067376 +// gas irOptimized: 1067373 // gas legacy: 1177356 // gas legacyOptimized: 1068067 // x() -> 11, 22, 33, 44, 55, 66, 77, 88, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -// gas irOptimized: 604108 +// gas irOptimized: 604105 // gas legacy: 644983 // gas legacyOptimized: 598016 // clearArray() -// gas irOptimized: 580378 +// gas irOptimized: 580375 // gas legacy: 582973 // gas legacyOptimized: 581299 // x() -> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -// gas irOptimized: 604108 +// gas irOptimized: 604105 // gas legacy: 644983 // gas legacyOptimized: 598016 diff --git a/test/libsolidity/semanticTests/storage/storage_boundary_struct_array_mixed_types.sol b/test/libsolidity/semanticTests/storage/storage_boundary_struct_array_mixed_types.sol index 444f86286453..4e7c3c464e44 100644 --- a/test/libsolidity/semanticTests/storage/storage_boundary_struct_array_mixed_types.sol +++ b/test/libsolidity/semanticTests/storage/storage_boundary_struct_array_mixed_types.sol @@ -106,7 +106,7 @@ contract C { // gas legacy: 120738 // gas legacyOptimized: 112505 // fillBoundaryArray() -// gas irOptimized: 912522 +// gas irOptimized: 914882 // gas legacy: 930728 // gas legacyOptimized: 916628 // canaryValue() -> 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff @@ -119,9 +119,9 @@ contract C { // gas legacy: 120738 // gas legacyOptimized: 112505 // copyFromBoundary() -// gas irOptimized: 994579 +// gas irOptimized: 995969 // gas legacy: 1023407 -// gas legacyOptimized: 994746 +// gas legacyOptimized: 994716 // canaryValue() -> 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff // boundaryArray() -> 1, 2, 3, 4, true, 6, 7, 8, 9, true, 11, 12, 13, 14, true, 16, 17, 18, 19, true, 21, 22, 23, 24, true, 26, 27, 28, 29, true, 31, 32, 33, 34, true, 36, 37, 38, 39, true, 41, 42, 43, 44, true, 46, 47, 48, 49, true // gas irOptimized: 113169 @@ -132,7 +132,7 @@ contract C { // gas legacy: 120738 // gas legacyOptimized: 112505 // fillDestArray() -// gas irOptimized: 200426 +// gas irOptimized: 202786 // gas legacy: 218746 // gas legacyOptimized: 204648 // canaryValue() -> 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff @@ -145,9 +145,9 @@ contract C { // gas legacy: 120738 // gas legacyOptimized: 112505 // copyToBoundary() -// gas irOptimized: 282623 +// gas irOptimized: 284013 // gas legacy: 311362 -// gas legacyOptimized: 282712 +// gas legacyOptimized: 282682 // canaryValue() -> 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff // boundaryArray() -> 51, 52, 53, 54, true, 56, 57, 58, 59, true, 61, 62, 63, 64, true, 66, 67, 68, 69, true, 71, 72, 73, 74, true, 76, 77, 78, 79, true, 81, 82, 83, 84, true, 86, 87, 88, 89, true, 91, 92, 93, 94, true, 96, 97, 98, 99, true // gas irOptimized: 113169 @@ -158,7 +158,7 @@ contract C { // gas legacy: 120738 // gas legacyOptimized: 112505 // deleteBoundaryArray() -// gas irOptimized: 177968 +// gas irOptimized: 177896 // gas legacy: 180995 // gas legacyOptimized: 178182 // canaryValue() -> 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff diff --git a/test/libsolidity/semanticTests/storage/storage_boundary_struct_array_multislot.sol b/test/libsolidity/semanticTests/storage/storage_boundary_struct_array_multislot.sol index 05ad53cf0bfa..b909823d225b 100644 --- a/test/libsolidity/semanticTests/storage/storage_boundary_struct_array_multislot.sol +++ b/test/libsolidity/semanticTests/storage/storage_boundary_struct_array_multislot.sol @@ -120,7 +120,7 @@ contract C { // boundaryArray() -> 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60 // destArray() -> 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60 // deleteBoundaryArray() -// gas irOptimized: 137824 +// gas irOptimized: 137784 // gas legacy: 137971 // gas legacyOptimized: 137750 // canaryValue() -> 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff diff --git a/test/libsolidity/semanticTests/storage/storage_boundary_struct_array_packed.sol b/test/libsolidity/semanticTests/storage/storage_boundary_struct_array_packed.sol index 5b4085acf8f9..9824c6ba5ba3 100644 --- a/test/libsolidity/semanticTests/storage/storage_boundary_struct_array_packed.sol +++ b/test/libsolidity/semanticTests/storage/storage_boundary_struct_array_packed.sol @@ -96,16 +96,16 @@ contract C { // boundaryArray() -> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // destArray() -> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // fillBoundaryArray() -// gas irOptimized: 248990 +// gas irOptimized: 254250 // gas legacy: 272856 // gas legacyOptimized: 253856 // canaryValue() -> 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff // boundaryArray() -> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 // destArray() -> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // copyFromBoundary() -// gas irOptimized: 274279 +// gas irOptimized: 275419 // gas legacy: 298927 -// gas legacyOptimized: 272256 +// gas legacyOptimized: 274956 // canaryValue() -> 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff // boundaryArray() -> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 // destArray() -> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 @@ -116,9 +116,9 @@ contract C { // destArray() -> 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80 // gas legacy: 59729 // copyToBoundary() -// gas irOptimized: 103323 +// gas irOptimized: 104463 // gas legacy: 127882 -// gas legacyOptimized: 101222 +// gas legacyOptimized: 103922 // canaryValue() -> 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff // boundaryArray() -> 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80 // destArray() -> 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80 diff --git a/test/libsolidity/semanticTests/storageLayoutSpecifier/constructor.sol b/test/libsolidity/semanticTests/storageLayoutSpecifier/constructor.sol index c30f9dab98a7..65e423eb87f9 100644 --- a/test/libsolidity/semanticTests/storageLayoutSpecifier/constructor.sol +++ b/test/libsolidity/semanticTests/storageLayoutSpecifier/constructor.sol @@ -18,7 +18,7 @@ contract C is B layout at 7 { } // ---- // constructor(): 1, 2, 3 -// gas irOptimized: 104178 +// gas irOptimized: 104159 // gas irOptimized code: 30000 // gas legacy: 114749 // gas legacy code: 71400 diff --git a/test/libsolidity/semanticTests/storageLayoutSpecifier/delete.sol b/test/libsolidity/semanticTests/storageLayoutSpecifier/delete.sol index a6cc84cce511..d227f1622e68 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: 111112 // 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..f6bd98bc70c8 100644 --- a/test/libsolidity/semanticTests/storageLayoutSpecifier/dynamic_array_storage_end.sol +++ b/test/libsolidity/semanticTests/storageLayoutSpecifier/dynamic_array_storage_end.sol @@ -16,7 +16,7 @@ contract C layout at 2**256 - 2 { } // ---- // init() -> -// gas irOptimized: 22738151 +// gas irOptimized: 22735151 // gas legacy: 22699167 // gas legacyOptimized: 22541160 // validate() -> @@ -24,6 +24,6 @@ contract C layout at 2**256 - 2 { // gas legacy: 2560245 // gas legacyOptimized: 2442238 // clear() -> -// gas irOptimized: 4449608 +// gas irOptimized: 4447208 // gas legacy: 4300019 // gas legacyOptimized: 4302413 diff --git a/test/libsolidity/semanticTests/storageLayoutSpecifier/state_variable_dynamic_array.sol b/test/libsolidity/semanticTests/storageLayoutSpecifier/state_variable_dynamic_array.sol index bcad9609ee07..96b7c393419e 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: 111977 // gas legacy: 111679 // gas legacyOptimized: 111150 // arrayA(uint256): 0 -> 1 // arrayALength() -> 3 // arrayCLength() -> 0 // initCFromAInReverse() -> 3, 2, 1 -// gas irOptimized: 121281 +// gas irOptimized: 121272 // gas legacy: 121937 // gas legacyOptimized: 120853 // clearA() -> diff --git a/test/libsolidity/semanticTests/storageLayoutSpecifier/storage_reference_array.sol b/test/libsolidity/semanticTests/storageLayoutSpecifier/storage_reference_array.sol index db14ef55874c..9476a6c0629a 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: 273526 // gas legacy: 274795 // gas legacyOptimized: 271954 // array(uint256): 0 -> 1 diff --git a/test/libsolidity/semanticTests/structs/copy_from_mapping.sol b/test/libsolidity/semanticTests/structs/copy_from_mapping.sol index fccdf0030ffb..0645a5d21c26 100644 --- a/test/libsolidity/semanticTests/structs/copy_from_mapping.sol +++ b/test/libsolidity/semanticTests/structs/copy_from_mapping.sol @@ -36,8 +36,8 @@ contract C { } // ---- // to_state() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 121282 +// gas irOptimized: 121276 // gas legacy: 125480 -// gas legacyOptimized: 121695 +// gas legacyOptimized: 121693 // to_storage() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 // to_memory() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 diff --git a/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol b/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol index 9f0b7cbe64c9..353a49292c7f 100644 --- a/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol +++ b/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol @@ -44,8 +44,8 @@ contract C { } // ---- // to_state() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 121454 +// gas irOptimized: 121448 // gas legacy: 125617 -// gas legacyOptimized: 121699 +// gas legacyOptimized: 121697 // to_storage() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 // to_memory() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 diff --git a/test/libsolidity/semanticTests/structs/copy_substructures_to_mapping.sol b/test/libsolidity/semanticTests/structs/copy_substructures_to_mapping.sol index 3e86495713be..c6753dc680c4 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: 122714 // gas legacy: 125558 -// gas legacyOptimized: 123322 +// gas legacyOptimized: 123320 // from_state() -> 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 121424 +// gas irOptimized: 121418 // gas legacy: 125693 -// gas legacyOptimized: 121804 +// gas legacyOptimized: 121802 // 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: 114846 // gas legacy: 117950 -// gas legacyOptimized: 115526 +// gas legacyOptimized: 115524 diff --git a/test/libsolidity/semanticTests/structs/copy_to_mapping.sol b/test/libsolidity/semanticTests/structs/copy_to_mapping.sol index b31d0e580444..f8ba3c206cb6 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: 121509 // gas legacy: 125554 -// gas legacyOptimized: 121747 +// gas legacyOptimized: 121745 // from_storage() -> 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 121559 +// gas irOptimized: 121553 // gas legacy: 125612 -// gas legacyOptimized: 121799 +// gas legacyOptimized: 121797 // from_memory() -> 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 122740 +// gas irOptimized: 122734 // gas legacy: 125423 -// gas legacyOptimized: 123323 +// gas legacyOptimized: 123321 // 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: 114856 // gas legacy: 118207 -// gas legacyOptimized: 115327 +// gas legacyOptimized: 115325 diff --git a/test/libsolidity/semanticTests/structs/struct_copy_calldata_to_storage_nested_dynamic_array_v2.sol b/test/libsolidity/semanticTests/structs/struct_copy_calldata_to_storage_nested_dynamic_array_v2.sol index 2767486131d8..ccdf0207fe76 100644 --- a/test/libsolidity/semanticTests/structs/struct_copy_calldata_to_storage_nested_dynamic_array_v2.sol +++ b/test/libsolidity/semanticTests/structs/struct_copy_calldata_to_storage_nested_dynamic_array_v2.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: 202890 // gas legacy: 207376 // gas legacyOptimized: 203583 diff --git a/test/libsolidity/semanticTests/structs/struct_delete_storage_nested_small.sol b/test/libsolidity/semanticTests/structs/struct_delete_storage_nested_small.sol index 12cbf0799e04..2b9f00b5b49b 100644 --- a/test/libsolidity/semanticTests/structs/struct_delete_storage_nested_small.sol +++ b/test/libsolidity/semanticTests/structs/struct_delete_storage_nested_small.sol @@ -33,4 +33,4 @@ contract C { // compileViaYul: true // ---- // f() -> 0, 0, 0 -// gas irOptimized: 93835 +// gas irOptimized: 93832 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 7ae78437e408..6e559176e1af 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: 113583 // gas legacyOptimized: 113119 // g() -> -// gas irOptimized: 118768 +// gas irOptimized: 118754 // gas legacy: 118761 // gas legacyOptimized: 118203 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..c1823e848f99 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: 110691 // gas legacy: 111990 // gas legacyOptimized: 110546 diff --git a/test/libsolidity/semanticTests/userDefinedValueType/calldata.sol b/test/libsolidity/semanticTests/userDefinedValueType/calldata.sol index 63f1ff1dd18e..26cd380c5f63 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: 122114 +// gas irOptimized: 122087 // gas legacy: 126159 // gas legacyOptimized: 122742 // test_g() -> true -// gas irOptimized: 106248 +// gas irOptimized: 106218 // gas legacy: 111821 // gas legacyOptimized: 106591 // addresses(uint256): 0 -> 0x18 diff --git a/test/libsolidity/semanticTests/userDefinedValueType/calldata_to_storage.sol b/test/libsolidity/semanticTests/userDefinedValueType/calldata_to_storage.sol index 0815a2da7ace..edd19c4bdbcc 100644 --- a/test/libsolidity/semanticTests/userDefinedValueType/calldata_to_storage.sol +++ b/test/libsolidity/semanticTests/userDefinedValueType/calldata_to_storage.sol @@ -34,7 +34,7 @@ contract C { // small(uint256): 0 -> 1 // small(uint256): 1 -> 2 // h(bytes2[]): 0x20, 3, "ab", "cd", "ef" -> 0x20, 3, "ab", "cd", "ef" -// gas irOptimized: 68635 +// gas irOptimized: 68626 // gas legacy: 71231 // gas legacyOptimized: 69289 // l(uint256): 0 -> 0x6162000000000000000000000000000000000000000000000000000000000000 diff --git a/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol b/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol index acd9ea840895..8ef3c38826f8 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: 121466 +// gas irOptimized code: 236400 // gas legacy: 163350 // gas legacy code: 671400 // gas legacyOptimized: 127464 @@ -125,7 +125,7 @@ contract ERC20 { // gas legacyOptimized: 23367 // transfer(address,uint256): 2, 5 -> true // ~ emit Transfer(address,address,uint256): #0x1212121212121212121212121212120000000012, #0x02, 0x05 -// gas irOptimized: 50997 +// gas irOptimized: 50994 // gas legacy: 52323 // gas legacyOptimized: 51380 // decreaseAllowance(address,uint256): 2, 0 -> true @@ -139,10 +139,10 @@ contract ERC20 { // gas legacyOptimized: 24076 // transfer(address,uint256): 2, 14 -> true // ~ emit Transfer(address,address,uint256): #0x1212121212121212121212121212120000000012, #0x02, 0x0e -// gas irOptimized: 33897 +// gas irOptimized: 33894 // gas legacy: 35223 // gas legacyOptimized: 34280 // transfer(address,uint256): 2, 2 -> FAILURE, hex"4e487b71", 0x11 -// gas irOptimized: 23990 +// gas irOptimized: 23987 // gas legacy: 24483 // gas legacyOptimized: 24072 diff --git a/test/libsolidity/semanticTests/userDefinedValueType/memory_to_storage.sol b/test/libsolidity/semanticTests/userDefinedValueType/memory_to_storage.sol index 6e07e74e9f71..85ef21860f74 100644 --- a/test/libsolidity/semanticTests/userDefinedValueType/memory_to_storage.sol +++ b/test/libsolidity/semanticTests/userDefinedValueType/memory_to_storage.sol @@ -23,7 +23,7 @@ contract C { // ---- // s() -> 0, 0, 0x00, 0 // f((uint8,uint16,bytes2,uint8)): 1, 0xff, "ab", 15 -> -// gas irOptimized: 44360 +// gas irOptimized: 44351 // gas legacy: 46189 // gas legacyOptimized: 44673 // s() -> 1, 0xff, 0x6162000000000000000000000000000000000000000000000000000000000000, 15 @@ -34,7 +34,7 @@ contract C { // small(uint256): 0 -> 1 // small(uint256): 1 -> 2 // h(bytes2[]): 0x20, 3, "ab", "cd", "ef" -> 0x20, 3, "ab", "cd", "ef" -// gas irOptimized: 68937 +// gas irOptimized: 68928 // gas legacy: 72167 // gas legacyOptimized: 69802 // l(uint256): 0 -> 0x6162000000000000000000000000000000000000000000000000000000000000 diff --git a/test/libsolidity/semanticTests/various/address_code.sol b/test/libsolidity/semanticTests/various/address_code.sol index eda17b3c2775..99ee0ad9bdaa 100644 --- a/test/libsolidity/semanticTests/various/address_code.sol +++ b/test/libsolidity/semanticTests/various/address_code.sol @@ -16,8 +16,8 @@ contract C { // bytecodeFormat: legacy // ---- // constructor() -> -// gas irOptimized: 70924 -// gas irOptimized code: 94600 +// gas irOptimized: 70966 +// gas irOptimized code: 95600 // gas legacy: 82688 // gas legacy code: 153800 // gas legacyOptimized: 69675 diff --git a/test/libsolidity/semanticTests/various/create_calldata.sol b/test/libsolidity/semanticTests/various/create_calldata.sol index c4d17d4299ca..bca1f8ab693f 100644 --- a/test/libsolidity/semanticTests/various/create_calldata.sol +++ b/test/libsolidity/semanticTests/various/create_calldata.sol @@ -10,8 +10,8 @@ contract C { // bytecodeFormat: legacy // ---- // constructor(): 42 -> -// gas irOptimized: 68387 -// gas irOptimized code: 69000 +// gas irOptimized: 68448 +// gas irOptimized code: 70000 // gas legacy: 78348 // gas legacy code: 90200 // gas legacyOptimized: 68548 diff --git a/test/libsolidity/semanticTests/various/destructuring_assignment.sol b/test/libsolidity/semanticTests/various/destructuring_assignment.sol index 44fcd0f6aaa2..16e6be3d284f 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: 242037 +// gas irOptimized: 242028 // gas legacy: 246685 // gas legacyOptimized: 242396 diff --git a/test/libsolidity/semanticTests/various/different_call_type_transient.sol b/test/libsolidity/semanticTests/various/different_call_type_transient.sol index 399cbd02dfa1..42e4523ddd1d 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: 96900693 // gas legacy: 96901136 // gas legacyOptimized: 96900725 diff --git a/test/libsolidity/semanticTests/various/erc20.sol b/test/libsolidity/semanticTests/various/erc20.sol index 13b914d9b80b..84f34763082e 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: 121782 +// gas irOptimized code: 238600 // gas legacy: 159957 // gas legacy code: 647600 // gas legacyOptimized: 126934 @@ -108,7 +108,7 @@ contract ERC20 { // gas legacyOptimized: 23367 // transfer(address,uint256): 2, 5 -> true // ~ emit Transfer(address,address,uint256): #0x1212121212121212121212121212120000000012, #0x02, 0x05 -// gas irOptimized: 51054 +// gas irOptimized: 51051 // gas legacy: 52073 // gas legacyOptimized: 51298 // decreaseAllowance(address,uint256): 2, 0 -> true @@ -122,10 +122,10 @@ contract ERC20 { // gas legacyOptimized: 24056 // transfer(address,uint256): 2, 14 -> true // ~ emit Transfer(address,address,uint256): #0x1212121212121212121212121212120000000012, #0x02, 0x0e -// gas irOptimized: 33954 +// gas irOptimized: 33951 // gas legacy: 34973 // gas legacyOptimized: 34198 // transfer(address,uint256): 2, 2 -> FAILURE, hex"4e487b71", 0x11 -// gas irOptimized: 24020 +// gas irOptimized: 24017 // gas legacy: 24445 // gas legacyOptimized: 24052 diff --git a/test/libsolidity/semanticTests/various/selfdestruct_post_cancun.sol b/test/libsolidity/semanticTests/various/selfdestruct_post_cancun.sol index bf70caee5b54..aceded2af60e 100644 --- a/test/libsolidity/semanticTests/various/selfdestruct_post_cancun.sol +++ b/test/libsolidity/semanticTests/various/selfdestruct_post_cancun.sol @@ -65,8 +65,8 @@ contract D { // bytecodeFormat: legacy // ---- // constructor(), 1 ether -> -// gas irOptimized: 67028 -// gas irOptimized code: 175400 +// gas irOptimized: 66717 +// gas irOptimized code: 171600 // gas legacy: 76227 // gas legacy code: 298200 // gas legacyOptimized: 66516 diff --git a/test/libsolidity/semanticTests/various/selfdestruct_post_cancun_multiple_beneficiaries.sol b/test/libsolidity/semanticTests/various/selfdestruct_post_cancun_multiple_beneficiaries.sol index 7629fabc1ce2..503fa9ab389d 100644 --- a/test/libsolidity/semanticTests/various/selfdestruct_post_cancun_multiple_beneficiaries.sol +++ b/test/libsolidity/semanticTests/various/selfdestruct_post_cancun_multiple_beneficiaries.sol @@ -36,8 +36,8 @@ contract D { // bytecodeFormat: legacy // ---- // constructor(), 2 ether -> -// gas irOptimized: 108104 -// gas irOptimized code: 119200 +// gas irOptimized: 107877 +// gas irOptimized code: 116200 // gas legacy: 120439 // gas legacy code: 253800 // gas legacyOptimized: 109015 @@ -47,8 +47,8 @@ contract D { // balance -> 2000000000000000000 // exists() -> false // test_deploy_and_terminate_twice() -> -// gas irOptimized: 121395 -// gas irOptimized code: 14000 +// gas irOptimized: 121368 +// gas irOptimized code: 13800 // gas legacy: 122386 // gas legacy code: 43200 // gas legacyOptimized: 121596 diff --git a/test/libsolidity/semanticTests/various/selfdestruct_post_cancun_redeploy.sol b/test/libsolidity/semanticTests/various/selfdestruct_post_cancun_redeploy.sol index c9f50046c07d..2f31070cd017 100644 --- a/test/libsolidity/semanticTests/various/selfdestruct_post_cancun_redeploy.sol +++ b/test/libsolidity/semanticTests/various/selfdestruct_post_cancun_redeploy.sol @@ -83,8 +83,8 @@ contract D { // bytecodeFormat: legacy // ---- // constructor(), 1 ether -> -// gas irOptimized: 132974 -// gas irOptimized code: 293800 +// gas irOptimized: 132757 +// gas irOptimized code: 293000 // gas legacy: 151236 // gas legacy code: 533800 // gas legacyOptimized: 131436 @@ -92,7 +92,7 @@ contract D { // exists() -> false // test_deploy_and_terminate() -> // ~ emit Deployed(address,bytes32) from 0x137aa4dfc0911524504fcd4d98501f179bc13b4a: 0x7e6580007e709ac52945fae182c61131d42634e8, 0x1234000000000000000000000000000000000000000000000000000000000000 -// gas irOptimized: 96528 +// gas irOptimized: 96532 // gas irOptimized code: 20800 // gas legacy: 97788 // gas legacy code: 20800 @@ -107,6 +107,6 @@ contract D { // test_balance_after_selfdestruct() -> // exists() -> true // deploy_create2() -> FAILURE -// gas irOptimized: 96903654 +// gas irOptimized: 96903650 // gas legacy: 96903658 // gas legacyOptimized: 96903639 diff --git a/test/libsolidity/semanticTests/various/senders_balance.sol b/test/libsolidity/semanticTests/various/senders_balance.sol index fff16befe69e..9ae7acd237c5 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: 113840 +// gas irOptimized code: 53000 // 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 1af8a04195a4..4938558e0f84 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: 178198 // gas legacy: 181357 // gas legacyOptimized: 179055 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..5c02e301e825 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: 113204 // gas legacy: 112888 // gas legacyOptimized: 112580 diff --git a/test/libyul/YulOptimizerTestCommon.cpp b/test/libyul/YulOptimizerTestCommon.cpp index cd54318c19ef..b6fdc4bf7358 100644 --- a/test/libyul/YulOptimizerTestCommon.cpp +++ b/test/libyul/YulOptimizerTestCommon.cpp @@ -413,9 +413,7 @@ YulOptimizerTestCommon::YulOptimizerTestCommon(std::shared_ptr _ob return block; }}, {"fullSuite", [&]() { - GasMeter meter(dynamic_cast(*m_object->dialect()), false, 200); OptimiserSuite::run( - &meter, *m_optimizedObject, true, frontend::OptimiserSettings::DefaultYulOptimiserSteps, diff --git a/test/libyul/yulOptimizerTests/fullSuite/abi2.yul b/test/libyul/yulOptimizerTests/fullSuite/abi2.yul index 2f2e060be089..68302186bdca 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/abi2.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/abi2.yul @@ -1080,7 +1080,7 @@ // let _1 := mload(1) // let _2 := mload(0) // if slt(sub(_1, _2), 64) { revert(0, 0) } -// sstore(0, and(calldataload(_2), sub(shl(160, 1), 1))) +// sstore(0, and(calldataload(_2), 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)) // let x0, x1, x2, x3, x4 := abi_decode_addresst_uint256t_bytes_calldatat_enum_Operation(mload(7), mload(8)) // sstore(x1, x0) // sstore(x3, x2) @@ -1090,7 +1090,7 @@ // function abi_decode_addresst_uint256t_bytes_calldatat_enum_Operation(headStart, dataEnd) -> value0, value1, value2, value3, value4 // { // if slt(sub(dataEnd, headStart), 128) { revert(0, 0) } -// value0 := and(calldataload(headStart), sub(shl(160, 1), 1)) +// value0 := and(calldataload(headStart), 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) // value1 := calldataload(add(headStart, 32)) // let offset := calldataload(add(headStart, 64)) // if gt(offset, 0xffffffffffffffff) { revert(0, 0) } @@ -1107,7 +1107,7 @@ // { // tail := add(headStart, 352) // mstore(headStart, value0) -// mstore(add(headStart, 32), and(value1, sub(shl(160, 1), 1))) +// mstore(add(headStart, 32), and(value1, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)) // mstore(add(headStart, 64), value2) // mstore(add(headStart, 96), value3) // if iszero(lt(value4, 3)) { invalid() } @@ -1115,8 +1115,8 @@ // mstore(add(headStart, 160), value5) // mstore(add(headStart, 192), value6) // mstore(add(headStart, 224), value7) -// mstore(add(headStart, 256), and(value8, sub(shl(160, 1), 1))) -// mstore(add(headStart, 288), and(value9, sub(shl(160, 1), 1))) +// mstore(add(headStart, 256), and(value8, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)) +// mstore(add(headStart, 288), and(value9, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)) // mstore(add(headStart, 320), value10) // } // function cleanup_revert_enum_Operation(value) -> cleaned diff --git a/test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul b/test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul index dbb87439f637..c56288a578cf 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul @@ -478,7 +478,7 @@ // let i_1 := 0 // for { } lt(i_1, 0x3) { i_1 := add(i_1, 1) } // { -// mstore(pos_1, and(mload(srcPtr_1), sub(shl(160, 1), 1))) +// mstore(pos_1, and(mload(srcPtr_1), 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)) // srcPtr_1 := add(srcPtr_1, 0x20) // pos_1 := add(pos_1, 0x20) // } diff --git a/test/libyul/yulOptimizerTests/fullSuite/ackermann_function.yul b/test/libyul/yulOptimizerTests/fullSuite/ackermann_function.yul index bf419017bf15..55d8a3023ba6 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/ackermann_function.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/ackermann_function.yul @@ -34,9 +34,11 @@ // case 0 { ret := add(n, 1) } // default { // switch n -// case 0 { ret := A(add(m, not(0)), 1) } +// case 0 { +// ret := A(add(m, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff), 1) +// } // default { -// ret := A(add(m, not(0)), A(m, add(n, not(0)))) +// ret := A(add(m, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff), A(m, add(n, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff))) // } // } // } diff --git a/test/libyul/yulOptimizerTests/fullSuite/ackermann_function_if.yul b/test/libyul/yulOptimizerTests/fullSuite/ackermann_function_if.yul index edf1a086faaa..96d340634339 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/ackermann_function_if.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/ackermann_function_if.yul @@ -42,9 +42,9 @@ // } // if iszero(n) // { -// ret := A(add(m, not(0)), 1) +// ret := A(add(m, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff), 1) // leave // } -// ret := A(add(m, not(0)), A(m, add(n, not(0)))) +// ret := A(add(m, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff), A(m, add(n, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff))) // } // } diff --git a/test/libyul/yulOptimizerTests/fullSuite/aztec.yul b/test/libyul/yulOptimizerTests/fullSuite/aztec.yul index e3ac520ccdd6..8fafc0adf54b 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/aztec.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/aztec.yul @@ -249,7 +249,7 @@ // mstore(0x00, 404) // revert(0x00, 0x20) // } -// let kn := calldataload(add(calldatasize(), not(191))) +// let kn := calldataload(add(calldatasize(), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff40)) // mstore(0x2a0, caller()) // mstore(0x2c0, kn) // mstore(0x2e0, m) @@ -319,7 +319,7 @@ // b := add(b, 0x40) // } // if lt(m, n) { validatePairing() } -// if iszero(eq(mod(keccak256(0x2a0, add(b, not(671))), 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001), challenge)) +// if iszero(eq(mod(keccak256(0x2a0, add(b, 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd60)), 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001), challenge)) // { // mstore(0, 404) // revert(0, 0x20) diff --git a/test/libyul/yulOptimizerTests/fullSuite/combine_shift_and_and_2.yul b/test/libyul/yulOptimizerTests/fullSuite/combine_shift_and_and_2.yul index 513a23aa5066..f9ab8ccf8e51 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/combine_shift_and_and_2.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/combine_shift_and_and_2.yul @@ -28,7 +28,7 @@ // sstore(11, b) // sstore(12, b) // sstore(13, 0) -// sstore(14, and(shl(251, x), shl(255, 1))) +// sstore(14, and(shl(251, x), 0x8000000000000000000000000000000000000000000000000000000000000000)) // sstore(0xf, 0) // sstore(16, 0) // } diff --git a/test/libyul/yulOptimizerTests/fullSuite/combine_shift_and_and_3.yul b/test/libyul/yulOptimizerTests/fullSuite/combine_shift_and_and_3.yul index 17de07de7cd7..6c9695344bc1 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/combine_shift_and_and_3.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/combine_shift_and_and_3.yul @@ -23,10 +23,10 @@ // let _1 := shl(8, x) // let _2 := shr(8, x) // sstore(15, x) -// sstore(16, and(_1, not(4095))) -// sstore(17, and(_2, sub(shl(248, 1), 16))) -// sstore(18, and(_2, sub(shl(244, 1), 1))) -// sstore(19, and(_1, sub(shl(252, 1), 256))) +// sstore(16, and(_1, 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000)) +// sstore(17, and(_2, 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0)) +// sstore(18, and(_2, 0x0fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)) +// sstore(19, and(_1, 0x0fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00)) // sstore(20, 0) // } // } diff --git a/test/libyul/yulOptimizerTests/fullSuite/create2_and_mask.yul b/test/libyul/yulOptimizerTests/fullSuite/create2_and_mask.yul index f0c54556a423..63825edcb035 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/create2_and_mask.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/create2_and_mask.yul @@ -14,7 +14,7 @@ // // { // { -// let a := and(create2(0, 0, 0x20, 0), sub(shl(160, 1), 1)) -// sstore(a, and(sub(shl(160, 1), 1), create2(0, 0, 0x20, 0))) +// let a := and(create2(0, 0, 0x20, 0), 0xffffffffffffffffffffffffffffffffffffffff) +// sstore(a, and(0xffffffffffffffffffffffffffffffffffffffff, create2(0, 0, 0x20, 0))) // } // } diff --git a/test/libyul/yulOptimizerTests/fullSuite/create_and_mask.yul b/test/libyul/yulOptimizerTests/fullSuite/create_and_mask.yul index 984d9a458d8c..47e0b39ac8cc 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/create_and_mask.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/create_and_mask.yul @@ -14,7 +14,7 @@ // // { // { -// let a := and(create(0, 0, 0x20), sub(shl(160, 1), 1)) -// sstore(a, and(sub(shl(160, 1), 1), create(0, 0, 0x20))) +// let a := and(create(0, 0, 0x20), 0xffffffffffffffffffffffffffffffffffffffff) +// sstore(a, and(0xffffffffffffffffffffffffffffffffffffffff, create(0, 0, 0x20))) // } // } diff --git a/test/libyul/yulOptimizerTests/fullSuite/extcodelength.yul b/test/libyul/yulOptimizerTests/fullSuite/extcodelength.yul index 772ec67cfec8..452ffd0aa2d1 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/extcodelength.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/extcodelength.yul @@ -25,11 +25,11 @@ // { // { // let value := calldataload(4) -// if iszero(eq(value, and(value, sub(shl(160, 1), 1)))) { revert(0, 0) } +// if iszero(eq(value, and(value, 0xffffffffffffffffffffffffffffffffffffffff))) { revert(0, 0) } // let length := extcodesize(value) // if gt(length, 0xffffffffffffffff) { revert(0, 0) } // let memPtr := mload(64) -// let newFreePtr := add(memPtr, and(add(and(add(length, 31), not(31)), 63), not(31))) +// let newFreePtr := add(memPtr, and(add(and(add(length, 31), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0), 63), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0)) // if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { revert(0, 0) } // mstore(64, newFreePtr) // mstore(memPtr, length) diff --git a/test/libyul/yulOptimizerTests/fullSuite/fibonacci.yul b/test/libyul/yulOptimizerTests/fullSuite/fibonacci.yul index 479bd5f8b615..30799eb6bcf0 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/fibonacci.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/fibonacci.yul @@ -41,7 +41,7 @@ // y := 1 // if gt(i, 2) // { -// y := add(fib(add(i, not(0))), fib(add(i, not(1)))) +// y := add(fib(add(i, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)), fib(add(i, 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe))) // } // } // } diff --git a/test/libyul/yulOptimizerTests/fullSuite/stack_compressor_msize.yul b/test/libyul/yulOptimizerTests/fullSuite/stack_compressor_msize.yul index c7eb0a405b80..0bc9ddf2c47b 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/stack_compressor_msize.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/stack_compressor_msize.yul @@ -42,11 +42,11 @@ // { // let _1 := gt(not(gcd(10, 15)), 1) // let _2 := gcd(10, 15) -// let _3 := lt(or(1, add(gcd(10, 15), not(0))), 1) +// let _3 := lt(or(1, add(gcd(10, 15), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)), 1) // let _4 := gcd(10, 15) // let _5 := gcd(10, 15) // pop(keccak256(gcd(10, 15), or(gt(not(gcd(10, 15)), 1), 1))) -// mstore(lt(or(gt(1, or(or(gt(or(or(or(gt(or(gt(not(0), _5), 1), _4), _3), _2), 1), 1), _1), 1)), 1), 1), 1) +// mstore(lt(or(gt(1, or(or(gt(or(or(or(gt(or(gt(0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, _5), 1), _4), _3), _2), 1), 1), _1), 1)), 1), 1), 1) // sstore(not(gcd(10, 15)), 1) // sstore(2, 1) // foo_singlereturn() diff --git a/test/libyul/yulOptimizerTests/fullSuite/static_array_slot_computation.yul b/test/libyul/yulOptimizerTests/fullSuite/static_array_slot_computation.yul index 6dc1d8c94b7c..e3f38114f54c 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/static_array_slot_computation.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/static_array_slot_computation.yul @@ -31,10 +31,10 @@ // if eq(0x26121ff0, shr(224, calldataload(0))) // { // if callvalue() { revert(0, 0) } -// if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } +// if slt(add(calldatasize(), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc), 0) { revert(0, 0) } // if iszero(lt(0x0a, sload(0))) // { -// mstore(0, shl(224, 0x4e487b71)) +// mstore(0, 0x4e487b7100000000000000000000000000000000000000000000000000000000) // mstore(4, 0x32) // revert(0, 0x24) // } diff --git a/test/libyul/yulOptimizerTests/fullSuite/unusedFunctionParameterPruner_loop.yul b/test/libyul/yulOptimizerTests/fullSuite/unusedFunctionParameterPruner_loop.yul index f0b7546d0592..e973789abcf2 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/unusedFunctionParameterPruner_loop.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/unusedFunctionParameterPruner_loop.yul @@ -29,7 +29,11 @@ // let b := 10 // let a := calldataload(0) // let _1 := iszero(a) -// for { } iszero(b) { b := add(b, not(0)) } +// for { } +// iszero(b) +// { +// b := add(b, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) +// } // { // mstore(a, 0) // if _1 { leave } From b73344d37677ec7970e2d8bb647e40b3ea987d28 Mon Sep 17 00:00:00 2001 From: blishko Date: Tue, 19 May 2026 18:04:19 +0200 Subject: [PATCH 2/2] Delete Yul constant optimizer --- libyul/CMakeLists.txt | 2 - libyul/backends/evm/ConstantOptimiser.cpp | 232 ------------------ libyul/backends/evm/ConstantOptimiser.h | 109 -------- test/libyul/YulOptimizerTestCommon.cpp | 8 - .../constantOptimiser/difficult.yul | 15 -- .../constantOptimiser/gaps.yul | 21 -- .../constantOptimiser/smallNumbers.yul | 15 -- 7 files changed, 402 deletions(-) delete mode 100644 libyul/backends/evm/ConstantOptimiser.cpp delete mode 100644 libyul/backends/evm/ConstantOptimiser.h delete mode 100644 test/libyul/yulOptimizerTests/constantOptimiser/difficult.yul delete mode 100644 test/libyul/yulOptimizerTests/constantOptimiser/gaps.yul delete mode 100644 test/libyul/yulOptimizerTests/constantOptimiser/smallNumbers.yul diff --git a/libyul/CMakeLists.txt b/libyul/CMakeLists.txt index e8ced712a707..a070cbf62cf3 100644 --- a/libyul/CMakeLists.txt +++ b/libyul/CMakeLists.txt @@ -47,8 +47,6 @@ add_library(yul backends/evm/AbstractAssembly.h backends/evm/AsmCodeGen.cpp backends/evm/AsmCodeGen.h - backends/evm/ConstantOptimiser.cpp - backends/evm/ConstantOptimiser.h backends/evm/ControlFlowGraph.h backends/evm/ControlFlowGraphBuilder.cpp backends/evm/ControlFlowGraphBuilder.h diff --git a/libyul/backends/evm/ConstantOptimiser.cpp b/libyul/backends/evm/ConstantOptimiser.cpp deleted file mode 100644 index aa744415bf9d..000000000000 --- a/libyul/backends/evm/ConstantOptimiser.cpp +++ /dev/null @@ -1,232 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 -/** - * Optimisation stage that replaces constants by expressions that compute them. - */ - -#include - -#include -#include -#include -#include - -#include - -#include - -using namespace solidity; -using namespace solidity::yul; -using namespace solidity::util; - -using Representation = ConstantOptimiser::Representation; - -namespace -{ -struct MiniEVMInterpreter -{ - explicit MiniEVMInterpreter(EVMDialect const& _dialect): m_dialect(_dialect) {} - - u256 eval(Expression const& _expr) - { - return std::visit(*this, _expr); - } - - u256 eval(evmasm::Instruction _instr, std::vector const& _arguments) - { - std::vector args; - for (auto const& arg: _arguments) - args.emplace_back(eval(arg)); - switch (_instr) - { - case evmasm::Instruction::ADD: - return args.at(0) + args.at(1); - case evmasm::Instruction::SUB: - return args.at(0) - args.at(1); - case evmasm::Instruction::MUL: - return args.at(0) * args.at(1); - case evmasm::Instruction::EXP: - return exp256(args.at(0), args.at(1)); - case evmasm::Instruction::SHL: - return args.at(0) > 255 ? 0 : (args.at(1) << unsigned(args.at(0))); - case evmasm::Instruction::NOT: - return ~args.at(0); - default: - yulAssert(false, "Invalid operation generated in constant optimizer."); - } - return 0; - } - - u256 operator()(FunctionCall const& _funCall) - { - BuiltinFunctionForEVM const* builtin = resolveBuiltinFunctionForEVM(_funCall.functionName, m_dialect); - yulAssert(builtin, "Expected builtin function."); - yulAssert(builtin->instruction, "Expected EVM instruction."); - return eval(*builtin->instruction, _funCall.arguments); - } - u256 operator()(Literal const& _literal) - { - return _literal.value.value(); - } - u256 operator()(Identifier const&) { yulAssert(false, ""); } - - EVMDialect const& m_dialect; -}; -} - -void ConstantOptimiser::visit(Expression& _e) -{ - if (std::holds_alternative(_e)) - { - Literal const& literal = std::get(_e); - if (literal.kind != LiteralKind::Number) - return; - - if ( - Expression const* repr = - RepresentationFinder(m_dialect, m_meter, debugDataOf(_e), m_cache) - .tryFindRepresentation(literal.value.value()) - ) - _e = ASTCopier{}.translate(*repr); - } - else - ASTModifier::visit(_e); -} - -Expression const* RepresentationFinder::tryFindRepresentation(u256 const& _value) -{ - if (_value < 0x10000) - return nullptr; - - Representation const& repr = findRepresentation(_value); - if (std::holds_alternative(*repr.expression)) - return nullptr; - else - return repr.expression.get(); -} - -Representation const& RepresentationFinder::findRepresentation(u256 const& _value) -{ - if (m_cache.count(_value)) - return m_cache.at(_value); - - yulAssert(m_dialect.auxiliaryBuiltinHandles().not_); - yulAssert(m_dialect.auxiliaryBuiltinHandles().exp); - yulAssert(m_dialect.auxiliaryBuiltinHandles().mul); - yulAssert(m_dialect.auxiliaryBuiltinHandles().add); - yulAssert(m_dialect.auxiliaryBuiltinHandles().sub); - - auto const& auxHandles = m_dialect.auxiliaryBuiltinHandles(); - - Representation routine = represent(_value); - - if (numberEncodingSize(~_value) < numberEncodingSize(_value)) - // Negated is shorter to represent - routine = min(std::move(routine), represent(*auxHandles.not_, findRepresentation(~_value))); - - // Decompose value into a * 2**k + b where abs(b) << 2**k - for (unsigned bits = 255; bits > 8 && m_maxSteps > 0; --bits) - { - unsigned gapDetector = unsigned((_value >> (bits - 8)) & 0x1ff); - if (gapDetector != 0xff && gapDetector != 0x100) - continue; - - u256 powerOfTwo = u256(1) << bits; - u256 upperPart = _value >> bits; - bigint lowerPart = _value & (powerOfTwo - 1); - if ((powerOfTwo - lowerPart) < lowerPart) - { - lowerPart = lowerPart - powerOfTwo; // make it negative - upperPart++; - } - if (upperPart == 0) - continue; - if (abs(lowerPart) >= (powerOfTwo >> 8)) - continue; - Representation newRoutine; - if (m_dialect.evmVersion().hasBitwiseShifting()) - newRoutine = represent(*auxHandles.shl, represent(bits), findRepresentation(upperPart)); - else - { - newRoutine = represent(*auxHandles.exp, represent(2), represent(bits)); - if (upperPart != 1) - newRoutine = represent(*auxHandles.mul, findRepresentation(upperPart), newRoutine); - } - - if (newRoutine.cost >= routine.cost) - continue; - - if (lowerPart > 0) - newRoutine = represent(*auxHandles.add, newRoutine, findRepresentation(u256(abs(lowerPart)))); - else if (lowerPart < 0) - newRoutine = represent(*auxHandles.sub, newRoutine, findRepresentation(u256(abs(lowerPart)))); - - if (m_maxSteps > 0) - m_maxSteps--; - routine = min(std::move(routine), std::move(newRoutine)); - } - yulAssert(MiniEVMInterpreter{m_dialect}.eval(*routine.expression) == _value, "Invalid expression generated."); - return m_cache[_value] = std::move(routine); -} - -Representation RepresentationFinder::represent(u256 const& _value) const -{ - Representation repr; - repr.expression = std::make_unique(Literal{m_debugData, LiteralKind::Number, LiteralValue{_value, formatNumber(_value)}}); - repr.cost = m_meter.costs(*repr.expression); - return repr; -} - -Representation RepresentationFinder::represent( - BuiltinHandle const& _instruction, - Representation const& _argument -) const -{ - Representation repr; - repr.expression = std::make_unique(FunctionCall{ - m_debugData, - BuiltinName{m_debugData, _instruction}, - {ASTCopier{}.translate(*_argument.expression)} - }); - repr.cost = _argument.cost + m_meter.instructionCosts(*m_dialect.builtin(_instruction).instruction); - return repr; -} - -Representation RepresentationFinder::represent( - BuiltinHandle const& _instruction, - Representation const& _arg1, - Representation const& _arg2 -) const -{ - Representation repr; - repr.expression = std::make_unique(FunctionCall{ - m_debugData, - BuiltinName{m_debugData, _instruction}, - {ASTCopier{}.translate(*_arg1.expression), ASTCopier{}.translate(*_arg2.expression)} - }); - repr.cost = m_meter.instructionCosts(*m_dialect.builtin(_instruction).instruction) + _arg1.cost + _arg2.cost; - return repr; -} - -Representation RepresentationFinder::min(Representation _a, Representation _b) -{ - if (_a.cost <= _b.cost) - return _a; - else - return _b; -} diff --git a/libyul/backends/evm/ConstantOptimiser.h b/libyul/backends/evm/ConstantOptimiser.h deleted file mode 100644 index 9c25450bf96f..000000000000 --- a/libyul/backends/evm/ConstantOptimiser.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 -/** - * Optimisation stage that replaces constants by expressions that compute them. - */ - -#pragma once - -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include - -namespace solidity::yul -{ -class Dialect; -class GasMeter; - -/** - * Optimisation stage that replaces constants by expressions that compute them. - * - * Prerequisite: None - */ -class ConstantOptimiser: public ASTModifier -{ -public: - ConstantOptimiser(EVMDialect const& _dialect, GasMeter const& _meter): - m_dialect(_dialect), - m_meter(_meter) - {} - - void visit(Expression& _e) override; - - struct Representation - { - std::unique_ptr expression; - bigint cost; - }; - -private: - EVMDialect const& m_dialect; - GasMeter const& m_meter; - std::map m_cache; -}; - -class RepresentationFinder -{ -public: - using Representation = ConstantOptimiser::Representation; - RepresentationFinder( - EVMDialect const& _dialect, - GasMeter const& _meter, - langutil::DebugData::ConstPtr _debugData, - std::map& _cache - ): - m_dialect(_dialect), - m_meter(_meter), - m_debugData(std::move(_debugData)), - m_cache(_cache) - {} - - /// @returns a cheaper representation for the number than its representation - /// as a literal or nullptr otherwise. - Expression const* tryFindRepresentation(u256 const& _value); - -private: - /// Recursively try to find the cheapest representation of the given number, - /// literal if necessary. - Representation const& findRepresentation(u256 const& _value); - - Representation represent(u256 const& _value) const; - Representation represent(BuiltinHandle const& _instruction, Representation const& _arg) const; - Representation represent(BuiltinHandle const& _instruction, Representation const& _arg1, Representation const& _arg2) const; - - Representation min(Representation _a, Representation _b); - - EVMDialect const& m_dialect; - GasMeter const& m_meter; - langutil::DebugData::ConstPtr m_debugData; - /// Counter for the complexity of optimization, will stop when it reaches zero. - size_t m_maxSteps = 10000; - std::map& m_cache; -}; - -} diff --git a/test/libyul/YulOptimizerTestCommon.cpp b/test/libyul/YulOptimizerTestCommon.cpp index b6fdc4bf7358..2f73bb2a9cf4 100644 --- a/test/libyul/YulOptimizerTestCommon.cpp +++ b/test/libyul/YulOptimizerTestCommon.cpp @@ -58,7 +58,6 @@ #include #include #include -#include #include #include #include @@ -101,13 +100,6 @@ YulOptimizerTestCommon::YulOptimizerTestCommon(std::shared_ptr _ob BlockFlattener::run(*m_context, block); return block; }}, - {"constantOptimiser", [&]() { - auto block = std::get(ASTCopier{}(m_object->code()->root())); - updateContext(block); - GasMeter meter(dynamic_cast(*m_object->dialect()), false, 200); - ConstantOptimiser{dynamic_cast(*m_object->dialect()), meter}(block); - return block; - }}, {"varDeclInitializer", [&]() { auto block = std::get(ASTCopier{}(m_object->code()->root())); updateContext(block); diff --git a/test/libyul/yulOptimizerTests/constantOptimiser/difficult.yul b/test/libyul/yulOptimizerTests/constantOptimiser/difficult.yul deleted file mode 100644 index a7c4126ac17c..000000000000 --- a/test/libyul/yulOptimizerTests/constantOptimiser/difficult.yul +++ /dev/null @@ -1,15 +0,0 @@ -{ - let x := 0xff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00 - let y := 0x1100ff00ff00ff001100ff00ff001100ff00ff001100ff00ff001100ff001100 - let z := 0xffff0000ffff0000ffff0000ffff0000ff00ff00ffff0000ffff0000ffff0000 - let w := 0xffffffff000000ffffef000001feff000067ffefff0000ff230002ffee00fff7 -} -// ---- -// step: constantOptimiser -// -// { -// let x := 0xff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00 -// let y := 0x1100ff00ff00ff001100ff00ff001100ff00ff001100ff00ff001100ff001100 -// let z := 0xffff0000ffff0000ffff0000ffff0000ff00ff00ffff0000ffff0000ffff0000 -// let w := 0xffffffff000000ffffef000001feff000067ffefff0000ff230002ffee00fff7 -// } diff --git a/test/libyul/yulOptimizerTests/constantOptimiser/gaps.yul b/test/libyul/yulOptimizerTests/constantOptimiser/gaps.yul deleted file mode 100644 index 82dccdab41de..000000000000 --- a/test/libyul/yulOptimizerTests/constantOptimiser/gaps.yul +++ /dev/null @@ -1,21 +0,0 @@ -{ - let a := 0x10000000000000000000000000000000000000000000 - let x := 0x11000000000000000000000000000000000000ffffffffffffffffffffffff23 - let y := 0xfffffffff00000000000000000000000000000000000000000000000000000ff - for { let i := 0xff00000000000 } lt(i, 873687623427364) { i := add(i, 3234234234234) } { - } -} -// ==== -// EVMVersion: >=constantinople -// ---- -// step: constantOptimiser -// -// { -// let a := shl(172, 1) -// let x := add(shl(248, 17), 0xffffffffffffffffffffffff23) -// let y := add(shl(220, 0x0fffffffff), 255) -// for { let i := 0xff00000000000 } -// lt(i, 873687623427364) -// { i := add(i, 3234234234234) } -// { } -// } diff --git a/test/libyul/yulOptimizerTests/constantOptimiser/smallNumbers.yul b/test/libyul/yulOptimizerTests/constantOptimiser/smallNumbers.yul deleted file mode 100644 index af8a08886dd3..000000000000 --- a/test/libyul/yulOptimizerTests/constantOptimiser/smallNumbers.yul +++ /dev/null @@ -1,15 +0,0 @@ -{ - let x := 8 - let y := 0xffff - for { let i := 0xff00 } lt(i, 2) { i := add(i, 3) } { - } -} -// ---- -// step: constantOptimiser -// -// { -// let x := 8 -// let y := 0xffff -// for { let i := 0xff00 } lt(i, 2) { i := add(i, 3) } -// { } -// }