diff --git a/libsolidity/codegen/ir/IRGenerator.cpp b/libsolidity/codegen/ir/IRGenerator.cpp index 1ea3358c1..4837b3ff2 100644 --- a/libsolidity/codegen/ir/IRGenerator.cpp +++ b/libsolidity/codegen/ir/IRGenerator.cpp @@ -870,7 +870,7 @@ string IRGenerator::dispatchRoutine(ContractDefinition const& _contract) let := (4, calldatasize()) let := () - let memPos := (0) + let memPos := () let memEnd := (memPos , ) return(memPos, sub(memEnd, memPos)) } @@ -919,7 +919,7 @@ string IRGenerator::dispatchRoutine(ContractDefinition const& _contract) else solAssert(false, "Unexpected declaration for function!"); - templ["allocate"] = m_utils.allocationFunction(); + templ["allocateUnbounded"] = m_utils.allocateUnboundedFunction(); templ["abiEncode"] = abiFunctions.tupleEncoder(type->returnParameterTypes(), type->returnParameterTypes(), _contract.isLibrary()); } t("cases", functions); diff --git a/test/cmdlineTests/exp_base_literal/output b/test/cmdlineTests/exp_base_literal/output index e2ae81911..d75851fd4 100644 --- a/test/cmdlineTests/exp_base_literal/output +++ b/test/cmdlineTests/exp_base_literal/output @@ -39,7 +39,7 @@ object "C_81" { if callvalue() { revert(0, 0) } let param_0, param_1, param_2, param_3 := abi_decode_tuple_t_uint256t_uint256t_uint256t_uint256(4, calldatasize()) let ret_0, ret_1, ret_2, ret_3 := fun_f_80(param_0, param_1, param_2, param_3) - let memPos := allocate_memory(0) + let memPos := allocate_unbounded() let memEnd := abi_encode_tuple_t_uint256_t_int256_t_uint256_t_uint256__to_t_uint256_t_int256_t_uint256_t_uint256__fromStack(memPos , ret_0, ret_1, ret_2, ret_3) return(memPos, sub(memEnd, memPos)) } @@ -108,11 +108,6 @@ object "C_81" { } - function allocate_memory(size) -> memPtr { - memPtr := allocate_unbounded() - finalize_allocation(memPtr, size) - } - function allocate_unbounded() -> memPtr { memPtr := mload(64) } @@ -203,13 +198,6 @@ object "C_81" { converted := cleanup_t_int256(value) } - function finalize_allocation(memPtr, size) { - let newFreePtr := add(memPtr, round_up_to_mul_of_32(size)) - // protect against overflow - if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } - mstore(64, newFreePtr) - } - function fun_f_80(var_a_4, var_b_6, var_c_8, var_d_10) -> var__13, var__15, var__17, var__19 { let zero_t_uint256_1 := zero_value_for_split_t_uint256() var__13 := zero_t_uint256_1 @@ -297,16 +285,6 @@ object "C_81" { revert(0, 0x24) } - function panic_error_0x41() { - mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) - mstore(4, 0x41) - revert(0, 0x24) - } - - function round_up_to_mul_of_32(value) -> result { - result := and(add(value, 31), not(31)) - } - function shift_right_224_unsigned(value) -> newValue { newValue := diff --git a/test/cmdlineTests/ir_compiler_subobjects/output b/test/cmdlineTests/ir_compiler_subobjects/output index 79f6fcae4..20c2cee8c 100644 --- a/test/cmdlineTests/ir_compiler_subobjects/output +++ b/test/cmdlineTests/ir_compiler_subobjects/output @@ -57,30 +57,23 @@ object "D_16" { if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) } let _2 := datasize("C_3") let _3 := add(128, _2) - if or(gt(_3, 0xffffffffffffffff), lt(_3, 128)) { panic_error_0x41() } + if or(gt(_3, 0xffffffffffffffff), lt(_3, 128)) + { + mstore(_1, shl(224, 0x4e487b71)) + mstore(4, 0x41) + revert(_1, 0x24) + } datacopy(128, dataoffset("C_3"), _2) if iszero(create(_1, 128, _2)) { returndatacopy(_1, _1, returndatasize()) revert(_1, returndatasize()) } - return(allocate_memory(), _1) + return(mload(64), _1) } } revert(0, 0) } - function allocate_memory() -> memPtr - { - memPtr := mload(64) - if gt(memPtr, 0xffffffffffffffff) { panic_error_0x41() } - mstore(64, memPtr) - } - function panic_error_0x41() - { - mstore(0, shl(224, 0x4e487b71)) - mstore(4, 0x41) - revert(0, 0x24) - } } object "C_3" { code { diff --git a/test/cmdlineTests/ir_with_assembly_no_memoryguard_creation/output b/test/cmdlineTests/ir_with_assembly_no_memoryguard_creation/output index e4ad6b298..ff7449119 100644 --- a/test/cmdlineTests/ir_with_assembly_no_memoryguard_creation/output +++ b/test/cmdlineTests/ir_with_assembly_no_memoryguard_creation/output @@ -27,7 +27,6 @@ object "D_12" { { if callvalue() { revert(_1, _1) } if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) } - mstore(64, 128) return(128, _1) } } diff --git a/test/cmdlineTests/ir_with_assembly_no_memoryguard_runtime/output b/test/cmdlineTests/ir_with_assembly_no_memoryguard_runtime/output index cf559e4bd..2ed33af2e 100644 --- a/test/cmdlineTests/ir_with_assembly_no_memoryguard_runtime/output +++ b/test/cmdlineTests/ir_with_assembly_no_memoryguard_runtime/output @@ -27,7 +27,6 @@ object "D_8" { { if callvalue() { revert(_1, _1) } if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) } - mstore(64, 128) return(128, _1) } } diff --git a/test/cmdlineTests/name_simplifier/output b/test/cmdlineTests/name_simplifier/output index ad1cc3cde..5120b3b86 100644 --- a/test/cmdlineTests/name_simplifier/output +++ b/test/cmdlineTests/name_simplifier/output @@ -45,14 +45,14 @@ object "C_59" { for { } lt(i, _4) { i := add(i, 1) } { if slt(sub(calldatasize(), src), _2) { revert(_1, _1) } - let value := allocate_memory_1246() + let value := allocate_memory_1245() mstore(value, calldataload(src)) mstore(dst, value) dst := add(dst, _2) src := add(src, _2) } let ret, ret_1 := fun_sumArray(dst_1) - let memPos := allocate_memory_1247() + let memPos := mload(64) return(memPos, sub(abi_encode_uint256_string(memPos, ret, ret_1), memPos)) } } @@ -76,19 +76,13 @@ object "C_59" { } tail := add(add(headStart, and(add(length, 31), not(31))), 96) } - function allocate_memory_1246() -> memPtr + function allocate_memory_1245() -> memPtr { memPtr := mload(64) let newFreePtr := add(memPtr, 32) if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } mstore(64, newFreePtr) } - function allocate_memory_1247() -> memPtr - { - memPtr := mload(64) - if gt(memPtr, 0xffffffffffffffff) { panic_error_0x41() } - mstore(64, memPtr) - } function allocate_memory(size) -> memPtr { memPtr := mload(64) @@ -117,7 +111,7 @@ object "C_59" { { if iszero(lt(var_mpos, mload(var_s_mpos))) { panic_error_0x32() } let _1 := mload(mload(add(add(var_s_mpos, shl(5, var_mpos)), 32))) - let _2, _3 := storage_array_index_access_struct_S_1254() + let _2, _3 := storage_array_index_access_struct_S_1252() sstore(_2, _1) if iszero(lt(0x01, mload(var_s_mpos))) { panic_error_0x32() } let _4 := mload(mload(add(var_s_mpos, 64))) @@ -143,7 +137,7 @@ object "C_59" { mstore(4, 0x41) revert(0, 0x24) } - function storage_array_index_access_struct_S_1254() -> slot, offset + function storage_array_index_access_struct_S_1252() -> slot, offset { if iszero(lt(slot, 0x02)) { panic_error_0x32() } slot := add(slot, slot) diff --git a/test/cmdlineTests/optimizer_array_sload/output b/test/cmdlineTests/optimizer_array_sload/output index a4b9e8a60..37a92d63e 100644 --- a/test/cmdlineTests/optimizer_array_sload/output +++ b/test/cmdlineTests/optimizer_array_sload/output @@ -40,7 +40,7 @@ object "Arraysum_34" { mstore(_1, _1) var_sum := checked_add_uint256(var_sum, sload(add(keccak256(_1, 0x20), var_i))) } - let memPos := allocate_memory() + let memPos := mload(64) return(memPos, sub(abi_encode_uint256(memPos, var_sum), memPos)) } } @@ -51,17 +51,6 @@ object "Arraysum_34" { tail := add(headStart, 32) mstore(headStart, value0) } - function allocate_memory() -> memPtr - { - memPtr := mload(64) - if gt(memPtr, 0xffffffffffffffff) - { - mstore(0, shl(224, 0x4e487b71)) - mstore(4, 0x41) - revert(0, 0x24) - } - mstore(64, memPtr) - } function checked_add_uint256(x, y) -> sum { if gt(x, not(y)) { panic_error_0x11() } diff --git a/test/cmdlineTests/standard_irOptimized_requested/output.json b/test/cmdlineTests/standard_irOptimized_requested/output.json index a689809b7..0612727b2 100644 --- a/test/cmdlineTests/standard_irOptimized_requested/output.json +++ b/test/cmdlineTests/standard_irOptimized_requested/output.json @@ -26,7 +26,7 @@ object \"C_7\" { if callvalue() { revert(0, 0) } abi_decode_tuple_(4, calldatasize()) fun_f_6() - let memPos := allocate_memory(0) + let memPos := allocate_unbounded() let memEnd := abi_encode_tuple__to__fromStack(memPos) return(memPos, sub(memEnd, memPos)) } @@ -40,31 +40,10 @@ object \"C_7\" { } function abi_encode_tuple__to__fromStack(headStart) -> tail { tail := add(headStart, 0) } - function allocate_memory(size) -> memPtr - { - memPtr := allocate_unbounded() - finalize_allocation(memPtr, size) - } function allocate_unbounded() -> memPtr { memPtr := mload(64) } - function finalize_allocation(memPtr, size) - { - let newFreePtr := add(memPtr, round_up_to_mul_of_32(size)) - if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } - mstore(64, newFreePtr) - } function fun_f_6() { } - function panic_error_0x41() - { - mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) - mstore(4, 0x41) - revert(0, 0x24) - } - function round_up_to_mul_of_32(value) -> result - { - result := and(add(value, 31), not(31)) - } function shift_right_224_unsigned(value) -> newValue { newValue := shr(224, value) } } diff --git a/test/cmdlineTests/standard_ir_requested/output.json b/test/cmdlineTests/standard_ir_requested/output.json index 392ba22aa..567aa7efc 100644 --- a/test/cmdlineTests/standard_ir_requested/output.json +++ b/test/cmdlineTests/standard_ir_requested/output.json @@ -38,7 +38,7 @@ object \"C_7\" { if callvalue() { revert(0, 0) } abi_decode_tuple_(4, calldatasize()) fun_f_6() - let memPos := allocate_memory(0) + let memPos := allocate_unbounded() let memEnd := abi_encode_tuple__to__fromStack(memPos ) return(memPos, sub(memEnd, memPos)) } @@ -58,36 +58,14 @@ object \"C_7\" { } - function allocate_memory(size) -> memPtr { - memPtr := allocate_unbounded() - finalize_allocation(memPtr, size) - } - function allocate_unbounded() -> memPtr { memPtr := mload(64) } - function finalize_allocation(memPtr, size) { - let newFreePtr := add(memPtr, round_up_to_mul_of_32(size)) - // protect against overflow - if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } - mstore(64, newFreePtr) - } - function fun_f_6() { } - function panic_error_0x41() { - mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) - mstore(4, 0x41) - revert(0, 0x24) - } - - function round_up_to_mul_of_32(value) -> result { - result := and(add(value, 31), not(31)) - } - function shift_right_224_unsigned(value) -> newValue { newValue := diff --git a/test/cmdlineTests/standard_viair_requested/output.json b/test/cmdlineTests/standard_viair_requested/output.json index b7760ec38..6972dd5b2 100644 --- a/test/cmdlineTests/standard_viair_requested/output.json +++ b/test/cmdlineTests/standard_viair_requested/output.json @@ -89,7 +89,7 @@ object \"D_16\" { if callvalue() { revert(0, 0) } abi_decode_tuple_(4, calldatasize()) fun_f_15() - let memPos := allocate_memory(0) + let memPos := allocate_unbounded() let memEnd := abi_encode_tuple__to__fromStack(memPos ) return(memPos, sub(memEnd, memPos)) } @@ -109,22 +109,10 @@ object \"D_16\" { } - function allocate_memory(size) -> memPtr { - memPtr := allocate_unbounded() - finalize_allocation(memPtr, size) - } - function allocate_unbounded() -> memPtr { memPtr := mload(64) } - function finalize_allocation(memPtr, size) { - let newFreePtr := add(memPtr, round_up_to_mul_of_32(size)) - // protect against overflow - if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } - mstore(64, newFreePtr) - } - function fun_f_15() { let _1 := allocate_unbounded() @@ -152,10 +140,6 @@ object \"D_16\" { revert(0, returndatasize()) } - function round_up_to_mul_of_32(value) -> result { - result := and(add(value, 31), not(31)) - } - function shift_right_224_unsigned(value) -> newValue { newValue := diff --git a/test/cmdlineTests/viair_abicoder_v1/output b/test/cmdlineTests/viair_abicoder_v1/output index 18956a074..af0c29b36 100644 --- a/test/cmdlineTests/viair_abicoder_v1/output +++ b/test/cmdlineTests/viair_abicoder_v1/output @@ -39,7 +39,7 @@ object "test_11" { if callvalue() { revert(0, 0) } abi_decode_tuple_(4, calldatasize()) let ret_0 := fun_f_10() - let memPos := allocate_memory(0) + let memPos := allocate_unbounded() let memEnd := abi_encode_tuple_t_bool__to_t_bool__fromStack(memPos , ret_0) return(memPos, sub(memEnd, memPos)) } @@ -65,11 +65,6 @@ object "test_11" { } - function allocate_memory(size) -> memPtr { - memPtr := allocate_unbounded() - finalize_allocation(memPtr, size) - } - function allocate_unbounded() -> memPtr { memPtr := mload(64) } @@ -78,13 +73,6 @@ object "test_11" { cleaned := iszero(iszero(value)) } - function finalize_allocation(memPtr, size) { - let newFreePtr := add(memPtr, round_up_to_mul_of_32(size)) - // protect against overflow - if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } - mstore(64, newFreePtr) - } - function fun_f_10() -> var__5 { let zero_t_bool_1 := zero_value_for_split_t_bool() var__5 := zero_t_bool_1 @@ -95,16 +83,6 @@ object "test_11" { } - function panic_error_0x41() { - mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) - mstore(4, 0x41) - revert(0, 0x24) - } - - function round_up_to_mul_of_32(value) -> result { - result := and(add(value, 31), not(31)) - } - function shift_right_224_unsigned(value) -> newValue { newValue := diff --git a/test/cmdlineTests/viair_subobjects/output b/test/cmdlineTests/viair_subobjects/output index 3f7c6c294..135683bf9 100644 --- a/test/cmdlineTests/viair_subobjects/output +++ b/test/cmdlineTests/viair_subobjects/output @@ -35,9 +35,9 @@ object "C_3" { ======= viair_subobjects/input.sol:D ======= Binary: -608060405234156100105760006000fd5b60fb80610020600039806000f350fe6080604052600436101515610087576000803560e01c6326121ff0141561008557341561002a578081fd5b806003193601121561003a578081fd5b6028806080016080811067ffffffffffffffff8211171561005e5761005d6100b9565b5b50806100d360803980608083f01515610079573d82833e3d82fd5b5080610083610091565bf35b505b60006000fd6100d1565b6000604051905067ffffffffffffffff8111156100b1576100b06100b9565b5b806040525b90565b634e487b7160e01b600052604160045260246000fd5b565bfe60806040523415600f5760006000fd5b600a80601e600039806000f350fe608060405260006000fd +608060405234156100105760006000fd5b60b680610020600039806000f350fe60806040526004361015156087576000803560e01c6326121ff0141560855734156027578081fd5b80600319360112156036578081fd5b6028806080016080811067ffffffffffffffff82111715606457634e487b7160e01b83526041600452602483fd5b508061008e60803980608083f01515607e573d82833e3d82fd5b5080604051f35b505b60006000fdfe60806040523415600f5760006000fd5b600a80601e600039806000f350fe608060405260006000fd Binary of the runtime part: -6080604052600436101515610087576000803560e01c6326121ff0141561008557341561002a578081fd5b806003193601121561003a578081fd5b6028806080016080811067ffffffffffffffff8211171561005e5761005d6100b9565b5b50806100d360803980608083f01515610079573d82833e3d82fd5b5080610083610091565bf35b505b60006000fd6100d1565b6000604051905067ffffffffffffffff8111156100b1576100b06100b9565b5b806040525b90565b634e487b7160e01b600052604160045260246000fd5b565bfe60806040523415600f5760006000fd5b600a80601e600039806000f350fe608060405260006000fd +60806040526004361015156087576000803560e01c6326121ff0141560855734156027578081fd5b80600319360112156036578081fd5b6028806080016080811067ffffffffffffffff82111715606457634e487b7160e01b83526041600452602483fd5b508061008e60803980608083f01515607e573d82833e3d82fd5b5080604051f35b505b60006000fdfe60806040523415600f5760006000fd5b600a80601e600039806000f350fe608060405260006000fd Optimized IR: /******************************************************* * WARNING * @@ -69,30 +69,23 @@ object "D_16" { if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) } let _2 := datasize("C_3") let _3 := add(128, _2) - if or(gt(_3, 0xffffffffffffffff), lt(_3, 128)) { panic_error_0x41() } + if or(gt(_3, 0xffffffffffffffff), lt(_3, 128)) + { + mstore(_1, shl(224, 0x4e487b71)) + mstore(4, 0x41) + revert(_1, 0x24) + } datacopy(128, dataoffset("C_3"), _2) if iszero(create(_1, 128, _2)) { returndatacopy(_1, _1, returndatasize()) revert(_1, returndatasize()) } - return(allocate_memory(), _1) + return(mload(64), _1) } } revert(0, 0) } - function allocate_memory() -> memPtr - { - memPtr := mload(64) - if gt(memPtr, 0xffffffffffffffff) { panic_error_0x41() } - mstore(64, memPtr) - } - function panic_error_0x41() - { - mstore(0, shl(224, 0x4e487b71)) - mstore(4, 0x41) - revert(0, 0x24) - } } object "C_3" { code { diff --git a/test/cmdlineTests/yul_string_format_ascii/output.json b/test/cmdlineTests/yul_string_format_ascii/output.json index 25166dd5d..012993def 100644 --- a/test/cmdlineTests/yul_string_format_ascii/output.json +++ b/test/cmdlineTests/yul_string_format_ascii/output.json @@ -38,7 +38,7 @@ object \"C_11\" { if callvalue() { revert(0, 0) } abi_decode_tuple_(4, calldatasize()) let ret_0 := fun_f_10() - let memPos := allocate_memory(0) + let memPos := allocate_unbounded() let memEnd := abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack(memPos , ret_0) return(memPos, sub(memEnd, memPos)) } diff --git a/test/cmdlineTests/yul_string_format_ascii_bytes32/output.json b/test/cmdlineTests/yul_string_format_ascii_bytes32/output.json index c44f566d8..5fb77fe75 100644 --- a/test/cmdlineTests/yul_string_format_ascii_bytes32/output.json +++ b/test/cmdlineTests/yul_string_format_ascii_bytes32/output.json @@ -38,7 +38,7 @@ object \"C_11\" { if callvalue() { revert(0, 0) } abi_decode_tuple_(4, calldatasize()) let ret_0 := fun_f_10() - let memPos := allocate_memory(0) + let memPos := allocate_unbounded() let memEnd := abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack(memPos , ret_0) return(memPos, sub(memEnd, memPos)) } @@ -64,11 +64,6 @@ object \"C_11\" { } - function allocate_memory(size) -> memPtr { - memPtr := allocate_unbounded() - finalize_allocation(memPtr, size) - } - function allocate_unbounded() -> memPtr { memPtr := mload(64) } @@ -81,13 +76,6 @@ object \"C_11\" { converted := 0x6162636162630000000000000000000000000000000000000000000000000000 } - function finalize_allocation(memPtr, size) { - let newFreePtr := add(memPtr, round_up_to_mul_of_32(size)) - // protect against overflow - if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } - mstore(64, newFreePtr) - } - function fun_f_10() -> var__5 { let zero_t_bytes32_1 := zero_value_for_split_t_bytes32() var__5 := zero_t_bytes32_1 @@ -97,16 +85,6 @@ object \"C_11\" { } - function panic_error_0x41() { - mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) - mstore(4, 0x41) - revert(0, 0x24) - } - - function round_up_to_mul_of_32(value) -> result { - result := and(add(value, 31), not(31)) - } - function shift_right_224_unsigned(value) -> newValue { newValue := diff --git a/test/cmdlineTests/yul_string_format_ascii_bytes32_from_number/output.json b/test/cmdlineTests/yul_string_format_ascii_bytes32_from_number/output.json index d34a11021..a72e4db51 100644 --- a/test/cmdlineTests/yul_string_format_ascii_bytes32_from_number/output.json +++ b/test/cmdlineTests/yul_string_format_ascii_bytes32_from_number/output.json @@ -38,7 +38,7 @@ object \"C_11\" { if callvalue() { revert(0, 0) } abi_decode_tuple_(4, calldatasize()) let ret_0 := fun_f_10() - let memPos := allocate_memory(0) + let memPos := allocate_unbounded() let memEnd := abi_encode_tuple_t_bytes4__to_t_bytes4__fromStack(memPos , ret_0) return(memPos, sub(memEnd, memPos)) } @@ -64,11 +64,6 @@ object \"C_11\" { } - function allocate_memory(size) -> memPtr { - memPtr := allocate_unbounded() - finalize_allocation(memPtr, size) - } - function allocate_unbounded() -> memPtr { memPtr := mload(64) } @@ -85,13 +80,6 @@ object \"C_11\" { converted := shift_left_224(cleanup_t_rational_1633837924_by_1(value)) } - function finalize_allocation(memPtr, size) { - let newFreePtr := add(memPtr, round_up_to_mul_of_32(size)) - // protect against overflow - if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } - mstore(64, newFreePtr) - } - function fun_f_10() -> var__5 { let zero_t_bytes4_1 := zero_value_for_split_t_bytes4() var__5 := zero_t_bytes4_1 @@ -102,16 +90,6 @@ object \"C_11\" { } - function panic_error_0x41() { - mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) - mstore(4, 0x41) - revert(0, 0x24) - } - - function round_up_to_mul_of_32(value) -> result { - result := and(add(value, 31), not(31)) - } - function shift_left_224(value) -> newValue { newValue := diff --git a/test/cmdlineTests/yul_string_format_ascii_long/output.json b/test/cmdlineTests/yul_string_format_ascii_long/output.json index 8a5d3fd31..5b0cdc891 100644 --- a/test/cmdlineTests/yul_string_format_ascii_long/output.json +++ b/test/cmdlineTests/yul_string_format_ascii_long/output.json @@ -38,7 +38,7 @@ object \"C_11\" { if callvalue() { revert(0, 0) } abi_decode_tuple_(4, calldatasize()) let ret_0 := fun_f_10() - let memPos := allocate_memory(0) + let memPos := allocate_unbounded() let memEnd := abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack(memPos , ret_0) return(memPos, sub(memEnd, memPos)) } diff --git a/test/cmdlineTests/yul_string_format_hex/output.json b/test/cmdlineTests/yul_string_format_hex/output.json index 0bef6cb32..aa0d349ba 100644 --- a/test/cmdlineTests/yul_string_format_hex/output.json +++ b/test/cmdlineTests/yul_string_format_hex/output.json @@ -38,7 +38,7 @@ object \"C_11\" { if callvalue() { revert(0, 0) } abi_decode_tuple_(4, calldatasize()) let ret_0 := fun_f_10() - let memPos := allocate_memory(0) + let memPos := allocate_unbounded() let memEnd := abi_encode_tuple_t_bytes4__to_t_bytes4__fromStack(memPos , ret_0) return(memPos, sub(memEnd, memPos)) } @@ -64,11 +64,6 @@ object \"C_11\" { } - function allocate_memory(size) -> memPtr { - memPtr := allocate_unbounded() - finalize_allocation(memPtr, size) - } - function allocate_unbounded() -> memPtr { memPtr := mload(64) } @@ -85,13 +80,6 @@ object \"C_11\" { converted := shift_left_224(cleanup_t_rational_2864434397_by_1(value)) } - function finalize_allocation(memPtr, size) { - let newFreePtr := add(memPtr, round_up_to_mul_of_32(size)) - // protect against overflow - if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } - mstore(64, newFreePtr) - } - function fun_f_10() -> var__5 { let zero_t_bytes4_1 := zero_value_for_split_t_bytes4() var__5 := zero_t_bytes4_1 @@ -102,16 +90,6 @@ object \"C_11\" { } - function panic_error_0x41() { - mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856) - mstore(4, 0x41) - revert(0, 0x24) - } - - function round_up_to_mul_of_32(value) -> result { - result := and(add(value, 31), not(31)) - } - function shift_left_224(value) -> newValue { newValue := diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol index 25e9fef00..f95d8f6a2 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol @@ -24,6 +24,6 @@ contract C { // compileViaYul: also // ---- // f() -> 0x20, 0x8, 0x40, 0x3, 0x9, 0xa, 0xb -// gas irOptimized: 193697 +// gas irOptimized: 193626 // gas legacy: 196426 // gas legacyOptimized: 193405 diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_calldata_slice.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_calldata_slice.sol index 2371c2b7e..68c2a3715 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_calldata_slice.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_calldata_slice.sol @@ -60,10 +60,10 @@ contract C { // compileViaYul: also // ---- // test_bytes() -> -// gas irOptimized: 511133 +// gas irOptimized: 508617 // gas legacy: 466763 // gas legacyOptimized: 374591 // test_uint256() -> -// gas irOptimized: 706775 +// gas irOptimized: 704259 // gas legacy: 634592 // gas legacyOptimized: 499373 diff --git a/test/libsolidity/semanticTests/abiEncoderV1/struct/struct_storage_ptr.sol b/test/libsolidity/semanticTests/abiEncoderV1/struct/struct_storage_ptr.sol index 61bc36291..726f327d5 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/struct/struct_storage_ptr.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/struct/struct_storage_ptr.sol @@ -26,6 +26,6 @@ contract C { // ---- // library: L // f() -> 8, 7, 1, 2, 7, 12 -// gas irOptimized: 165254 +// gas irOptimized: 165112 // gas legacy: 164775 // gas legacyOptimized: 162697 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_calldata_slice.sol b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_calldata_slice.sol index dbfec1430..6df97f7ba 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_calldata_slice.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_calldata_slice.sol @@ -61,10 +61,10 @@ contract C { // compileViaYul: also // ---- // test_bytes() -> -// gas irOptimized: 511133 +// gas irOptimized: 508617 // gas legacy: 466763 // gas legacyOptimized: 374591 // test_uint256() -> -// gas irOptimized: 706775 +// gas irOptimized: 704259 // gas legacy: 634592 // gas legacyOptimized: 499373 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol index 2f82a8413..d075fa91c 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol @@ -53,6 +53,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: 110468 +// gas irOptimized: 110400 // gas legacy: 111328 // gas legacyOptimized: 109206 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2_in_function_inherited_in_v1_contract.sol b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2_in_function_inherited_in_v1_contract.sol index 847c92397..ea22588df 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2_in_function_inherited_in_v1_contract.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2_in_function_inherited_in_v1_contract.sol @@ -30,6 +30,6 @@ contract C is B { // compileViaYul: also // ---- // test() -> 77 -// gas irOptimized: 142789 +// gas irOptimized: 133623 // gas legacy: 156573 // gas legacyOptimized: 112940 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2_in_modifier_used_in_v1_contract.sol b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2_in_modifier_used_in_v1_contract.sol index ddcb2a4b8..2827b89bb 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2_in_modifier_used_in_v1_contract.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2_in_modifier_used_in_v1_contract.sol @@ -38,5 +38,5 @@ contract C is B { // compileViaYul: also // ---- // test() -> 5, 10 -// gas irOptimized: 101019 +// gas irOptimized: 92642 // gas legacy: 100441 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/calldata_array.sol b/test/libsolidity/semanticTests/abiEncoderV2/calldata_array.sol index 66e4b77e3..c325dcf85 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/calldata_array.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/calldata_array.sol @@ -21,6 +21,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: 227280 +// gas irOptimized: 227067 // gas legacy: 144300 // gas legacyOptimized: 124189 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/storage_array_encoding.sol b/test/libsolidity/semanticTests/abiEncoderV2/storage_array_encoding.sol index 766824d7c..847557fdc 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/storage_array_encoding.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/storage_array_encoding.sol @@ -19,10 +19,10 @@ contract C { // compileViaYul: also // ---- // h(uint256[2][]): 0x20, 3, 123, 124, 223, 224, 323, 324 -> 32, 256, 0x20, 3, 123, 124, 223, 224, 323, 324 -// gas irOptimized: 172551 +// gas irOptimized: 172480 // gas legacy: 175929 // gas legacyOptimized: 172504 // i(uint256[2][2]): 123, 124, 223, 224 -> 32, 128, 123, 124, 223, 224 -// gas irOptimized: 107492 +// gas irOptimized: 107421 // gas legacy: 109868 // gas legacyOptimized: 107388 diff --git a/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol b/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol index 0af585712..db17564cc 100644 --- a/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol +++ b/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol @@ -11,6 +11,6 @@ contract C { // compileViaYul: also // ---- // f(bytes): 0x20, 0x80, 0x21, 0x40, 0x7, "abcdefg" -> 0x21, 0x40, 0x7, "abcdefg" -// gas irOptimized: 130202 +// gas irOptimized: 130131 // gas legacy: 131690 // gas legacyOptimized: 130577 diff --git a/test/libsolidity/semanticTests/array/arrays_complex_from_and_to_storage.sol b/test/libsolidity/semanticTests/array/arrays_complex_from_and_to_storage.sol index 8de7ab432..196b8c6d7 100644 --- a/test/libsolidity/semanticTests/array/arrays_complex_from_and_to_storage.sol +++ b/test/libsolidity/semanticTests/array/arrays_complex_from_and_to_storage.sol @@ -14,7 +14,7 @@ contract Test { // compileViaYul: also // ---- // set(uint24[3][]): 0x20, 0x06, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12 -> 0x06 -// gas irOptimized: 199798 +// gas irOptimized: 199727 // gas legacy: 278685 // gas legacyOptimized: 273594 // data(uint256,uint256): 0x02, 0x02 -> 0x09 diff --git a/test/libsolidity/semanticTests/array/byte_array_storage_layout.sol b/test/libsolidity/semanticTests/array/byte_array_storage_layout.sol index daea59f3c..fabe6615a 100644 --- a/test/libsolidity/semanticTests/array/byte_array_storage_layout.sol +++ b/test/libsolidity/semanticTests/array/byte_array_storage_layout.sol @@ -47,7 +47,7 @@ contract c { // gas legacyOptimized: 109706 // storage: nonempty // test_long() -> 67 -// gas irOptimized: 134469 +// gas irOptimized: 134398 // gas legacy: 213590 // gas legacyOptimized: 211044 // storage: nonempty diff --git a/test/libsolidity/semanticTests/array/byte_array_transitional_2.sol b/test/libsolidity/semanticTests/array/byte_array_transitional_2.sol index ca3f7771d..653085278 100644 --- a/test/libsolidity/semanticTests/array/byte_array_transitional_2.sol +++ b/test/libsolidity/semanticTests/array/byte_array_transitional_2.sol @@ -19,6 +19,6 @@ contract c { // compileViaYul: also // ---- // test() -> 0 -// gas irOptimized: 311507 +// gas irOptimized: 311472 // gas legacy: 483915 // gas legacyOptimized: 478672 diff --git a/test/libsolidity/semanticTests/array/bytes_length_member.sol b/test/libsolidity/semanticTests/array/bytes_length_member.sol index 7e8b6c442..dab3d6bf4 100644 --- a/test/libsolidity/semanticTests/array/bytes_length_member.sol +++ b/test/libsolidity/semanticTests/array/bytes_length_member.sol @@ -15,7 +15,7 @@ contract c { // ---- // getLength() -> 0 // set(): 1, 2 -> true -// gas irOptimized: 103153 +// gas irOptimized: 103082 // gas legacy: 103126 // gas legacyOptimized: 102967 // getLength() -> 68 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_calldata_storage.sol b/test/libsolidity/semanticTests/array/copying/array_copy_calldata_storage.sol index 1d6eecf95..c85917002 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_calldata_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_calldata_storage.sol @@ -22,7 +22,7 @@ contract c { // compileViaYul: also // ---- // store(uint256[9],uint8[3][]): 21, 22, 23, 24, 25, 26, 27, 28, 29, 0x140, 4, 1, 2, 3, 11, 12, 13, 21, 22, 23, 31, 32, 33 -> 32 -// gas irOptimized: 612370 +// gas irOptimized: 612299 // gas legacy: 817315 // gas legacyOptimized: 816813 // retrieve() -> 9, 28, 9, 28, 4, 3, 32 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 faf386128..1222ccc91 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_cleanup_uint128.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_cleanup_uint128.sol @@ -23,6 +23,6 @@ contract C { // compileViaYul: also // ---- // f() -> true -// gas irOptimized: 107807 +// gas irOptimized: 107700 // gas legacy: 107335 // gas legacyOptimized: 105857 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 beca99285..029c51515 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_cleanup_uint40.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_cleanup_uint40.sol @@ -48,6 +48,6 @@ contract C { // compileViaYul: also // ---- // f() -> true -// gas irOptimized: 233902 +// gas irOptimized: 233831 // gas legacy: 239061 // gas legacyOptimized: 235988 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_clear_storage.sol b/test/libsolidity/semanticTests/array/copying/array_copy_clear_storage.sol index 752a9f1ce..58b9f2021 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_clear_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_clear_storage.sol @@ -15,6 +15,6 @@ contract C { // compileViaYul: also // ---- // f() -> 0 -// gas irOptimized: 139626 +// gas irOptimized: 139564 // gas legacy: 138913 // gas legacyOptimized: 137448 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 411fd7ff6..b91999d2c 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 @@ -42,11 +42,11 @@ contract C { // compileViaYul: also // ---- // f() -> 0 -// gas irOptimized: 107769 +// gas irOptimized: 107698 // gas legacy: 107306 // gas legacyOptimized: 105861 // g() -> 0 // h() -> 0 -// gas irOptimized: 107820 +// gas irOptimized: 107749 // gas legacy: 107328 // gas legacyOptimized: 105903 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 9c0c9783d..1117fa485 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_different_packing.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_different_packing.sol @@ -21,6 +21,6 @@ contract c { // compileViaYul: also // ---- // test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x05000000000000000000000000000000000000000000000000 -// gas irOptimized: 246856 +// gas irOptimized: 246670 // gas legacy: 276683 // gas legacyOptimized: 275534 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_including_array.sol b/test/libsolidity/semanticTests/array/copying/array_copy_including_array.sol index d757524d8..f53078e84 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_including_array.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_including_array.sol @@ -37,12 +37,12 @@ contract c { // compileViaYul: also // ---- // test() -> 0x02000202 -// gas irOptimized: 2477836 +// gas irOptimized: 2477765 // gas legacy: 2288641 // gas legacyOptimized: 2258654 // storage: empty // clear() -> 0, 0 -// gas irOptimized: 1854274 +// gas irOptimized: 1854203 // gas legacy: 1727169 // gas legacyOptimized: 1698931 // storage: empty diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_nested_array.sol b/test/libsolidity/semanticTests/array/copying/array_copy_nested_array.sol index 03f85304e..6ec9b0700 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_nested_array.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_nested_array.sol @@ -15,6 +15,6 @@ contract c { // compileViaYul: also // ---- // test(uint256[2][]): 32, 3, 7, 8, 9, 10, 11, 12 -> 10 -// gas irOptimized: 610623 +// gas irOptimized: 610552 // gas legacy: 604268 // gas legacyOptimized: 603688 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base.sol index 610484246..e33c75973 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base.sol @@ -19,6 +19,6 @@ contract c { // compileViaYul: also // ---- // test() -> 5, 4 -// gas irOptimized: 235198 +// gas irOptimized: 235127 // gas legacy: 237001 // gas legacyOptimized: 235316 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base_nested.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base_nested.sol index 140905ada..afecf6641 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base_nested.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base_nested.sol @@ -23,6 +23,6 @@ contract c { // compileViaYul: also // ---- // test() -> 3, 4 -// gas irOptimized: 191241 +// gas irOptimized: 191170 // gas legacy: 208853 // gas legacyOptimized: 200341 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 8674acf46..4123cb9aa 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 @@ -20,6 +20,6 @@ contract c { // compileViaYul: also // ---- // test() -> 5, 4 -// gas irOptimized: 265237 +// gas irOptimized: 265166 // gas legacy: 264734 // gas legacyOptimized: 263160 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_dynamic.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_dynamic.sol index 072ecefe1..d5a925b65 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_dynamic.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_dynamic.sol @@ -14,4 +14,4 @@ contract c { // compileViaYul: also // ---- // test() -> 9, 4 -// gas irOptimized: 99282 +// gas irOptimized: 99211 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_static.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_static.sol index 10e75870c..e7cab4bde 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_static.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_static.sol @@ -18,6 +18,6 @@ contract c { // compileViaYul: also // ---- // test() -> 8, 0 -// gas irOptimized: 154937 +// gas irOptimized: 154843 // gas legacy: 153995 // gas legacyOptimized: 153403 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 1b72dc099..b43c1e2b1 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 @@ -19,7 +19,7 @@ contract c { // compileViaYul: also // ---- // test() -> 4, 5 -// gas irOptimized: 259287 +// gas irOptimized: 259216 // gas legacy: 255936 // gas legacyOptimized: 254359 // storage: empty 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 b7d6608e1..17c046ebc 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 @@ -17,6 +17,6 @@ contract C { // compileViaYul: also // ---- // f() -> 0x20, 2, 0x40, 0xa0, 2, 0, 1, 2, 2, 3 -// gas irOptimized: 168769 +// gas irOptimized: 168698 // gas legacy: 163978 // gas legacyOptimized: 158150 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover.sol b/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover.sol index 202af3d05..9e8f4d3d0 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover.sol @@ -19,6 +19,6 @@ contract c { // compileViaYul: also // ---- // test() -> 0xffffffff, 0x0000000000000000000000000a00090008000700060005000400030002000100, 0x0000000000000000000000000000000000000000000000000000000000000000 -// gas irOptimized: 218689 +// gas irOptimized: 218618 // gas legacy: 328106 // gas legacyOptimized: 307826 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover2.sol b/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover2.sol index f83d76e3f..76eb240f3 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover2.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover2.sol @@ -21,6 +21,6 @@ contract c { // compileViaYul: also // ---- // test() -> 0x04000000000000000000000000000000000000000000000000, 0x0, 0x0 -// gas irOptimized: 107799 +// gas irOptimized: 107728 // gas legacy: 116651 // gas legacyOptimized: 107000 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 7c9bd010a..33b928396 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_target_simple.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_target_simple.sol @@ -21,6 +21,6 @@ contract c { // compileViaYul: also // ---- // test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x0 -// gas irOptimized: 288963 +// gas irOptimized: 288892 // gas legacy: 309353 // gas legacyOptimized: 307699 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 7f5aed3e8..2a96043ba 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 @@ -21,6 +21,6 @@ contract c { // compileViaYul: also // ---- // test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x00 -// gas irOptimized: 264046 +// gas irOptimized: 263975 // gas legacy: 269681 // gas legacyOptimized: 268753 diff --git a/test/libsolidity/semanticTests/array/copying/array_nested_calldata_to_storage.sol b/test/libsolidity/semanticTests/array/copying/array_nested_calldata_to_storage.sol index 48df94fe9..e06b380f6 100644 --- a/test/libsolidity/semanticTests/array/copying/array_nested_calldata_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_nested_calldata_to_storage.sol @@ -38,10 +38,10 @@ contract c { // compileViaYul: true // ---- // test1(uint256[][]): 0x20, 2, 0x40, 0x40, 2, 23, 42 -> 2, 65 -// gas irOptimized: 179347 +// gas irOptimized: 179276 // test2(uint256[][2]): 0x20, 0x40, 0x40, 2, 23, 42 -> 2, 65 -// gas irOptimized: 154097 +// gas irOptimized: 154026 // test3(uint256[2][]): 0x20, 2, 23, 42, 23, 42 -> 2, 65 -// gas irOptimized: 132762 +// gas irOptimized: 132691 // test4(uint256[2][2]): 23, 42, 23, 42 -> 65 -// gas irOptimized: 105500 +// gas irOptimized: 105429 diff --git a/test/libsolidity/semanticTests/array/copying/array_nested_memory_to_storage.sol b/test/libsolidity/semanticTests/array/copying/array_nested_memory_to_storage.sol index e931c738f..9d5b78ea8 100644 --- a/test/libsolidity/semanticTests/array/copying/array_nested_memory_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_nested_memory_to_storage.sol @@ -40,12 +40,12 @@ contract Test { // compileViaYul: also // ---- // test() -> 24 -// gas irOptimized: 216554 +// gas irOptimized: 216483 // gas legacy: 215533 // gas legacyOptimized: 214947 // test1() -> 3 // test2() -> 6 // test3() -> 24 -// gas irOptimized: 123067 +// gas irOptimized: 122996 // gas legacy: 122795 // gas legacyOptimized: 121883 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 caa5d031e..5c529be53 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: 123100 +// gas irOptimized: 123029 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 d00f51ed4..ee51af895 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: 122096 +// gas irOptimized: 122025 diff --git a/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_calldata_to_storage.sol b/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_calldata_to_storage.sol index 90e2dd1a6..a2c954811 100644 --- a/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_calldata_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_of_structs_containing_arrays_calldata_to_storage.sol @@ -23,4 +23,4 @@ contract C { // compileViaYul: true // ---- // f((uint256[])[]): 0x20, 3, 0x60, 0x60, 0x60, 0x20, 3, 1, 2, 3 -> 3, 1 -// gas irOptimized: 354017 +// gas irOptimized: 353946 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 4c3135708..06c2fab78 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: 187687 +// gas irOptimized: 187616 diff --git a/test/libsolidity/semanticTests/array/copying/array_storage_multi_items_per_slot.sol b/test/libsolidity/semanticTests/array/copying/array_storage_multi_items_per_slot.sol index 966f66d76..409dab842 100644 --- a/test/libsolidity/semanticTests/array/copying/array_storage_multi_items_per_slot.sol +++ b/test/libsolidity/semanticTests/array/copying/array_storage_multi_items_per_slot.sol @@ -15,6 +15,6 @@ contract C { // compileViaYul: also // ---- // f() -> 1, 2, 3 -// gas irOptimized: 133583 +// gas irOptimized: 133483 // gas legacy: 134419 // gas legacyOptimized: 125440 diff --git a/test/libsolidity/semanticTests/array/copying/arrays_from_and_to_storage.sol b/test/libsolidity/semanticTests/array/copying/arrays_from_and_to_storage.sol index e4d2c13aa..1957dc34f 100644 --- a/test/libsolidity/semanticTests/array/copying/arrays_from_and_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/arrays_from_and_to_storage.sol @@ -12,7 +12,7 @@ contract Test { // compileViaYul: also // ---- // set(uint24[]): 0x20, 18, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 -> 18 -// gas irOptimized: 121010 +// gas irOptimized: 120939 // gas legacy: 125815 // gas legacyOptimized: 123614 // data(uint256): 7 -> 8 diff --git a/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol b/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol index af67f0eda..1c7358edf 100644 --- a/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol +++ b/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol @@ -7,11 +7,11 @@ contract c { // compileViaYul: also // ---- // set(uint256): 1, 2 -> true -// gas irOptimized: 103311 +// gas irOptimized: 103240 // gas legacy: 103491 // gas legacyOptimized: 103136 // set(uint256): 2, 2, 3, 4, 5 -> true -// gas irOptimized: 163998 +// gas irOptimized: 163927 // gas legacy: 164121 // gas legacyOptimized: 163766 // storage: nonempty 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 0643ae925..518096be6 100644 --- a/test/libsolidity/semanticTests/array/copying/bytes_storage_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/bytes_storage_to_storage.sol @@ -19,25 +19,25 @@ contract c { // ---- // f(uint256): 0 -> 0x20, 0x00 // f(uint256): 31 -> 0x20, 0x1f, 0x0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e00 -// gas irOptimized: 221795 +// gas irOptimized: 221724 // gas legacy: 255464 // gas legacyOptimized: 250998 // f(uint256): 32 -> 0x20, 0x20, 1780731860627700044960722568376592200742329637303199754547598369979440671 -// gas irOptimized: 232383 +// gas irOptimized: 232312 // gas legacy: 267931 // gas legacyOptimized: 263329 // f(uint256): 33 -> 0x20, 33, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x2000000000000000000000000000000000000000000000000000000000000000 -// gas irOptimized: 241178 +// gas irOptimized: 241107 // gas legacy: 277538 // gas legacyOptimized: 272818 // f(uint256): 63 -> 0x20, 0x3f, 1780731860627700044960722568376592200742329637303199754547598369979440671, 14532552714582660066924456880521368950258152170031413196862950297402215316992 -// gas irOptimized: 354488 +// gas irOptimized: 354417 // gas legacy: 423428 // gas legacyOptimized: 414868 // f(uint256): 12 -> 0x20, 0x0c, 0x0102030405060708090a0b0000000000000000000000000000000000000000 // gas legacy: 106445 // gas legacyOptimized: 104379 // f(uint256): 129 -> 0x20, 0x81, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f, 29063324697304692433803953038474361308315562010425523193971352996434451193439, 0x606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f, -57896044618658097711785492504343953926634992332820282019728792003956564819968 -// gas irOptimized: 813943 +// gas irOptimized: 813872 // gas legacy: 954517 // gas legacyOptimized: 937521 diff --git a/test/libsolidity/semanticTests/array/copying/calldata_array_dynamic_to_storage.sol b/test/libsolidity/semanticTests/array/copying/calldata_array_dynamic_to_storage.sol index 8ed7adc23..af6bf29c3 100644 --- a/test/libsolidity/semanticTests/array/copying/calldata_array_dynamic_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/calldata_array_dynamic_to_storage.sol @@ -11,6 +11,6 @@ contract C { // compileViaYul: also // ---- // f(uint256[]): 0x20, 0x03, 0x1, 0x2, 0x3 -> 0x1 -// gas irOptimized: 105320 +// gas irOptimized: 105249 // gas legacy: 105365 // gas legacyOptimized: 105147 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 c6d9a95bf..bcf0043b6 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 @@ -37,7 +37,7 @@ contract C { // compileViaYul: also // ---- // f() -> 0x40, 0x80, 6, 0x6162636465660000000000000000000000000000000000000000000000000000, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000 -// gas irOptimized: 172472 +// gas irOptimized: 172401 // gas legacy: 174794 // gas legacyOptimized: 174188 // g() -> 0x40, 0xc0, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000, 0x11, 0x3132333435363738393233343536373839000000000000000000000000000000 diff --git a/test/libsolidity/semanticTests/array/copying/copy_byte_array_to_storage.sol b/test/libsolidity/semanticTests/array/copying/copy_byte_array_to_storage.sol index cd2775910..2b7228ca2 100644 --- a/test/libsolidity/semanticTests/array/copying/copy_byte_array_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/copy_byte_array_to_storage.sol @@ -48,6 +48,6 @@ contract C { // compileViaYul: also // ---- // f() -> 0xff -// gas irOptimized: 136355 +// gas irOptimized: 136320 // gas legacy: 137645 // gas legacyOptimized: 134376 diff --git a/test/libsolidity/semanticTests/array/copying/copy_function_storage_array.sol b/test/libsolidity/semanticTests/array/copying/copy_function_storage_array.sol index 674ee394e..cfc93f23c 100644 --- a/test/libsolidity/semanticTests/array/copying/copy_function_storage_array.sol +++ b/test/libsolidity/semanticTests/array/copying/copy_function_storage_array.sol @@ -18,6 +18,6 @@ contract C { // compileViaYul: also // ---- // test() -> 7 -// gas irOptimized: 134260 +// gas irOptimized: 134153 // gas legacy: 211296 // gas legacyOptimized: 211087 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 6de168c76..a8d13f056 100644 --- a/test/libsolidity/semanticTests/array/copying/copy_removes_bytes_data.sol +++ b/test/libsolidity/semanticTests/array/copying/copy_removes_bytes_data.sol @@ -9,7 +9,7 @@ contract c { // compileViaYul: also // ---- // set(): 1, 2, 3, 4, 5 -> true -// gas irOptimized: 163790 +// gas irOptimized: 163719 // gas legacy: 163756 // gas legacyOptimized: 163596 // storage: nonempty 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 77f050cdd..9fceb5596 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 @@ -20,6 +20,6 @@ contract C { // compileViaYul: also // ---- // f() -> 3 -// gas irOptimized: 174259 +// gas irOptimized: 174188 // gas legacy: 179707 // gas legacyOptimized: 178763 diff --git a/test/libsolidity/semanticTests/array/copying/storage_memory_nested.sol b/test/libsolidity/semanticTests/array/copying/storage_memory_nested.sol index eb7aae123..7ab0fb5d4 100644 --- a/test/libsolidity/semanticTests/array/copying/storage_memory_nested.sol +++ b/test/libsolidity/semanticTests/array/copying/storage_memory_nested.sol @@ -19,6 +19,6 @@ contract C { // compileViaYul: also // ---- // f() -> 1, 2, 3, 4, 5, 6, 7 -// gas irOptimized: 212697 +// gas irOptimized: 212626 // gas legacy: 223725 // gas legacyOptimized: 222886 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 2a21b55e2..6d2f07ae3 100644 --- a/test/libsolidity/semanticTests/array/copying/storage_memory_nested_bytes.sol +++ b/test/libsolidity/semanticTests/array/copying/storage_memory_nested_bytes.sol @@ -13,6 +13,6 @@ contract C { // compileViaYul: also // ---- // f() -> 0x20, 0x02, 0x40, 0x80, 3, 0x6162630000000000000000000000000000000000000000000000000000000000, 0x99, 44048183304486788312148433451363384677562265908331949128489393215789685032262, 32241931068525137014058842823026578386641954854143559838526554899205067598957, 49951309422467613961193228765530489307475214998374779756599339590522149884499, 0x54555658595a6162636465666768696a6b6c6d6e6f707172737475767778797a, 0x4142434445464748494a4b4c4d4e4f5051525354555658595a00000000000000 -// gas irOptimized: 198455 +// gas irOptimized: 198384 // gas legacy: 199159 // gas legacyOptimized: 198132 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 f72b67db2..37abc0a86 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 @@ -20,6 +20,6 @@ contract C { // compileViaYul: also // ---- // f() -> 1, 2, 3, 4, 5, 6, 7 -// gas irOptimized: 212697 +// gas irOptimized: 212626 // gas legacy: 223730 // gas legacyOptimized: 222891 diff --git a/test/libsolidity/semanticTests/array/copying/storage_memory_nested_struct.sol b/test/libsolidity/semanticTests/array/copying/storage_memory_nested_struct.sol index 0776b830d..7c623884d 100644 --- a/test/libsolidity/semanticTests/array/copying/storage_memory_nested_struct.sol +++ b/test/libsolidity/semanticTests/array/copying/storage_memory_nested_struct.sol @@ -26,6 +26,6 @@ contract C { // compileViaYul: also // ---- // f() -> 11, 0x0c, 1, 0x15, 22, 4 -// gas irOptimized: 289378 +// gas irOptimized: 289307 // gas legacy: 296916 // gas legacyOptimized: 283163 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 46ebaa181..20a4a6d27 100644 --- a/test/libsolidity/semanticTests/array/copying/storage_memory_packed_dyn.sol +++ b/test/libsolidity/semanticTests/array/copying/storage_memory_packed_dyn.sol @@ -15,6 +15,6 @@ contract C { // compileViaYul: also // ---- // f() -> 2, 3, 4 -// gas irOptimized: 209867 +// gas irOptimized: 209796 // gas legacy: 241549 // gas legacyOptimized: 236002 diff --git a/test/libsolidity/semanticTests/array/create_memory_array.sol b/test/libsolidity/semanticTests/array/create_memory_array.sol index 5bab95a3f..72c4d0aca 100644 --- a/test/libsolidity/semanticTests/array/create_memory_array.sol +++ b/test/libsolidity/semanticTests/array/create_memory_array.sol @@ -20,6 +20,6 @@ contract C { // compileViaYul: also // ---- // f() -> "A", 8, 4, "B" -// gas irOptimized: 151068 +// gas irOptimized: 150997 // gas legacy: 121398 // gas legacyOptimized: 115494 diff --git a/test/libsolidity/semanticTests/array/delete/bytes_delete_element.sol b/test/libsolidity/semanticTests/array/delete/bytes_delete_element.sol index abcb6333b..a90617d6e 100644 --- a/test/libsolidity/semanticTests/array/delete/bytes_delete_element.sol +++ b/test/libsolidity/semanticTests/array/delete/bytes_delete_element.sol @@ -18,6 +18,6 @@ contract c { // compileViaYul: also // ---- // test1() -> true -// gas irOptimized: 531791 +// gas irOptimized: 531720 // gas legacy: 613377 // gas legacyOptimized: 606411 diff --git a/test/libsolidity/semanticTests/array/delete/delete_storage_array_packed.sol b/test/libsolidity/semanticTests/array/delete/delete_storage_array_packed.sol index b17f06c13..3d914e681 100644 --- a/test/libsolidity/semanticTests/array/delete/delete_storage_array_packed.sol +++ b/test/libsolidity/semanticTests/array/delete/delete_storage_array_packed.sol @@ -16,4 +16,4 @@ contract C { // compileViaYul: also // ---- // f() -> 0, 0, 0 -// gas irOptimized: 101644 +// gas irOptimized: 101573 diff --git a/test/libsolidity/semanticTests/array/dynamic_array_cleanup.sol b/test/libsolidity/semanticTests/array/dynamic_array_cleanup.sol index 500712af8..b0b5b54b8 100644 --- a/test/libsolidity/semanticTests/array/dynamic_array_cleanup.sol +++ b/test/libsolidity/semanticTests/array/dynamic_array_cleanup.sol @@ -16,7 +16,7 @@ contract c { // ---- // storage: empty // fill() -> -// gas irOptimized: 535980 +// gas irOptimized: 535914 // gas legacy: 504373 // gas legacyOptimized: 499648 // storage: nonempty diff --git a/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol b/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol index 8055248f0..bcd034c67 100644 --- a/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol +++ b/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol @@ -44,7 +44,7 @@ contract c { // ---- // getLengths() -> 0, 0 // setLengths(uint256,uint256): 48, 49 -> -// gas irOptimized: 275906 +// gas irOptimized: 275838 // gas legacy: 308271 // gas legacyOptimized: 300117 // getLengths() -> 48, 49 diff --git a/test/libsolidity/semanticTests/array/dynamic_multi_array_cleanup.sol b/test/libsolidity/semanticTests/array/dynamic_multi_array_cleanup.sol index b639f1db6..7cf5f8775 100644 --- a/test/libsolidity/semanticTests/array/dynamic_multi_array_cleanup.sol +++ b/test/libsolidity/semanticTests/array/dynamic_multi_array_cleanup.sol @@ -18,7 +18,7 @@ contract c { // ---- // storage: empty // fill() -> 8 -// gas irOptimized: 170158 +// gas irOptimized: 170087 // gas legacy: 165456 // gas legacyOptimized: 164387 // storage: nonempty diff --git a/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol b/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol index 915b2423d..49faa7777 100644 --- a/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol +++ b/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol @@ -13,7 +13,7 @@ contract c { // ---- // storage: empty // fill() -> -// gas irOptimized: 423949 +// gas irOptimized: 423878 // gas legacy: 429460 // gas legacyOptimized: 425520 // storage: nonempty 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 9cea17d0b..8cffe537d 100644 --- a/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol +++ b/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol @@ -21,6 +21,6 @@ contract B { // compileViaYul: also // ---- // f() -> 2, 3, 4, 5, 6, 1000, 1001, 1002, 1003, 1004 -// gas irOptimized: 152350 +// gas irOptimized: 135461 // gas legacy: 264410 // gas legacyOptimized: 134899 diff --git a/test/libsolidity/semanticTests/array/function_array_cross_calls.sol b/test/libsolidity/semanticTests/array/function_array_cross_calls.sol index f5ba1a31d..e88381eae 100644 --- a/test/libsolidity/semanticTests/array/function_array_cross_calls.sol +++ b/test/libsolidity/semanticTests/array/function_array_cross_calls.sol @@ -45,6 +45,6 @@ contract C { // compileViaYul: also // ---- // test() -> 5, 6, 7 -// gas irOptimized: 354715 +// gas irOptimized: 345131 // gas legacy: 500424 // gas legacyOptimized: 307813 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 66e650987..9ab3ac9f0 100644 --- a/test/libsolidity/semanticTests/array/pop/array_pop_array_transition.sol +++ b/test/libsolidity/semanticTests/array/pop/array_pop_array_transition.sol @@ -25,7 +25,7 @@ contract c { // compileViaYul: also // ---- // test() -> 1, 2, 3 -// gas irOptimized: 2462156 +// gas irOptimized: 2462085 // gas legacy: 2416722 // gas legacyOptimized: 2405396 // storage: empty 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 a21cb1469..6360ccea3 100644 --- a/test/libsolidity/semanticTests/array/pop/array_pop_uint16_transition.sol +++ b/test/libsolidity/semanticTests/array/pop/array_pop_uint16_transition.sol @@ -20,7 +20,7 @@ contract c { // compileViaYul: also // ---- // test() -> 38, 28, 18 -// gas irOptimized: 531794 +// gas irOptimized: 531723 // gas legacy: 454080 // gas legacyOptimized: 443170 // storage: empty 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 7889e9436..71e13a88a 100644 --- a/test/libsolidity/semanticTests/array/pop/array_pop_uint24_transition.sol +++ b/test/libsolidity/semanticTests/array/pop/array_pop_uint24_transition.sol @@ -20,7 +20,7 @@ contract c { // compileViaYul: also // ---- // test() -> 20, 10 -// gas irOptimized: 369920 +// gas irOptimized: 369849 // gas legacy: 320859 // gas legacyOptimized: 314681 // storage: empty 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 aac5d64cd..59f73d124 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 @@ -12,6 +12,6 @@ contract c { // compileViaYul: also // ---- // test() -> 0x20, 29, 0x0303030303030303030303030303030303030303030303030303030303000000 -// gas irOptimized: 163643 +// gas irOptimized: 163572 // gas legacy: 245809 // gas legacyOptimized: 242636 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 892bd7a16..0a6f802c6 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 @@ -18,7 +18,7 @@ contract c { // compileViaYul: also // ---- // test() -> true -// gas irOptimized: 455964 +// gas irOptimized: 455893 // gas legacy: 552064 // gas legacyOptimized: 533164 // storage: empty 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 68d9cc091..a8119434e 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 @@ -17,7 +17,7 @@ contract c { // compileViaYul: also // ---- // test() -> -// gas irOptimized: 300920 +// gas irOptimized: 300849 // gas legacy: 372763 // gas legacyOptimized: 366846 // storage: empty 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 e1dd3edec..cd59188d9 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 @@ -12,6 +12,6 @@ contract c { // compileViaYul: also // ---- // test() -> 0x20, 33, 0x303030303030303030303030303030303030303030303030303030303030303, 0x0300000000000000000000000000000000000000000000000000000000000000 -// gas irOptimized: 160975 +// gas irOptimized: 160904 // gas legacy: 243287 // gas legacyOptimized: 240361 diff --git a/test/libsolidity/semanticTests/array/push/array_push.sol b/test/libsolidity/semanticTests/array/push/array_push.sol index 3595f55ac..6cb35a4f8 100644 --- a/test/libsolidity/semanticTests/array/push/array_push.sol +++ b/test/libsolidity/semanticTests/array/push/array_push.sol @@ -18,6 +18,6 @@ contract c { // compileViaYul: also // ---- // test() -> 5, 4, 3, 3 -// gas irOptimized: 111041 +// gas irOptimized: 110985 // gas legacy: 111938 // gas legacyOptimized: 110528 diff --git a/test/libsolidity/semanticTests/array/push/array_push_nested_from_calldata.sol b/test/libsolidity/semanticTests/array/push/array_push_nested_from_calldata.sol index 425858409..3d9ebcca0 100644 --- a/test/libsolidity/semanticTests/array/push/array_push_nested_from_calldata.sol +++ b/test/libsolidity/semanticTests/array/push/array_push_nested_from_calldata.sol @@ -14,6 +14,6 @@ contract C { // compileViaYul: also // ---- // f(uint120[]): 0x20, 3, 1, 2, 3 -> 1 -// gas irOptimized: 116414 +// gas irOptimized: 116343 // gas legacy: 116886 // gas legacyOptimized: 116699 diff --git a/test/libsolidity/semanticTests/array/push/array_push_packed_array.sol b/test/libsolidity/semanticTests/array/push/array_push_packed_array.sol index 5ddcb5c8e..4ea0c2dc6 100644 --- a/test/libsolidity/semanticTests/array/push/array_push_packed_array.sol +++ b/test/libsolidity/semanticTests/array/push/array_push_packed_array.sol @@ -16,6 +16,6 @@ contract c { // compileViaYul: also // ---- // test() -> 1, 2, 3, 4 -// gas irOptimized: 112131 +// gas irOptimized: 112060 // gas legacy: 107098 // gas legacyOptimized: 106362 diff --git a/test/libsolidity/semanticTests/array/push/array_push_struct.sol b/test/libsolidity/semanticTests/array/push/array_push_struct.sol index 623582a24..828b5e7ee 100644 --- a/test/libsolidity/semanticTests/array/push/array_push_struct.sol +++ b/test/libsolidity/semanticTests/array/push/array_push_struct.sol @@ -22,6 +22,6 @@ contract c { // compileViaYul: also // ---- // test() -> 2, 3, 4, 5 -// gas irOptimized: 146426 +// gas irOptimized: 146355 // gas legacy: 190684 // gas legacyOptimized: 188256 diff --git a/test/libsolidity/semanticTests/array/push/array_push_struct_from_calldata.sol b/test/libsolidity/semanticTests/array/push/array_push_struct_from_calldata.sol index 92319bf14..39523e504 100644 --- a/test/libsolidity/semanticTests/array/push/array_push_struct_from_calldata.sol +++ b/test/libsolidity/semanticTests/array/push/array_push_struct_from_calldata.sol @@ -18,6 +18,6 @@ contract c { // compileViaYul: also // ---- // test((uint16,uint16,uint16[3],uint16[])): 0x20, 2, 3, 0, 0, 4, 0xC0, 4, 0, 0, 5, 0, 0 -> 2, 3, 4, 5 -// gas irOptimized: 148261 +// gas irOptimized: 148190 // gas legacy: 152444 // gas legacyOptimized: 146671 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 5dca942ea..300703bee 100644 --- a/test/libsolidity/semanticTests/array/push/byte_array_push_transition.sol +++ b/test/libsolidity/semanticTests/array/push/byte_array_push_transition.sol @@ -17,6 +17,6 @@ contract c { // compileViaYul: also // ---- // test() -> 0 -// gas irOptimized: 396112 +// gas irOptimized: 396077 // gas legacy: 565428 // gas legacyOptimized: 552524 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 415d071ba..694af34ac 100644 --- a/test/libsolidity/semanticTests/array/push/push_no_args_2d.sol +++ b/test/libsolidity/semanticTests/array/push/push_no_args_2d.sol @@ -29,14 +29,14 @@ contract C { // ---- // l() -> 0 // f(uint256,uint256): 42, 64 -> -// gas irOptimized: 202728 +// gas irOptimized: 202660 // gas legacy: 163034 // gas legacyOptimized: 157045 // l() -> 1 // ll(uint256): 0 -> 43 // a(uint256,uint256): 0, 42 -> 64 // f(uint256,uint256): 84, 128 -> -// gas irOptimized: 298944 +// gas irOptimized: 298876 // gas legacy: 222080 // gas legacyOptimized: 210631 // l() -> 2 diff --git a/test/libsolidity/semanticTests/array/push/push_no_args_bytes.sol b/test/libsolidity/semanticTests/array/push/push_no_args_bytes.sol index 3633a04b3..1ce7f5141 100644 --- a/test/libsolidity/semanticTests/array/push/push_no_args_bytes.sol +++ b/test/libsolidity/semanticTests/array/push/push_no_args_bytes.sol @@ -23,7 +23,7 @@ contract C { // ---- // l() -> 0 // g(uint256): 70 -> -// gas irOptimized: 428840 +// gas irOptimized: 428769 // gas legacy: 419791 // gas legacyOptimized: 415408 // l() -> 70 diff --git a/test/libsolidity/semanticTests/array/reusing_memory.sol b/test/libsolidity/semanticTests/array/reusing_memory.sol index 6fa262faa..b2199f7c7 100644 --- a/test/libsolidity/semanticTests/array/reusing_memory.sol +++ b/test/libsolidity/semanticTests/array/reusing_memory.sol @@ -26,6 +26,6 @@ contract Main { // compileViaYul: also // ---- // f(uint256): 0x34 -> 0x46bddb1178e94d7f2892ff5f366840eb658911794f2c3a44c450aa2c505186c1 -// gas irOptimized: 117113 +// gas irOptimized: 115557 // gas legacy: 127152 // gas legacyOptimized: 113679 diff --git a/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol b/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol index b7e55827b..a04b4702a 100644 --- a/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol +++ b/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol @@ -26,6 +26,6 @@ contract Creator { // compileViaYul: also // ---- // f(uint256,address[]): 7, 0x40, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 -> 7, 8 -// gas irOptimized: 479282 +// gas irOptimized: 465850 // gas legacy: 570900 // gas legacyOptimized: 435524 diff --git a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol index 73d00e27e..26b9e7da3 100644 --- a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol +++ b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol @@ -26,6 +26,6 @@ contract Creator { // compileViaYul: also // ---- // f(uint256,bytes): 7, 0x40, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" -> 7, "h" -// gas irOptimized: 341858 +// gas irOptimized: 323391 // gas legacy: 414850 // gas legacyOptimized: 290278 diff --git a/test/libsolidity/semanticTests/constructor/no_callvalue_check.sol b/test/libsolidity/semanticTests/constructor/no_callvalue_check.sol index 6a334f9fd..b60a7b5ba 100644 --- a/test/libsolidity/semanticTests/constructor/no_callvalue_check.sol +++ b/test/libsolidity/semanticTests/constructor/no_callvalue_check.sol @@ -19,6 +19,6 @@ contract C { // compileViaYul: also // ---- // f(), 2000 ether -> true -// gas irOptimized: 123796 +// gas irOptimized: 123725 // gas legacy: 123226 // gas legacyOptimized: 123092 diff --git a/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol b/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol index 76816af61..17eb77c9d 100644 --- a/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol +++ b/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol @@ -178,7 +178,7 @@ contract DepositContract is IDepositContract, ERC165 { // compileViaYul: also // ---- // constructor() -// gas irOptimized: 1828768 +// gas irOptimized: 1814535 // gas legacy: 2558004 // gas legacyOptimized: 1797889 // supportsInterface(bytes4): 0x0 -> 0 @@ -186,25 +186,25 @@ contract DepositContract is IDepositContract, ERC165 { // supportsInterface(bytes4): 0x01ffc9a700000000000000000000000000000000000000000000000000000000 -> true # ERC-165 id # // supportsInterface(bytes4): 0x8564090700000000000000000000000000000000000000000000000000000000 -> true # the deposit interface id # // get_deposit_root() -> 0xd70a234731285c6804c2a4f56711ddb8c82c99740f207854891028af34e27e5e -// gas irOptimized: 104470 +// gas irOptimized: 104399 // gas legacy: 128065 // gas legacyOptimized: 100398 // 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: 104470 +// gas irOptimized: 104399 // gas legacy: 128065 // gas legacyOptimized: 100398 // 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 # // get_deposit_root() -> 0x2089653123d9c721215120b6db6738ba273bbc5228ac093b1f983badcdc8a438 -// gas irOptimized: 104474 +// gas irOptimized: 104403 // gas legacy: 128075 // gas legacyOptimized: 100411 // 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 # // get_deposit_root() -> 0x40255975859377d912c53aa853245ebd939bdd2b33a28e084babdcc1ed8238ee -// gas irOptimized: 104474 +// gas irOptimized: 104403 // gas legacy: 128075 // gas legacyOptimized: 100411 // get_deposit_count() -> 0x20, 8, 0x0200000000000000000000000000000000000000000000000000000000000000 diff --git a/test/libsolidity/semanticTests/externalContracts/snark.sol b/test/libsolidity/semanticTests/externalContracts/snark.sol index 4ffeed957..cf49f2b8d 100644 --- a/test/libsolidity/semanticTests/externalContracts/snark.sol +++ b/test/libsolidity/semanticTests/externalContracts/snark.sol @@ -296,6 +296,6 @@ contract Test { // g() -> true // pair() -> true // verifyTx() -> true -// gas irOptimized: 129963 +// gas irOptimized: 129895 // gas legacy: 130571 // gas legacyOptimized: 100147 diff --git a/test/libsolidity/semanticTests/functionCall/mapping_array_internal_argument.sol b/test/libsolidity/semanticTests/functionCall/mapping_array_internal_argument.sol index 64e319617..9696d0d5f 100644 --- a/test/libsolidity/semanticTests/functionCall/mapping_array_internal_argument.sol +++ b/test/libsolidity/semanticTests/functionCall/mapping_array_internal_argument.sol @@ -20,7 +20,7 @@ contract test { // compileViaYul: also // ---- // set(uint8,uint8,uint8,uint8,uint8): 1, 21, 22, 42, 43 -> 0, 0, 0, 0 -// gas irOptimized: 110073 +// gas irOptimized: 110002 // gas legacy: 111406 // gas legacyOptimized: 107981 // get(uint8): 1 -> 21, 22, 42, 43 diff --git a/test/libsolidity/semanticTests/functionTypes/store_function.sol b/test/libsolidity/semanticTests/functionTypes/store_function.sol index c2cdab11a..08ee1878d 100644 --- a/test/libsolidity/semanticTests/functionTypes/store_function.sol +++ b/test/libsolidity/semanticTests/functionTypes/store_function.sol @@ -28,6 +28,6 @@ contract C { // compileViaYul: also // ---- // t() -> 9 -// gas irOptimized: 121044 +// gas irOptimized: 108993 // gas legacy: 161097 // gas legacyOptimized: 111516 diff --git a/test/libsolidity/semanticTests/immutable/multi_creation.sol b/test/libsolidity/semanticTests/immutable/multi_creation.sol index 8bfda0209..03e1e7c6a 100644 --- a/test/libsolidity/semanticTests/immutable/multi_creation.sol +++ b/test/libsolidity/semanticTests/immutable/multi_creation.sol @@ -29,7 +29,7 @@ contract C { // compileViaYul: also // ---- // f() -> 3, 7, 5 -// gas irOptimized: 133434 +// gas irOptimized: 131345 // gas legacy: 153990 // gas legacyOptimized: 127822 // x() -> 7 diff --git a/test/libsolidity/semanticTests/inheritance/address_overload_resolution.sol b/test/libsolidity/semanticTests/inheritance/address_overload_resolution.sol index f1a6df43a..a18f79aac 100644 --- a/test/libsolidity/semanticTests/inheritance/address_overload_resolution.sol +++ b/test/libsolidity/semanticTests/inheritance/address_overload_resolution.sol @@ -23,8 +23,8 @@ contract D { // compileViaYul: also // ---- // f() -> 1 -// gas irOptimized: 98658 +// gas irOptimized: 86492 // gas legacy: 114412 // g() -> 5 -// gas irOptimized: 98760 +// gas irOptimized: 86588 // gas legacy: 114872 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 45912f194..028dfd7db 100644 --- a/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_calldata_interface.sol +++ b/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_calldata_interface.sol @@ -25,5 +25,5 @@ contract B { // compileViaYul: also // ---- // g() -> 42 -// gas irOptimized: 102803 +// gas irOptimized: 90623 // gas legacy: 117797 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 7e186f54a..d803fe3f8 100644 --- a/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol +++ b/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol @@ -25,6 +25,6 @@ contract B { // compileViaYul: also // ---- // g() -> 42 -// gas irOptimized: 134269 +// gas irOptimized: 119646 // gas legacy: 180597 // gas legacyOptimized: 116351 diff --git a/test/libsolidity/semanticTests/interface_inheritance_conversions.sol b/test/libsolidity/semanticTests/interface_inheritance_conversions.sol index 25d13916e..7ef932fc5 100644 --- a/test/libsolidity/semanticTests/interface_inheritance_conversions.sol +++ b/test/libsolidity/semanticTests/interface_inheritance_conversions.sol @@ -37,10 +37,10 @@ contract C { // compileViaYul: also // ---- // convertParent() -> 1 -// gas irOptimized: 123220 +// gas irOptimized: 103625 // convertSubA() -> 1, 2 -// gas irOptimized: 125366 +// gas irOptimized: 105700 // gas legacy: 101703 // convertSubB() -> 1, 3 -// gas irOptimized: 125300 +// gas irOptimized: 105634 // gas legacy: 101637 diff --git a/test/libsolidity/semanticTests/salted_create/salted_create.sol b/test/libsolidity/semanticTests/salted_create/salted_create.sol index 52a72dd91..be2d7bf35 100644 --- a/test/libsolidity/semanticTests/salted_create/salted_create.sol +++ b/test/libsolidity/semanticTests/salted_create/salted_create.sol @@ -22,6 +22,6 @@ contract A { // ---- // different_salt() -> true // same_salt() -> true -// gas irOptimized: 98439037 +// gas irOptimized: 98438966 // gas legacy: 98439116 // gas legacyOptimized: 98438970 diff --git a/test/libsolidity/semanticTests/salted_create/salted_create_with_value.sol b/test/libsolidity/semanticTests/salted_create/salted_create_with_value.sol index e7f53a1ea..ee3d77253 100644 --- a/test/libsolidity/semanticTests/salted_create/salted_create_with_value.sol +++ b/test/libsolidity/semanticTests/salted_create/salted_create_with_value.sol @@ -22,6 +22,6 @@ contract A { // compileViaYul: also // ---- // f(), 10 ether -> 3007, 3008, 3009 -// gas irOptimized: 327566 +// gas irOptimized: 294216 // gas legacy: 422027 // gas legacyOptimized: 287256 diff --git a/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol b/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol index 4de6cc86c..0f0052c56 100644 --- a/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol +++ b/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol @@ -46,6 +46,6 @@ contract C { // compileViaYul: also // ---- // test() -> true -// gas irOptimized: 143351 +// gas irOptimized: 143266 // gas legacy: 143536 // gas legacyOptimized: 133280 diff --git a/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_nested_array_to_storage.sol b/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_nested_array_to_storage.sol index 3f400ab28..c17722a54 100644 --- a/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_nested_array_to_storage.sol +++ b/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_nested_array_to_storage.sol @@ -18,6 +18,6 @@ contract C { // compileViaYul: also // ---- // f(uint32,(uint128,uint256[][2],uint32)): 55, 0x40, 77, 0x60, 88, 0x40, 0x40, 2, 1, 2 -> 55, 77, 1, 2, 88 -// gas irOptimized: 198007 +// gas irOptimized: 197936 // gas legacy: 205149 // gas legacyOptimized: 196983 diff --git a/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol b/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol index 84c8b6c14..dc1112d9e 100644 --- a/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol +++ b/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol @@ -25,4 +25,4 @@ contract CopyTest { // compileViaYul: also // ---- // run() -> 2, 23, 42 -// gas irOptimized: 110109 +// gas irOptimized: 110038 diff --git a/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol b/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol index aa681bae3..29e408992 100644 --- a/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol +++ b/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol @@ -68,7 +68,7 @@ contract Test { // compileViaYul: also // ---- // load() -> 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 -// gas irOptimized: 111603 +// gas irOptimized: 111532 // gas legacy: 113999 // gas legacyOptimized: 106281 // store() -> 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 diff --git a/test/libsolidity/semanticTests/structs/struct_containing_bytes_copy_and_delete.sol b/test/libsolidity/semanticTests/structs/struct_containing_bytes_copy_and_delete.sol index 7ac2f3f4a..97c551032 100644 --- a/test/libsolidity/semanticTests/structs/struct_containing_bytes_copy_and_delete.sol +++ b/test/libsolidity/semanticTests/structs/struct_containing_bytes_copy_and_delete.sol @@ -25,7 +25,7 @@ contract c { // ---- // storage: empty // set(uint256,bytes,uint256): 12, 0x60, 13, 33, "12345678901234567890123456789012", "3" -> true -// gas irOptimized: 124337 +// gas irOptimized: 124266 // gas legacy: 124736 // gas legacyOptimized: 124179 // test(uint256): 32 -> "3" diff --git a/test/libsolidity/semanticTests/structs/struct_copy.sol b/test/libsolidity/semanticTests/structs/struct_copy.sol index 1215407c0..4753c00f6 100644 --- a/test/libsolidity/semanticTests/structs/struct_copy.sol +++ b/test/libsolidity/semanticTests/structs/struct_copy.sol @@ -38,12 +38,12 @@ contract c { // compileViaYul: also // ---- // set(uint256): 7 -> true -// gas irOptimized: 101915 +// gas irOptimized: 101844 // gas legacy: 102216 // gas legacyOptimized: 101606 // retrieve(uint256): 7 -> 1, 3, 4, 2 // copy(uint256,uint256): 7, 8 -> true -// gas irOptimized: 105232 +// gas irOptimized: 105161 // gas legacy: 105566 // gas legacyOptimized: 105022 // retrieve(uint256): 7 -> 1, 3, 4, 2 diff --git a/test/libsolidity/semanticTests/structs/struct_copy_via_local.sol b/test/libsolidity/semanticTests/structs/struct_copy_via_local.sol index c60821a09..9fe25c4b8 100644 --- a/test/libsolidity/semanticTests/structs/struct_copy_via_local.sol +++ b/test/libsolidity/semanticTests/structs/struct_copy_via_local.sol @@ -21,6 +21,6 @@ contract c { // compileViaYul: also // ---- // test() -> true -// gas irOptimized: 101509 +// gas irOptimized: 104623 // gas legacy: 106427 // gas legacyOptimized: 101306 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 e23957373..372e2ce38 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: 124791 +// gas irOptimized: 124720 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 acd34851f..102cabb1b 100644 --- a/test/libsolidity/semanticTests/structs/struct_delete_storage_with_array.sol +++ b/test/libsolidity/semanticTests/structs/struct_delete_storage_with_array.sol @@ -44,7 +44,7 @@ contract C { // compileViaYul: also // ---- // f() -> -// gas irOptimized: 124107 +// gas irOptimized: 124036 // gas legacy: 126832 // gas legacyOptimized: 125500 // g() -> diff --git a/test/libsolidity/semanticTests/structs/struct_delete_storage_with_arrays_small.sol b/test/libsolidity/semanticTests/structs/struct_delete_storage_with_arrays_small.sol index 411839713..52ab5a8cf 100644 --- a/test/libsolidity/semanticTests/structs/struct_delete_storage_with_arrays_small.sol +++ b/test/libsolidity/semanticTests/structs/struct_delete_storage_with_arrays_small.sol @@ -27,4 +27,4 @@ contract C { // compileViaYul: true // ---- // f() -> 0 -// gas irOptimized: 118118 +// gas irOptimized: 118047 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 5d2c3a381..552305e19 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 @@ -31,6 +31,6 @@ contract C { // compileViaYul: also // ---- // f() -> 42, 23, 34, 42, 42 -// gas irOptimized: 108681 +// gas irOptimized: 108610 // gas legacy: 110821 // gas legacyOptimized: 105148 diff --git a/test/libsolidity/semanticTests/structs/structs.sol b/test/libsolidity/semanticTests/structs/structs.sol index eeab27ade..83ce279c1 100644 --- a/test/libsolidity/semanticTests/structs/structs.sol +++ b/test/libsolidity/semanticTests/structs/structs.sol @@ -32,7 +32,7 @@ contract test { // ---- // check() -> false // set() -> -// gas irOptimized: 128533 +// gas irOptimized: 128462 // gas legacy: 129577 // gas legacyOptimized: 126964 // check() -> true diff --git a/test/libsolidity/semanticTests/various/destructuring_assignment.sol b/test/libsolidity/semanticTests/various/destructuring_assignment.sol index d2a0cfc3a..89f591731 100644 --- a/test/libsolidity/semanticTests/various/destructuring_assignment.sol +++ b/test/libsolidity/semanticTests/various/destructuring_assignment.sol @@ -36,6 +36,6 @@ contract C { // compileViaYul: also // ---- // f(bytes): 0x20, 0x5, "abcde" -> 0 -// gas irOptimized: 242046 +// gas irOptimized: 241975 // gas legacy: 239258 // gas legacyOptimized: 238577 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 668d24880..ffd88c092 100644 --- a/test/libsolidity/semanticTests/various/skip_dynamic_types_for_structs.sol +++ b/test/libsolidity/semanticTests/various/skip_dynamic_types_for_structs.sol @@ -22,6 +22,6 @@ contract C { // compileViaYul: also // ---- // g() -> 2, 6 -// gas irOptimized: 169985 +// gas irOptimized: 169843 // gas legacy: 172490 // gas legacyOptimized: 171209 diff --git a/test/libsolidity/semanticTests/various/staticcall_for_view_and_pure.sol b/test/libsolidity/semanticTests/various/staticcall_for_view_and_pure.sol index d2277df7e..1d3a435c2 100644 --- a/test/libsolidity/semanticTests/various/staticcall_for_view_and_pure.sol +++ b/test/libsolidity/semanticTests/various/staticcall_for_view_and_pure.sol @@ -38,10 +38,10 @@ contract D { // f() -> 0x1 # This should work, next should throw # // gas legacy: 102944 // fview() -> FAILURE -// gas irOptimized: 98438674 +// gas irOptimized: 98438658 // gas legacy: 98438822 // gas legacyOptimized: 98438615 // fpure() -> FAILURE -// gas irOptimized: 98438674 +// gas irOptimized: 98438658 // gas legacy: 98438822 // gas legacyOptimized: 98438616 diff --git a/test/libsolidity/semanticTests/various/swap_in_storage_overwrite.sol b/test/libsolidity/semanticTests/various/swap_in_storage_overwrite.sol index a3e070400..a457c6846 100644 --- a/test/libsolidity/semanticTests/various/swap_in_storage_overwrite.sol +++ b/test/libsolidity/semanticTests/various/swap_in_storage_overwrite.sol @@ -30,7 +30,7 @@ contract c { // x() -> 0, 0 // y() -> 0, 0 // set() -> -// gas irOptimized: 101425 +// gas irOptimized: 101354 // gas legacy: 101332 // gas legacyOptimized: 101282 // x() -> 1, 2 diff --git a/test/libsolidity/semanticTests/viaYul/array_memory_index_access.sol b/test/libsolidity/semanticTests/viaYul/array_memory_index_access.sol index 464ed1bd1..8ae104209 100644 --- a/test/libsolidity/semanticTests/viaYul/array_memory_index_access.sol +++ b/test/libsolidity/semanticTests/viaYul/array_memory_index_access.sol @@ -28,7 +28,7 @@ contract C { // index(uint256): 10 -> true // index(uint256): 20 -> true // index(uint256): 0xFF -> true -// gas irOptimized: 167453 +// gas irOptimized: 167382 // gas legacy: 248854 // gas legacyOptimized: 152638 // accessIndex(uint256,int256): 10, 1 -> 2 diff --git a/test/libsolidity/semanticTests/viaYul/array_storage_index_access.sol b/test/libsolidity/semanticTests/viaYul/array_storage_index_access.sol index 682156a4b..6aacded94 100644 --- a/test/libsolidity/semanticTests/viaYul/array_storage_index_access.sol +++ b/test/libsolidity/semanticTests/viaYul/array_storage_index_access.sol @@ -18,33 +18,33 @@ contract C { // ---- // test_indices(uint256): 1 -> // test_indices(uint256): 129 -> -// gas irOptimized: 3566833 +// gas irOptimized: 3456682 // gas legacy: 3340105 // gas legacyOptimized: 3280773 // test_indices(uint256): 5 -> -// gas irOptimized: 474317 +// gas irOptimized: 474246 // gas legacy: 458941 // gas legacyOptimized: 455849 // test_indices(uint256): 10 -> // test_indices(uint256): 15 -> -// gas irOptimized: 114781 +// gas irOptimized: 110410 // test_indices(uint256): 0xFF -> -// gas irOptimized: 4543461 +// gas irOptimized: 4336990 // gas legacy: 4107867 // gas legacyOptimized: 3991807 // test_indices(uint256): 1000 -> -// gas irOptimized: 21877663 +// gas irOptimized: 21236892 // gas legacy: 20360399 // gas legacyOptimized: 19921344 // test_indices(uint256): 129 -> -// gas irOptimized: 3655066 +// gas irOptimized: 3654995 // gas legacy: 3472135 // gas legacyOptimized: 3415947 // test_indices(uint256): 128 -> -// gas irOptimized: 658202 +// gas irOptimized: 658131 // gas legacy: 556972 // gas legacyOptimized: 508124 // test_indices(uint256): 1 -> -// gas irOptimized: 464898 +// gas irOptimized: 464827 // gas legacy: 452407 // gas legacyOptimized: 450811 diff --git a/test/libsolidity/semanticTests/viaYul/array_storage_index_boundary_test.sol b/test/libsolidity/semanticTests/viaYul/array_storage_index_boundary_test.sol index 556732d62..d701f9b55 100644 --- a/test/libsolidity/semanticTests/viaYul/array_storage_index_boundary_test.sol +++ b/test/libsolidity/semanticTests/viaYul/array_storage_index_boundary_test.sol @@ -22,7 +22,7 @@ contract C { // gas legacy: 648515 // gas legacyOptimized: 628739 // test_boundary_check(uint256,uint256): 256, 255 -> 0 -// gas irOptimized: 677586 +// gas irOptimized: 677515 // gas legacy: 649549 // gas legacyOptimized: 629633 // test_boundary_check(uint256,uint256): 256, 0xFFFF -> FAILURE, hex"4e487b71", 0x32 diff --git a/test/libsolidity/semanticTests/viaYul/array_storage_index_zeroed_test.sol b/test/libsolidity/semanticTests/viaYul/array_storage_index_zeroed_test.sol index 9ebdbdfa4..0f7c97be6 100644 --- a/test/libsolidity/semanticTests/viaYul/array_storage_index_zeroed_test.sol +++ b/test/libsolidity/semanticTests/viaYul/array_storage_index_zeroed_test.sol @@ -54,18 +54,18 @@ contract C { // ---- // test_zeroed_indicies(uint256): 1 -> // test_zeroed_indicies(uint256): 5 -> -// gas irOptimized: 208688 +// gas irOptimized: 208617 // gas legacy: 191267 // gas legacyOptimized: 188486 // test_zeroed_indicies(uint256): 10 -> -// gas irOptimized: 304710 +// gas irOptimized: 304639 // gas legacy: 276129 // gas legacyOptimized: 271024 // test_zeroed_indicies(uint256): 15 -> -// gas irOptimized: 378020 +// gas irOptimized: 377949 // gas legacy: 339254 // gas legacyOptimized: 331904 // test_zeroed_indicies(uint256): 0xFF -> -// gas irOptimized: 9234220 +// gas irOptimized: 9234149 // gas legacy: 8477449 // gas legacyOptimized: 8343774 diff --git a/test/libsolidity/semanticTests/viaYul/array_storage_length_access.sol b/test/libsolidity/semanticTests/viaYul/array_storage_length_access.sol index fb704f321..08fa6c9db 100644 --- a/test/libsolidity/semanticTests/viaYul/array_storage_length_access.sol +++ b/test/libsolidity/semanticTests/viaYul/array_storage_length_access.sol @@ -14,11 +14,11 @@ contract C { // set_get_length(uint256): 10 -> 10 // set_get_length(uint256): 20 -> 20 // set_get_length(uint256): 0xFF -> 0xFF -// gas irOptimized: 434427 +// gas irOptimized: 434356 // gas legacy: 619622 // gas legacyOptimized: 600718 // set_get_length(uint256): 0xFFF -> 0xFFF -// gas irOptimized: 6743189 +// gas irOptimized: 6743118 // gas legacy: 9765519 // gas legacyOptimized: 9461820 // set_get_length(uint256): 0xFFFFF -> FAILURE # Out-of-gas # diff --git a/test/libsolidity/semanticTests/viaYul/array_storage_push_empty.sol b/test/libsolidity/semanticTests/viaYul/array_storage_push_empty.sol index 3c99e10fa..9403c5e38 100644 --- a/test/libsolidity/semanticTests/viaYul/array_storage_push_empty.sol +++ b/test/libsolidity/semanticTests/viaYul/array_storage_push_empty.sol @@ -13,11 +13,11 @@ contract C { // compileViaYul: also // ---- // pushEmpty(uint256): 128 -// gas irOptimized: 629687 +// gas irOptimized: 635248 // gas legacy: 607287 // gas legacyOptimized: 589048 // pushEmpty(uint256): 256 -// gas irOptimized: 859191 +// gas irOptimized: 870384 // gas legacy: 828983 // gas legacyOptimized: 802808 // pushEmpty(uint256): 32768 -> FAILURE # out-of-gas # diff --git a/test/libsolidity/semanticTests/viaYul/array_storage_push_empty_length_address.sol b/test/libsolidity/semanticTests/viaYul/array_storage_push_empty_length_address.sol index a826856f9..be7d0ad82 100644 --- a/test/libsolidity/semanticTests/viaYul/array_storage_push_empty_length_address.sol +++ b/test/libsolidity/semanticTests/viaYul/array_storage_push_empty_length_address.sol @@ -18,15 +18,15 @@ contract C { // set_get_length(uint256): 10 -> 10 // set_get_length(uint256): 20 -> 20 // set_get_length(uint256): 0 -> 0 -// gas irOptimized: 110050 +// gas irOptimized: 109979 // gas legacy: 107830 // gas legacyOptimized: 107262 // set_get_length(uint256): 0xFF -> 0xFF -// gas irOptimized: 700302 +// gas irOptimized: 700231 // gas legacy: 882337 // gas legacyOptimized: 650704 // set_get_length(uint256): 0xFFF -> 0xFFF -// gas irOptimized: 10207734 +// gas irOptimized: 10207663 // gas legacy: 12945874 // gas legacyOptimized: 9462646 // set_get_length(uint256): 0xFFFF -> FAILURE # Out-of-gas # diff --git a/test/libsolidity/semanticTests/viaYul/array_storage_push_pop.sol b/test/libsolidity/semanticTests/viaYul/array_storage_push_pop.sol index 5c0e94df9..30643d2c6 100644 --- a/test/libsolidity/semanticTests/viaYul/array_storage_push_pop.sol +++ b/test/libsolidity/semanticTests/viaYul/array_storage_push_pop.sol @@ -15,15 +15,15 @@ contract C { // set_get_length(uint256): 1 -> 0 // set_get_length(uint256): 10 -> 0 // set_get_length(uint256): 20 -> 0 -// gas irOptimized: 162373 +// gas irOptimized: 162305 // gas legacy: 141922 // gas legacyOptimized: 139708 // set_get_length(uint256): 0xFF -> 0 -// gas irOptimized: 1787868 +// gas irOptimized: 1787800 // gas legacy: 1524427 // gas legacyOptimized: 1500358 // set_get_length(uint256): 0xFFF -> 0 -// gas irOptimized: 28349160 +// gas irOptimized: 28349092 // gas legacy: 24115159 // gas legacyOptimized: 23733970 // set_get_length(uint256): 0xFFFF -> FAILURE # Out-of-gas # diff --git a/test/libsolidity/semanticTests/viaYul/empty_return_corrupted_free_memory_pointer.sol b/test/libsolidity/semanticTests/viaYul/empty_return_corrupted_free_memory_pointer.sol new file mode 100644 index 000000000..cdc2f2448 --- /dev/null +++ b/test/libsolidity/semanticTests/viaYul/empty_return_corrupted_free_memory_pointer.sol @@ -0,0 +1,9 @@ +contract C { + function f() public { + assembly{ mstore(0x40, sub(0, 1)) } + } +} +// ==== +// compileViaYul: also +// ---- +// f() ->