diff --git a/Changelog.md b/Changelog.md index 4f74b2dea..6f220005e 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,6 +4,7 @@ Language Features: Compiler Features: + * Yul Optimizer: If ``PUSH0`` is supported, favor zero literals over storing zero values in variables. Bugfixes: diff --git a/libyul/optimiser/Metrics.cpp b/libyul/optimiser/Metrics.cpp index 2eac51595..a48cbf91b 100644 --- a/libyul/optimiser/Metrics.cpp +++ b/libyul/optimiser/Metrics.cpp @@ -158,6 +158,10 @@ void CodeCost::operator()(Literal const& _literal) case LiteralKind::Number: for (u256 n = u256(_literal.value.str()); n >= 0x100; n >>= 8) cost++; + if (valueOfLiteral(_literal) == 0) + if (auto evmDialect = dynamic_cast(&m_dialect)) + if (evmDialect->evmVersion().hasPush0()) + --m_cost; break; case LiteralKind::String: cost = _literal.value.str().size(); diff --git a/test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_all/output b/test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_all/output index 115bf34cc..a232fed8f 100644 --- a/test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_all/output +++ b/test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_all/output @@ -189,12 +189,11 @@ object "C_6" { /// @src 0:60:101 "contract C {..." if iszero(lt(calldatasize(), 4)) { - let _1 := 0 - if eq(0x26121ff0, shr(224, calldataload(_1))) + if eq(0x26121ff0, shr(224, calldataload(0))) { - if callvalue() { revert(_1, _1) } - if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) } - return(_1, _1) + if callvalue() { revert(0, 0) } + if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + return(0, 0) } } revert(0, 0) diff --git a/test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_location_only/output b/test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_location_only/output index 33faf3cf1..00a6b290f 100644 --- a/test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_location_only/output +++ b/test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_location_only/output @@ -188,12 +188,11 @@ object "C_6" { /// @src 0:60:101 if iszero(lt(calldatasize(), 4)) { - let _1 := 0 - if eq(0x26121ff0, shr(224, calldataload(_1))) + if eq(0x26121ff0, shr(224, calldataload(0))) { - if callvalue() { revert(_1, _1) } - if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) } - return(_1, _1) + if callvalue() { revert(0, 0) } + if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + return(0, 0) } } revert(0, 0) diff --git a/test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_none/output b/test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_none/output index 330715023..c8715df15 100644 --- a/test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_none/output +++ b/test/cmdlineTests/debug_info_in_yul_and_evm_asm_print_none/output @@ -177,12 +177,11 @@ object "C_6" { { if iszero(lt(calldatasize(), 4)) { - let _1 := 0 - if eq(0x26121ff0, shr(224, calldataload(_1))) + if eq(0x26121ff0, shr(224, calldataload(0))) { - if callvalue() { revert(_1, _1) } - if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) } - return(_1, _1) + if callvalue() { revert(0, 0) } + if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + return(0, 0) } } revert(0, 0) diff --git a/test/cmdlineTests/debug_info_in_yul_snippet_escaping/output b/test/cmdlineTests/debug_info_in_yul_snippet_escaping/output index 9fb9a2dbc..94dfb8642 100644 --- a/test/cmdlineTests/debug_info_in_yul_snippet_escaping/output +++ b/test/cmdlineTests/debug_info_in_yul_snippet_escaping/output @@ -434,65 +434,64 @@ object "D_27" { mstore(_2, _1) if iszero(lt(calldatasize(), 4)) { - let _3 := 0 - if eq(0x26121ff0, shr(224, calldataload(_3))) + if eq(0x26121ff0, shr(224, calldataload(0))) { - if callvalue() { revert(_3, _3) } - if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) } + if callvalue() { revert(0, 0) } + if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } /// @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." - let _4 := datasize("C_2") - let _5 := add(_1, _4) - let _6 := 0xffffffffffffffff - if or(gt(_5, _6), lt(_5, _1)) + let _3 := datasize("C_2") + let _4 := add(_1, _3) + let _5 := 0xffffffffffffffff + if or(gt(_4, _5), lt(_4, _1)) { /// @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." - mstore(_3, shl(224, 0x4e487b71)) + mstore(0, shl(224, 0x4e487b71)) mstore(4, 0x41) - revert(_3, 0x24) + revert(0, 0x24) } /// @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." - datacopy(_1, dataoffset("C_2"), _4) - if iszero(create(/** @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." */ _3, /** @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." */ _1, sub(_5, _1))) + datacopy(_1, dataoffset("C_2"), _3) + if iszero(create(/** @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." */ 0, /** @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." */ _1, sub(_4, _1))) { /// @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." let pos := mload(_2) - returndatacopy(pos, _3, returndatasize()) + returndatacopy(pos, 0, returndatasize()) revert(pos, returndatasize()) } let memPtr := mload(_2) let newFreePtr := add(memPtr, _2) - if or(gt(newFreePtr, /** @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." */ _6), /** @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." */ lt(newFreePtr, memPtr)) + if or(gt(newFreePtr, /** @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." */ _5), /** @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." */ lt(newFreePtr, memPtr)) { - mstore(_3, shl(224, 0x4e487b71)) + mstore(0, shl(224, 0x4e487b71)) mstore(4, 0x41) - revert(_3, 0x24) + revert(0, 0x24) } mstore(_2, newFreePtr) mstore(memPtr, 2) - let _7 := 32 - mstore(add(memPtr, _7), "/*") + let _6 := 32 + mstore(add(memPtr, _6), "/*") let memPtr_1 := mload(_2) let newFreePtr_1 := add(memPtr_1, 96) - if or(gt(newFreePtr_1, /** @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." */ _6), /** @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." */ lt(newFreePtr_1, memPtr_1)) + if or(gt(newFreePtr_1, /** @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." */ _5), /** @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." */ lt(newFreePtr_1, memPtr_1)) { - mstore(_3, shl(224, 0x4e487b71)) + mstore(0, shl(224, 0x4e487b71)) mstore(4, 0x41) - revert(_3, 0x24) + revert(0, 0x24) } mstore(_2, newFreePtr_1) mstore(memPtr_1, 39) - mstore(add(memPtr_1, _7), 0x2f2a2a204073726320303a39363a313635202022636f6e74726163742044207b) + mstore(add(memPtr_1, _6), 0x2f2a2a204073726320303a39363a313635202022636f6e74726163742044207b) mstore(add(memPtr_1, _2), shl(200, 0x2e2e2e22202a2f)) let memPos := mload(_2) - mstore(memPos, _7) + mstore(memPos, _6) let length := mload(memPtr_1) - mstore(add(memPos, _7), length) - let i := _3 - for { } lt(i, length) { i := add(i, _7) } + mstore(add(memPos, _6), length) + let i := 0 + for { } lt(i, length) { i := add(i, _6) } { - mstore(add(add(memPos, i), _2), mload(add(add(memPtr_1, i), _7))) + mstore(add(add(memPos, i), _2), mload(add(add(memPtr_1, i), _6))) } - mstore(add(add(memPos, length), _2), _3) + mstore(add(add(memPos, length), _2), 0) return(memPos, add(sub(add(memPos, and(add(length, 31), not(31))), memPos), _2)) } } diff --git a/test/cmdlineTests/ir_compiler_subobjects/output b/test/cmdlineTests/ir_compiler_subobjects/output index 0a505a4ac..39ef53f55 100644 --- a/test/cmdlineTests/ir_compiler_subobjects/output +++ b/test/cmdlineTests/ir_compiler_subobjects/output @@ -47,31 +47,30 @@ object "D_16" { mstore(64, _1) if iszero(lt(calldatasize(), 4)) { - let _2 := 0 - if eq(0x26121ff0, shr(224, calldataload(_2))) + if eq(0x26121ff0, shr(224, calldataload(0))) { - if callvalue() { revert(_2, _2) } - if slt(add(calldatasize(), not(3)), _2) { revert(_2, _2) } + if callvalue() { revert(0, 0) } + if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } /// @src 0:149:156 "new C()" - let _3 := datasize("C_3") - let _4 := add(_1, _3) - if or(gt(_4, 0xffffffffffffffff), lt(_4, _1)) + let _2 := datasize("C_3") + let _3 := add(_1, _2) + if or(gt(_3, 0xffffffffffffffff), lt(_3, _1)) { /// @src 0:96:165 "contract D {..." - mstore(_2, shl(224, 0x4e487b71)) + mstore(0, shl(224, 0x4e487b71)) mstore(4, 0x41) - revert(_2, 0x24) + revert(0, 0x24) } /// @src 0:149:156 "new C()" - datacopy(_1, dataoffset("C_3"), _3) - if iszero(create(/** @src 0:96:165 "contract D {..." */ _2, /** @src 0:149:156 "new C()" */ _1, sub(_4, _1))) + datacopy(_1, dataoffset("C_3"), _2) + if iszero(create(/** @src 0:96:165 "contract D {..." */ 0, /** @src 0:149:156 "new C()" */ _1, sub(_3, _1))) { /// @src 0:96:165 "contract D {..." let pos := mload(64) - returndatacopy(pos, _2, returndatasize()) + returndatacopy(pos, 0, returndatasize()) revert(pos, returndatasize()) } - return(_2, _2) + return(0, 0) } } revert(0, 0) diff --git a/test/cmdlineTests/ir_with_assembly_no_memoryguard_creation/output b/test/cmdlineTests/ir_with_assembly_no_memoryguard_creation/output index 50915c8dc..5c822949a 100644 --- a/test/cmdlineTests/ir_with_assembly_no_memoryguard_creation/output +++ b/test/cmdlineTests/ir_with_assembly_no_memoryguard_creation/output @@ -17,12 +17,11 @@ object "D_12" { /// @src 0:82:175 "contract D {..." if iszero(lt(calldatasize(), 4)) { - let _1 := 0 - if eq(0x26121ff0, shr(224, calldataload(_1))) + if eq(0x26121ff0, shr(224, calldataload(0))) { - if callvalue() { revert(_1, _1) } - if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) } - return(_1, _1) + if callvalue() { revert(0, 0) } + if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + return(0, 0) } } revert(0, 0) diff --git a/test/cmdlineTests/ir_with_assembly_no_memoryguard_runtime/output b/test/cmdlineTests/ir_with_assembly_no_memoryguard_runtime/output index b81febf73..f6be1493e 100644 --- a/test/cmdlineTests/ir_with_assembly_no_memoryguard_runtime/output +++ b/test/cmdlineTests/ir_with_assembly_no_memoryguard_runtime/output @@ -19,12 +19,11 @@ object "D_8" { /// @src 0:82:166 "contract D {..." if iszero(lt(calldatasize(), 4)) { - let _1 := 0 - if eq(0x26121ff0, shr(224, calldataload(_1))) + if eq(0x26121ff0, shr(224, calldataload(0))) { - if callvalue() { revert(_1, _1) } - if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) } - return(_1, _1) + if callvalue() { revert(0, 0) } + if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + return(0, 0) } } revert(0, 0) diff --git a/test/cmdlineTests/name_simplifier/output b/test/cmdlineTests/name_simplifier/output index 170e58ffb..936378bd3 100644 --- a/test/cmdlineTests/name_simplifier/output +++ b/test/cmdlineTests/name_simplifier/output @@ -21,101 +21,100 @@ object "C_59" { let _2 := 4 if iszero(lt(calldatasize(), _2)) { - let _3 := 0 - if eq(0xf8eddcc6, shr(224, calldataload(_3))) + if eq(0xf8eddcc6, shr(224, calldataload(0))) { - if callvalue() { revert(_3, _3) } - let _4 := 32 - if slt(add(calldatasize(), not(3)), _4) { revert(_3, _3) } + if callvalue() { revert(0, 0) } + let _3 := 32 + if slt(add(calldatasize(), not(3)), _3) { revert(0, 0) } let offset := calldataload(_2) - let _5 := 0xffffffffffffffff - if gt(offset, _5) { revert(_3, _3) } - if iszero(slt(add(offset, 35), calldatasize())) { revert(_3, _3) } - let _6 := calldataload(add(_2, offset)) - let _7 := 36 - if gt(_6, _5) + let _4 := 0xffffffffffffffff + if gt(offset, _4) { revert(0, 0) } + if iszero(slt(add(offset, 35), calldatasize())) { revert(0, 0) } + let _5 := calldataload(add(_2, offset)) + let _6 := 36 + if gt(_5, _4) { - mstore(_3, shl(224, 0x4e487b71)) + mstore(0, shl(224, 0x4e487b71)) mstore(_2, 0x41) - revert(_3, _7) + revert(0, _6) } - let _8 := shl(5, _6) - let _9 := not(31) - let newFreePtr := add(_1, and(add(_8, 63), _9)) - if or(gt(newFreePtr, _5), lt(newFreePtr, _1)) + let _7 := shl(5, _5) + let _8 := not(31) + let newFreePtr := add(_1, and(add(_7, 63), _8)) + if or(gt(newFreePtr, _4), lt(newFreePtr, _1)) { - mstore(_3, shl(224, 0x4e487b71)) + mstore(0, shl(224, 0x4e487b71)) mstore(_2, 0x41) - revert(_3, _7) + revert(0, _6) } - let _10 := 64 - mstore(_10, newFreePtr) + let _9 := 64 + mstore(_9, newFreePtr) let dst := _1 - mstore(_1, _6) - dst := add(_1, _4) + mstore(_1, _5) + dst := add(_1, _3) let dst_1 := dst - let srcEnd := add(add(offset, _8), _7) - if gt(srcEnd, calldatasize()) { revert(_3, _3) } - let src := add(offset, _7) - for { } lt(src, srcEnd) { src := add(src, _4) } + let srcEnd := add(add(offset, _7), _6) + if gt(srcEnd, calldatasize()) { revert(0, 0) } + let src := add(offset, _6) + for { } lt(src, srcEnd) { src := add(src, _3) } { - if slt(sub(calldatasize(), src), _4) { revert(_3, _3) } - let memPtr := mload(_10) - let newFreePtr_1 := add(memPtr, _4) - if or(gt(newFreePtr_1, _5), lt(newFreePtr_1, memPtr)) + if slt(sub(calldatasize(), src), _3) { revert(0, 0) } + let memPtr := mload(_9) + let newFreePtr_1 := add(memPtr, _3) + if or(gt(newFreePtr_1, _4), lt(newFreePtr_1, memPtr)) { - mstore(_3, shl(224, 0x4e487b71)) + mstore(0, shl(224, 0x4e487b71)) mstore(_2, 0x41) - revert(_3, _7) + revert(0, _6) } - mstore(_10, newFreePtr_1) + mstore(_9, newFreePtr_1) mstore(memPtr, calldataload(src)) mstore(dst, memPtr) - dst := add(dst, _4) + dst := add(dst, _3) } if iszero(mload(_1)) { - mstore(_3, shl(224, 0x4e487b71)) + mstore(0, shl(224, 0x4e487b71)) mstore(_2, 0x32) - revert(_3, _7) + revert(0, _6) } - sstore(_3, mload(/** @src 0:469:474 "_s[0]" */ mload(dst_1))) + sstore(0, mload(/** @src 0:469:474 "_s[0]" */ mload(dst_1))) /// @src 0:346:625 "contract C {..." if iszero(lt(/** @src 0:492:493 "1" */ 0x01, /** @src 0:346:625 "contract C {..." */ mload(_1))) { - mstore(_3, shl(224, 0x4e487b71)) + mstore(0, shl(224, 0x4e487b71)) mstore(_2, 0x32) - revert(_3, _7) + revert(0, _6) } - let _11 := mload(/** @src 0:489:494 "_s[1]" */ mload(/** @src 0:346:625 "contract C {..." */ add(_1, _10))) - sstore(0x02, _11) - let memPtr_1 := mload(_10) + let _10 := mload(/** @src 0:489:494 "_s[1]" */ mload(/** @src 0:346:625 "contract C {..." */ add(_1, _9))) + sstore(0x02, _10) + let memPtr_1 := mload(_9) let newFreePtr_2 := add(memPtr_1, 160) - if or(gt(newFreePtr_2, _5), lt(newFreePtr_2, memPtr_1)) + if or(gt(newFreePtr_2, _4), lt(newFreePtr_2, memPtr_1)) { - mstore(_3, shl(224, 0x4e487b71)) + mstore(0, shl(224, 0x4e487b71)) mstore(_2, 0x41) - revert(_3, _7) + revert(0, _6) } - mstore(_10, newFreePtr_2) + mstore(_9, newFreePtr_2) mstore(memPtr_1, 100) - mstore(add(memPtr_1, _4), "longstringlongstringlongstringlo") - mstore(add(memPtr_1, _10), "ngstringlongstringlongstringlong") - let _12 := 96 - mstore(add(memPtr_1, _12), "stringlongstringlongstringlongst") + mstore(add(memPtr_1, _3), "longstringlongstringlongstringlo") + mstore(add(memPtr_1, _9), "ngstringlongstringlongstringlong") + let _11 := 96 + mstore(add(memPtr_1, _11), "stringlongstringlongstringlongst") mstore(add(memPtr_1, 128), "ring") - let memPos := mload(_10) - mstore(memPos, _11) - mstore(add(memPos, _4), _10) + let memPos := mload(_9) + mstore(memPos, _10) + mstore(add(memPos, _3), _9) let length := mload(memPtr_1) - mstore(add(memPos, _10), length) - let i := _3 - for { } lt(i, length) { i := add(i, _4) } + mstore(add(memPos, _9), length) + let i := 0 + for { } lt(i, length) { i := add(i, _3) } { - mstore(add(add(memPos, i), _12), mload(add(add(memPtr_1, i), _4))) + mstore(add(add(memPos, i), _11), mload(add(add(memPtr_1, i), _3))) } - mstore(add(add(memPos, length), _12), _3) - return(memPos, add(sub(add(memPos, and(add(length, 31), _9)), memPos), _12)) + mstore(add(add(memPos, length), _11), 0) + return(memPos, add(sub(add(memPos, and(add(length, 31), _8)), memPos), _11)) } } revert(0, 0) diff --git a/test/cmdlineTests/optimizer_array_sload/output b/test/cmdlineTests/optimizer_array_sload/output index 98b23306a..f2f95f15d 100644 --- a/test/cmdlineTests/optimizer_array_sload/output +++ b/test/cmdlineTests/optimizer_array_sload/output @@ -21,26 +21,25 @@ object "Arraysum_34" { let _1 := 4 if iszero(lt(calldatasize(), _1)) { - let _2 := 0 - if eq(0x81d73423, shr(224, calldataload(_2))) + if eq(0x81d73423, shr(224, calldataload(0))) { - if callvalue() { revert(_2, _2) } - if slt(add(calldatasize(), not(3)), _2) { revert(_2, _2) } - let var_sum := _2 + if callvalue() { revert(0, 0) } + if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + let var_sum := 0 /// @src 0:368:378 "uint i = 0" - let var_i := /** @src 0:80:429 "contract Arraysum {..." */ _2 - let _3 := sload(_2) + let var_i := /** @src 0:80:429 "contract Arraysum {..." */ var_sum + let _2 := sload(var_sum) /// @src 0:364:423 "for(uint i = 0; i < values.length; i++)..." for { } - /** @src 0:380:397 "i < values.length" */ lt(var_i, _3) + /** @src 0:380:397 "i < values.length" */ lt(var_i, _2) /// @src 0:368:378 "uint i = 0" { /// @src 0:80:429 "contract Arraysum {..." if eq(var_i, not(0)) { - mstore(_2, shl(224, 0x4e487b71)) + mstore(0, shl(224, 0x4e487b71)) mstore(_1, 0x11) - revert(_2, 0x24) + revert(0, 0x24) } /// @src 0:399:402 "i++" var_i := /** @src 0:80:429 "contract Arraysum {..." */ add(var_i, 1) @@ -48,13 +47,13 @@ object "Arraysum_34" { /// @src 0:399:402 "i++" { /// @src 0:80:429 "contract Arraysum {..." - mstore(_2, _2) + mstore(0, 0) let sum := add(var_sum, sload(add(18569430475105882587588266137607568536673111973893317399460219858819262702947, var_i))) if gt(var_sum, sum) { - mstore(_2, shl(224, 0x4e487b71)) + mstore(0, shl(224, 0x4e487b71)) mstore(_1, 0x11) - revert(_2, 0x24) + revert(0, 0x24) } /// @src 0:407:423 "sum += values[i]" var_sum := sum diff --git a/test/cmdlineTests/standard_debug_info_in_evm_asm_via_ir_location/output.json b/test/cmdlineTests/standard_debug_info_in_evm_asm_via_ir_location/output.json index 28a76eb95..339df2093 100644 --- a/test/cmdlineTests/standard_debug_info_in_evm_asm_via_ir_location/output.json +++ b/test/cmdlineTests/standard_debug_info_in_evm_asm_via_ir_location/output.json @@ -82,20 +82,16 @@ sub_0: assembly { /* \"C\":79:428 contract C... */ 0x80 0x40 - dup2 - dup2 + swap1 + dup1 + dup3 mstore jumpi(tag_2, iszero(lt(calldatasize, 0x04))) 0x00 dup1 revert tag_2: - 0x00 - swap2 - dup3 - calldataload - 0xe0 - shr + shr(0xe0, calldataload(0x00)) swap1 dup2 0x26121ff0 @@ -117,13 +113,8 @@ sub_0: assembly { revert tag_8: jumpi(tag_12, callvalue) - dup2 - add(calldatasize, not(0x03)) - slt - tag_12 - jumpi - dup2 - sload + jumpi(tag_12, slt(add(not(0x03), calldatasize), 0x00)) + sload(0x00) sub(shl(0xff, 0x01), 0x01) dup2 eq @@ -131,11 +122,11 @@ sub_0: assembly { jumpi 0x01 add - swap2 - dup3 + swap1 dup2 + 0x00 sstore - dup2 + dup1 mload shl(0xe4, 0x026121ff) /* \"C\":403:411 this.f() */ @@ -152,37 +143,40 @@ sub_0: assembly { /* \"C\":403:411 this.f() */ gas staticcall - swap2 - dup3 + swap1 + dup2 iszero tag_16 jumpi - dup1 - swap3 + /* \"C\":79:428 contract C... */ + 0x00 + /* \"C\":403:411 this.f() */ + swap2 tag_18 jumpi /* \"C\":79:428 contract C... */ tag_19: + /* \"C\":392:411 stateVar + this.f() */ + pop + tag_20 + /* \"C\":392:422 stateVar + this.f() + immutVar */ + tag_21 + /* \"C\":392:411 stateVar + this.f() */ + swap2 /* \"C\":403:411 this.f() */ 0x20 /* \"C\":392:411 stateVar + this.f() */ - dup5 - /* \"C\":392:422 stateVar + this.f() + immutVar */ - tag_20 - /* \"C\":392:411 stateVar + this.f() */ - tag_21 - dup7 - dup10 + swap5 tag_1 jump\t// in - tag_21: + tag_20: /* \"C\":414:422 immutVar */ immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") /* \"C\":392:422 stateVar + this.f() + immutVar */ swap1 tag_1 jump\t// in - tag_20: + tag_21: /* \"C\":79:428 contract C... */ swap1 mload @@ -193,8 +187,6 @@ sub_0: assembly { /* \"C\":403:411 this.f() */ tag_18: swap1 - swap2 - pop 0x20 returndatasize dup2 @@ -238,9 +230,8 @@ sub_0: assembly { pop mload /* \"C\":392:411 stateVar + this.f() */ - tag_21 + tag_20 /* \"C\":403:411 this.f() */ - 0x20 jump(tag_19) /* \"C\":79:428 contract C... */ tag_26: @@ -263,20 +254,21 @@ sub_0: assembly { jump(tag_23) tag_16: /* \"C\":79:428 contract C... */ - dup4 + dup3 mload - swap1 returndatasize - swap1 + 0x00 dup3 returndatacopy returndatasize swap1 revert tag_14: - shl(0xe0, 0x4e487b71) /* \"C\":117:119 41 */ - dup4 + shl(0xe0, 0x4e487b71) + /* \"C\":79:428 contract C... */ + 0x00 + /* \"C\":117:119 41 */ mstore 0x11 /* \"C\":79:428 contract C... */ @@ -284,24 +276,22 @@ sub_0: assembly { /* \"C\":117:119 41 */ mstore 0x24 - dup4 + /* \"C\":79:428 contract C... */ + 0x00 + /* \"C\":117:119 41 */ revert /* \"C\":79:428 contract C... */ tag_12: - pop + 0x00 dup1 revert tag_6: pop jumpi(tag_12, callvalue) - dup2 - add(calldatasize, not(0x03)) - slt - tag_12 - jumpi + jumpi(tag_12, slt(add(not(0x03), calldatasize), 0x00)) 0x20 - swap2 - sload + swap1 + sload(0x00) swap1 mload swap1 @@ -309,22 +299,17 @@ sub_0: assembly { mstore return tag_4: - dup4 - swap1 jumpi(tag_12, callvalue) - dup2 - add(calldatasize, not(0x03)) - slt - tag_12 - jumpi + jumpi(tag_12, slt(add(not(0x03), calldatasize), 0x00)) /* \"C\":290:298 immutVar */ immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") /* \"C\":117:119 41 */ - dup1 - 0x29 - add swap1 dup2 + 0x29 + add + swap2 + dup3 slt 0x01 and @@ -332,8 +317,7 @@ sub_0: assembly { jumpi /* \"C\":79:428 contract C... */ 0x20 - swap3 - pop + swap2 dup2 mstore return @@ -360,13 +344,9 @@ sub_0: assembly { iszero and or - tag_38 + tag_14 jumpi jump\t// out - tag_38: - mstore(0x00, shl(0xe0, 0x4e487b71)) - mstore(0x04, 0x11) - revert(0x00, 0x24) auxdata: } @@ -471,20 +451,16 @@ sub_0: assembly { /* \"D\":91:166 contract D is C(3)... */ 0x80 0x40 - dup2 - dup2 + swap1 + dup1 + dup3 mstore jumpi(tag_2, iszero(lt(calldatasize, 0x04))) 0x00 dup1 revert tag_2: - 0x00 - swap2 - dup3 - calldataload - 0xe0 - shr + shr(0xe0, calldataload(0x00)) swap1 dup2 0x26121ff0 @@ -506,13 +482,8 @@ sub_0: assembly { revert tag_8: jumpi(tag_12, callvalue) - dup2 - add(calldatasize, not(0x03)) - slt - tag_12 - jumpi - dup2 - sload + jumpi(tag_12, slt(add(not(0x03), calldatasize), 0x00)) + sload(0x00) sub(shl(0xff, 0x01), 0x01) dup2 eq @@ -520,11 +491,11 @@ sub_0: assembly { jumpi 0x01 add - swap2 - dup3 + swap1 dup2 + 0x00 sstore - dup2 + dup1 mload shl(0xe4, 0x026121ff) /* \"C\":403:411 this.f() */ @@ -541,37 +512,40 @@ sub_0: assembly { /* \"C\":403:411 this.f() */ gas staticcall - swap2 - dup3 + swap1 + dup2 iszero tag_16 jumpi - dup1 - swap3 + /* \"D\":91:166 contract D is C(3)... */ + 0x00 + /* \"C\":403:411 this.f() */ + swap2 tag_18 jumpi /* \"D\":91:166 contract D is C(3)... */ tag_19: + /* \"C\":392:411 stateVar + this.f() */ + pop + tag_20 + /* \"C\":392:422 stateVar + this.f() + immutVar */ + tag_21 + /* \"C\":392:411 stateVar + this.f() */ + swap2 /* \"C\":403:411 this.f() */ 0x20 /* \"C\":392:411 stateVar + this.f() */ - dup5 - /* \"C\":392:422 stateVar + this.f() + immutVar */ - tag_20 - /* \"C\":392:411 stateVar + this.f() */ - tag_21 - dup7 - dup10 + swap5 tag_1 jump\t// in - tag_21: + tag_20: /* \"C\":414:422 immutVar */ immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") /* \"C\":392:422 stateVar + this.f() + immutVar */ swap1 tag_1 jump\t// in - tag_20: + tag_21: /* \"D\":91:166 contract D is C(3)... */ swap1 mload @@ -582,8 +556,6 @@ sub_0: assembly { /* \"C\":403:411 this.f() */ tag_18: swap1 - swap2 - pop 0x20 returndatasize dup2 @@ -627,9 +599,8 @@ sub_0: assembly { pop mload /* \"C\":392:411 stateVar + this.f() */ - tag_21 + tag_20 /* \"C\":403:411 this.f() */ - 0x20 jump(tag_19) /* \"D\":91:166 contract D is C(3)... */ tag_26: @@ -652,20 +623,21 @@ sub_0: assembly { jump(tag_23) tag_16: /* \"D\":91:166 contract D is C(3)... */ - dup4 + dup3 mload - swap1 returndatasize - swap1 + 0x00 dup3 returndatacopy returndatasize swap1 revert tag_14: - shl(0xe0, 0x4e487b71) /* \"C\":117:119 41 */ - dup4 + shl(0xe0, 0x4e487b71) + /* \"D\":91:166 contract D is C(3)... */ + 0x00 + /* \"C\":117:119 41 */ mstore 0x11 /* \"D\":91:166 contract D is C(3)... */ @@ -673,24 +645,22 @@ sub_0: assembly { /* \"C\":117:119 41 */ mstore 0x24 - dup4 + /* \"D\":91:166 contract D is C(3)... */ + 0x00 + /* \"C\":117:119 41 */ revert /* \"D\":91:166 contract D is C(3)... */ tag_12: - pop + 0x00 dup1 revert tag_6: pop jumpi(tag_12, callvalue) - dup2 - add(calldatasize, not(0x03)) - slt - tag_12 - jumpi + jumpi(tag_12, slt(add(not(0x03), calldatasize), 0x00)) 0x20 - swap2 - sload + swap1 + sload(0x00) swap1 mload swap1 @@ -698,22 +668,17 @@ sub_0: assembly { mstore return tag_4: - dup4 - swap1 jumpi(tag_12, callvalue) - dup2 - add(calldatasize, not(0x03)) - slt - tag_12 - jumpi + jumpi(tag_12, slt(add(not(0x03), calldatasize), 0x00)) /* \"C\":290:298 immutVar */ immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") /* \"C\":117:119 41 */ - dup1 - 0x29 - add swap1 dup2 + 0x29 + add + swap2 + dup3 slt 0x01 and @@ -721,8 +686,7 @@ sub_0: assembly { jumpi /* \"D\":91:166 contract D is C(3)... */ 0x20 - swap3 - pop + swap2 dup2 mstore return @@ -749,13 +713,9 @@ sub_0: assembly { iszero and or - tag_38 + tag_14 jumpi jump\t// out - tag_38: - mstore(0x00, shl(0xe0, 0x4e487b71)) - mstore(0x04, 0x11) - revert(0x00, 0x24) auxdata: } diff --git a/test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_all/output.json b/test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_all/output.json index 2fe90b70e..ee958b55b 100644 --- a/test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_all/output.json +++ b/test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_all/output.json @@ -194,12 +194,11 @@ object \"C_6\" { /// @src 0:60:101 \"contract C {...\" if iszero(lt(calldatasize(), 4)) { - let _1 := 0 - if eq(0x26121ff0, shr(224, calldataload(_1))) + if eq(0x26121ff0, shr(224, calldataload(0))) { - if callvalue() { revert(_1, _1) } - if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) } - return(_1, _1) + if callvalue() { revert(0, 0) } + if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + return(0, 0) } } revert(0, 0) diff --git a/test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_location_only/output.json b/test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_location_only/output.json index 3600f633c..007b7fc62 100644 --- a/test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_location_only/output.json +++ b/test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_location_only/output.json @@ -193,12 +193,11 @@ object \"C_6\" { /// @src 0:60:101 if iszero(lt(calldatasize(), 4)) { - let _1 := 0 - if eq(0x26121ff0, shr(224, calldataload(_1))) + if eq(0x26121ff0, shr(224, calldataload(0))) { - if callvalue() { revert(_1, _1) } - if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) } - return(_1, _1) + if callvalue() { revert(0, 0) } + if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + return(0, 0) } } revert(0, 0) diff --git a/test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_none/output.json b/test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_none/output.json index 7393f8b44..884da9eb9 100644 --- a/test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_none/output.json +++ b/test/cmdlineTests/standard_debug_info_in_yul_and_evm_asm_print_none/output.json @@ -182,12 +182,11 @@ object \"C_6\" { { if iszero(lt(calldatasize(), 4)) { - let _1 := 0 - if eq(0x26121ff0, shr(224, calldataload(_1))) + if eq(0x26121ff0, shr(224, calldataload(0))) { - if callvalue() { revert(_1, _1) } - if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) } - return(_1, _1) + if callvalue() { revert(0, 0) } + if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + return(0, 0) } } revert(0, 0) diff --git a/test/cmdlineTests/standard_debug_info_in_yul_location/output.json b/test/cmdlineTests/standard_debug_info_in_yul_location/output.json index d564db75a..c563f8805 100644 --- a/test/cmdlineTests/standard_debug_info_in_yul_location/output.json +++ b/test/cmdlineTests/standard_debug_info_in_yul_location/output.json @@ -658,78 +658,77 @@ object \"C_54\" { mstore(_2, _1) if iszero(lt(calldatasize(), 4)) { - let _3 := 0 - switch shr(224, calldataload(_3)) + switch shr(224, calldataload(0)) case 0x26121ff0 { - if callvalue() { revert(_3, _3) } - if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) } + if callvalue() { revert(0, 0) } + if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } /// @src 0:297:305 \"immutVar\" - let _4 := loadimmutable(\"8\") + let _3 := loadimmutable(\"8\") /// @src 0:79:435 \"contract C...\" - let sum := add(/** @src 0:124:126 \"41\" */ 0x29, /** @src 0:79:435 \"contract C...\" */ _4) - if and(1, slt(sum, _4)) + let sum := add(/** @src 0:124:126 \"41\" */ 0x29, /** @src 0:79:435 \"contract C...\" */ _3) + if and(1, slt(sum, _3)) { - mstore(_3, shl(224, 0x4e487b71)) + mstore(0, shl(224, 0x4e487b71)) mstore(4, 0x11) - revert(_3, 0x24) + revert(0, 0x24) } mstore(_1, sum) return(_1, 32) } case 0x793816ec { - if callvalue() { revert(_3, _3) } - if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) } - let _5 := sload(_3) + if callvalue() { revert(0, 0) } + if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + let _4 := sload(0) let memPos := mload(_2) - mstore(memPos, _5) + mstore(memPos, _4) return(memPos, 32) } case 0x9942ec6f { - if callvalue() { revert(_3, _3) } - if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) } - let _6 := sload(_3) - if eq(_6, sub(shl(255, 1), 1)) + if callvalue() { revert(0, 0) } + if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + let _5 := sload(0) + if eq(_5, sub(shl(255, 1), 1)) { - mstore(_3, shl(224, 0x4e487b71)) + mstore(0, shl(224, 0x4e487b71)) mstore(4, 0x11) - revert(_3, 0x24) + revert(0, 0x24) } - let ret := add(_6, 1) - sstore(_3, ret) + let ret := add(_5, 1) + sstore(0, ret) /// @src 0:410:418 \"this.f()\" - let _7 := /** @src 0:79:435 \"contract C...\" */ mload(_2) + let _6 := /** @src 0:79:435 \"contract C...\" */ mload(_2) /// @src 0:410:418 \"this.f()\" - mstore(_7, /** @src 0:79:435 \"contract C...\" */ shl(228, 0x026121ff)) + mstore(_6, /** @src 0:79:435 \"contract C...\" */ shl(228, 0x026121ff)) /// @src 0:410:418 \"this.f()\" - let _8 := staticcall(gas(), /** @src 0:410:414 \"this\" */ address(), /** @src 0:410:418 \"this.f()\" */ _7, /** @src 0:79:435 \"contract C...\" */ 4, /** @src 0:410:418 \"this.f()\" */ _7, 32) - if iszero(_8) + let _7 := staticcall(gas(), /** @src 0:410:414 \"this\" */ address(), /** @src 0:410:418 \"this.f()\" */ _6, /** @src 0:79:435 \"contract C...\" */ 4, /** @src 0:410:418 \"this.f()\" */ _6, 32) + if iszero(_7) { /// @src 0:79:435 \"contract C...\" let pos := mload(_2) - returndatacopy(pos, _3, returndatasize()) + returndatacopy(pos, 0, returndatasize()) revert(pos, returndatasize()) } /// @src 0:410:418 \"this.f()\" - let expr := /** @src 0:79:435 \"contract C...\" */ _3 + let expr := /** @src 0:79:435 \"contract C...\" */ 0 /// @src 0:410:418 \"this.f()\" - if _8 + if _7 { - let _9 := 32 - if gt(_9, returndatasize()) { _9 := returndatasize() } + let _8 := 32 + if gt(_8, returndatasize()) { _8 := returndatasize() } /// @src 0:79:435 \"contract C...\" - let newFreePtr := add(_7, and(add(_9, 31), not(31))) - if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _7)) + let newFreePtr := add(_6, and(add(_8, 31), not(31))) + if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _6)) { - mstore(_3, shl(224, 0x4e487b71)) + mstore(expr, shl(224, 0x4e487b71)) mstore(4, 0x41) - revert(_3, 0x24) + revert(expr, 0x24) } mstore(_2, newFreePtr) - if slt(sub(/** @src 0:410:418 \"this.f()\" */ add(_7, _9), /** @src 0:79:435 \"contract C...\" */ _7), /** @src 0:410:418 \"this.f()\" */ 32) + if slt(sub(/** @src 0:410:418 \"this.f()\" */ add(_6, _8), /** @src 0:79:435 \"contract C...\" */ _6), /** @src 0:410:418 \"this.f()\" */ 32) /// @src 0:79:435 \"contract C...\" - { revert(_3, _3) } + { revert(expr, expr) } /// @src 0:410:418 \"this.f()\" - expr := /** @src 0:79:435 \"contract C...\" */ mload(_7) + expr := /** @src 0:79:435 \"contract C...\" */ mload(_6) } /// @src 0:399:418 \"stateVar + this.f()\" let expr_1 := checked_add_int256(ret, expr) @@ -741,8 +740,8 @@ object \"C_54\" { return(memPos_1, /** @src 0:410:418 \"this.f()\" */ 32) } case /** @src 0:79:435 \"contract C...\" */ 0xa00b982b { - if callvalue() { revert(_3, _3) } - if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) } + if callvalue() { revert(0, 0) } + if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } let memPos_2 := mload(_2) mstore(memPos_2, /** @src 0:124:126 \"41\" */ 0x29) /// @src 0:79:435 \"contract C...\" @@ -1504,78 +1503,77 @@ object \"D_72\" { mstore(_2, _1) if iszero(lt(calldatasize(), 4)) { - let _3 := 0 - switch shr(224, calldataload(_3)) + switch shr(224, calldataload(0)) case 0x26121ff0 { - if callvalue() { revert(_3, _3) } - if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) } + if callvalue() { revert(0, 0) } + if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } /// @src 0:297:305 \"immutVar\" - let _4 := loadimmutable(\"8\") + let _3 := loadimmutable(\"8\") /// @src 1:91:166 \"contract D is C(3)...\" - let sum := add(/** @src 0:124:126 \"41\" */ 0x29, /** @src 1:91:166 \"contract D is C(3)...\" */ _4) - if and(1, slt(sum, _4)) + let sum := add(/** @src 0:124:126 \"41\" */ 0x29, /** @src 1:91:166 \"contract D is C(3)...\" */ _3) + if and(1, slt(sum, _3)) { - mstore(_3, shl(224, 0x4e487b71)) + mstore(0, shl(224, 0x4e487b71)) mstore(4, 0x11) - revert(_3, 0x24) + revert(0, 0x24) } mstore(_1, sum) return(_1, 32) } case 0x793816ec { - if callvalue() { revert(_3, _3) } - if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) } - let _5 := sload(_3) + if callvalue() { revert(0, 0) } + if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + let _4 := sload(0) let memPos := mload(_2) - mstore(memPos, _5) + mstore(memPos, _4) return(memPos, 32) } case 0x9942ec6f { - if callvalue() { revert(_3, _3) } - if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) } - let _6 := sload(_3) - if eq(_6, sub(shl(255, 1), 1)) + if callvalue() { revert(0, 0) } + if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } + let _5 := sload(0) + if eq(_5, sub(shl(255, 1), 1)) { - mstore(_3, shl(224, 0x4e487b71)) + mstore(0, shl(224, 0x4e487b71)) mstore(4, 0x11) - revert(_3, 0x24) + revert(0, 0x24) } - let ret := add(_6, 1) - sstore(_3, ret) + let ret := add(_5, 1) + sstore(0, ret) /// @src 0:410:418 \"this.f()\" - let _7 := /** @src 1:91:166 \"contract D is C(3)...\" */ mload(_2) + let _6 := /** @src 1:91:166 \"contract D is C(3)...\" */ mload(_2) /// @src 0:410:418 \"this.f()\" - mstore(_7, /** @src 1:91:166 \"contract D is C(3)...\" */ shl(228, 0x026121ff)) + mstore(_6, /** @src 1:91:166 \"contract D is C(3)...\" */ shl(228, 0x026121ff)) /// @src 0:410:418 \"this.f()\" - let _8 := staticcall(gas(), /** @src 0:410:414 \"this\" */ address(), /** @src 0:410:418 \"this.f()\" */ _7, /** @src 1:91:166 \"contract D is C(3)...\" */ 4, /** @src 0:410:418 \"this.f()\" */ _7, 32) - if iszero(_8) + let _7 := staticcall(gas(), /** @src 0:410:414 \"this\" */ address(), /** @src 0:410:418 \"this.f()\" */ _6, /** @src 1:91:166 \"contract D is C(3)...\" */ 4, /** @src 0:410:418 \"this.f()\" */ _6, 32) + if iszero(_7) { /// @src 1:91:166 \"contract D is C(3)...\" let pos := mload(_2) - returndatacopy(pos, _3, returndatasize()) + returndatacopy(pos, 0, returndatasize()) revert(pos, returndatasize()) } /// @src 0:410:418 \"this.f()\" - let expr := /** @src 1:91:166 \"contract D is C(3)...\" */ _3 + let expr := /** @src 1:91:166 \"contract D is C(3)...\" */ 0 /// @src 0:410:418 \"this.f()\" - if _8 + if _7 { - let _9 := 32 - if gt(_9, returndatasize()) { _9 := returndatasize() } + let _8 := 32 + if gt(_8, returndatasize()) { _8 := returndatasize() } /// @src 1:91:166 \"contract D is C(3)...\" - let newFreePtr := add(_7, and(add(_9, 31), not(31))) - if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _7)) + let newFreePtr := add(_6, and(add(_8, 31), not(31))) + if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _6)) { - mstore(_3, shl(224, 0x4e487b71)) + mstore(expr, shl(224, 0x4e487b71)) mstore(4, 0x41) - revert(_3, 0x24) + revert(expr, 0x24) } mstore(_2, newFreePtr) - if slt(sub(/** @src 0:410:418 \"this.f()\" */ add(_7, _9), /** @src 1:91:166 \"contract D is C(3)...\" */ _7), /** @src 0:410:418 \"this.f()\" */ 32) + if slt(sub(/** @src 0:410:418 \"this.f()\" */ add(_6, _8), /** @src 1:91:166 \"contract D is C(3)...\" */ _6), /** @src 0:410:418 \"this.f()\" */ 32) /// @src 1:91:166 \"contract D is C(3)...\" - { revert(_3, _3) } + { revert(expr, expr) } /// @src 0:410:418 \"this.f()\" - expr := /** @src 1:91:166 \"contract D is C(3)...\" */ mload(_7) + expr := /** @src 1:91:166 \"contract D is C(3)...\" */ mload(_6) } /// @src 0:399:418 \"stateVar + this.f()\" let expr_1 := checked_add_int256(ret, expr) @@ -1587,8 +1585,8 @@ object \"D_72\" { return(memPos_1, /** @src 0:410:418 \"this.f()\" */ 32) } case /** @src 1:91:166 \"contract D is C(3)...\" */ 0xa00b982b { - if callvalue() { revert(_3, _3) } - if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) } + if callvalue() { revert(0, 0) } + if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } let memPos_2 := mload(_2) mstore(memPos_2, /** @src 0:124:126 \"41\" */ 0x29) /// @src 1:91:166 \"contract D is C(3)...\" diff --git a/test/cmdlineTests/viair_subobject_optimization/output b/test/cmdlineTests/viair_subobject_optimization/output index 4d5aa7f70..c9fefe051 100644 --- a/test/cmdlineTests/viair_subobject_optimization/output +++ b/test/cmdlineTests/viair_subobject_optimization/output @@ -110,103 +110,87 @@ sub_0: assembly { dup1 revert tag_1: - 0x00 - dup1 - calldataload - 0xe0 - shr - 0x26121ff0 - eq - tag_3 - jumpi + jumpi(tag_3, eq(0x26121ff0, shr(0xe0, calldataload(0x00)))) 0x00 dup1 revert tag_3: jumpi(tag_7, callvalue) - dup1 - add(calldatasize, not(0x03)) - slt - tag_7 - jumpi + jumpi(tag_7, slt(add(not(0x03), calldatasize), 0x00)) /* "viair_subobject_optimization/input.sol":745:765 type(C).creationCode */ dataSize(sub_0) /* "viair_subobject_optimization/input.sol":669:772 contract D {... */ - swap2 - not(0x1f) swap1 - dup2 + not(0x1f) + dup1 0x3f - dup6 + dup5 add and - dup2 + dup3 add - swap3 - dup2 - dup5 + swap2 + dup1 + dup4 lt 0xffffffffffffffff - dup6 + dup5 gt or tag_9 jumpi + swap3 swap1 - swap2 0x40 - swap4 - dup5 - mstore - /* "viair_subobject_optimization/input.sol":745:765 type(C).creationCode */ - dup5 + swap3 dup4 + mstore + /* "viair_subobject_optimization/input.sol":745:765 type(C).creationCode */ + dup2 + dup5 mstore 0x20 - swap5 + swap2 dataOffset(sub_0) + dup4 dup7 - dup6 add codecopy /* "viair_subobject_optimization/input.sol":669:772 contract D {... */ - dup4 + dup3 mload - swap5 + swap4 + dup3 dup6 - swap3 - dup2 + swap4 dup5 mstore - dup5 + dup2 mload swap2 dup3 - dup2 + dup3 dup7 add mstore - dup2 - swap6 + 0x00 tag_11: dup4 - dup8 + dup2 lt tag_12 jumpi pop pop + 0x00 + dup5 dup4 - swap5 - pop - dup6 - dup3 - 0x1f - swap5 - swap6 add + dup7 add mstore + pop + 0x1f add and dup2 @@ -216,35 +200,30 @@ sub_0: assembly { swap1 return tag_12: - dup7 + dup2 dup2 add - dup3 + dup4 add mload - dup10 dup9 + dup3 add - dup10 + dup9 add mstore - swap6 - dup2 - add - swap6 - dup9 + dup8 swap6 pop + dup3 + add jump(tag_11) tag_9: - shl(0xe0, 0x4e487b71) - dup2 - mstore + mstore(0x00, shl(0xe0, 0x4e487b71)) mstore(0x04, 0x41) - 0x24 - swap1 - revert + revert(0x00, 0x24) tag_7: + 0x00 dup1 revert stop diff --git a/test/cmdlineTests/viair_subobjects/output b/test/cmdlineTests/viair_subobjects/output index 500472f8a..7a6bc8e65 100644 --- a/test/cmdlineTests/viair_subobjects/output +++ b/test/cmdlineTests/viair_subobjects/output @@ -59,31 +59,30 @@ object "D_16" { mstore(64, _1) if iszero(lt(calldatasize(), 4)) { - let _2 := 0 - if eq(0x26121ff0, shr(224, calldataload(_2))) + if eq(0x26121ff0, shr(224, calldataload(0))) { - if callvalue() { revert(_2, _2) } - if slt(add(calldatasize(), not(3)), _2) { revert(_2, _2) } + if callvalue() { revert(0, 0) } + if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } /// @src 0:149:156 "new C()" - let _3 := datasize("C_3") - let _4 := add(_1, _3) - if or(gt(_4, 0xffffffffffffffff), lt(_4, _1)) + let _2 := datasize("C_3") + let _3 := add(_1, _2) + if or(gt(_3, 0xffffffffffffffff), lt(_3, _1)) { /// @src 0:96:165 "contract D {..." - mstore(_2, shl(224, 0x4e487b71)) + mstore(0, shl(224, 0x4e487b71)) mstore(4, 0x41) - revert(_2, 0x24) + revert(0, 0x24) } /// @src 0:149:156 "new C()" - datacopy(_1, dataoffset("C_3"), _3) - if iszero(create(/** @src 0:96:165 "contract D {..." */ _2, /** @src 0:149:156 "new C()" */ _1, sub(_4, _1))) + datacopy(_1, dataoffset("C_3"), _2) + if iszero(create(/** @src 0:96:165 "contract D {..." */ 0, /** @src 0:149:156 "new C()" */ _1, sub(_3, _1))) { /// @src 0:96:165 "contract D {..." let pos := mload(64) - returndatacopy(pos, _2, returndatasize()) + returndatacopy(pos, 0, returndatasize()) revert(pos, returndatasize()) } - return(_2, _2) + return(0, 0) } } revert(0, 0) diff --git a/test/libsolidity/gasTests/abiv2_optimised.sol b/test/libsolidity/gasTests/abiv2_optimised.sol index 2d4100df4..608d1c8ba 100644 --- a/test/libsolidity/gasTests/abiv2_optimised.sol +++ b/test/libsolidity/gasTests/abiv2_optimised.sol @@ -17,9 +17,9 @@ contract C { // optimize-yul: true // ---- // creation: -// codeDepositCost: 640600 -// executionCost: 674 -// totalCost: 641274 +// codeDepositCost: 638600 +// executionCost: 668 +// totalCost: 639268 // external: // a(): 2283 // b(uint256): 4649 diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol index c13f004fb..b4ef43c44 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol @@ -21,6 +21,6 @@ contract C { } // ---- // f() -> 0x20, 0x8, 0x40, 0x3, 0x9, 0xa, 0xb -// gas irOptimized: 203166 +// gas irOptimized: 203149 // gas legacy: 206263 -// gas legacyOptimized: 203151 +// gas legacyOptimized: 203156 diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_calldata_slice.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_calldata_slice.sol index e043853e0..fe38d8078 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_calldata_slice.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_calldata_slice.sol @@ -59,10 +59,10 @@ contract C { // EVMVersion: >homestead // ---- // test_bytes() -> -// gas irOptimized: 361321 +// gas irOptimized: 360827 // gas legacy: 411269 // gas legacyOptimized: 317754 // test_uint256() -> -// gas irOptimized: 509988 +// gas irOptimized: 509533 // gas legacy: 577469 // gas legacyOptimized: 440931 diff --git a/test/libsolidity/semanticTests/abiEncoderV1/struct/struct_storage_ptr.sol b/test/libsolidity/semanticTests/abiEncoderV1/struct/struct_storage_ptr.sol index 575b75907..9edb07a18 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/struct/struct_storage_ptr.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/struct/struct_storage_ptr.sol @@ -24,6 +24,6 @@ contract C { // ---- // library: L // f() -> 8, 7, 1, 2, 7, 12 -// gas irOptimized: 166506 +// gas irOptimized: 166467 // gas legacy: 169283 // gas legacyOptimized: 167248 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_calldata_slice.sol b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_calldata_slice.sol index 8d98179d9..beb283664 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_calldata_slice.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_calldata_slice.sol @@ -60,10 +60,10 @@ contract C { // EVMVersion: >homestead // ---- // test_bytes() -> -// gas irOptimized: 361321 +// gas irOptimized: 360827 // gas legacy: 411269 // gas legacyOptimized: 317754 // test_uint256() -> -// gas irOptimized: 509988 +// gas irOptimized: 509533 // gas legacy: 577469 // gas legacyOptimized: 440931 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol index cdf2d3087..5e50d5e9a 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol @@ -50,6 +50,6 @@ contract C { // f2() -> 0x20, 0xa0, 0x1, 0x60, 0x2, 0x3, "abc" // f3() -> 0x20, 0xa0, 0x1, 0x60, 0x2, 0x3, "abc" // f4() -> 0x20, 0x160, 0x1, 0x80, 0xc0, 0x2, 0x3, "abc", 0x7, 0x40, 0x2, 0x2, 0x3 -// gas irOptimized: 112641 +// gas irOptimized: 112630 // gas legacy: 114794 // gas legacyOptimized: 112572 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 add545896..901e158db 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2_in_function_inherited_in_v1_contract.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2_in_function_inherited_in_v1_contract.sol @@ -30,6 +30,6 @@ contract C is B { } // ---- // test() -> 77 -// gas irOptimized: 119177 +// gas irOptimized: 110731 // gas legacy: 151866 // gas legacyOptimized: 110359 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/calldata_array.sol b/test/libsolidity/semanticTests/abiEncoderV2/calldata_array.sol index 915514754..bd8517a95 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/calldata_array.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/calldata_array.sol @@ -20,6 +20,6 @@ contract C { // f(uint256[][1]): 32, 32, 0 -> true // f(uint256[][1]): 32, 32, 1, 42 -> true // f(uint256[][1]): 32, 32, 8, 421, 422, 423, 424, 425, 426, 427, 428 -> true -// gas irOptimized: 127012 +// gas irOptimized: 126849 // gas legacy: 139800 // gas legacyOptimized: 119092 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/calldata_overlapped_dynamic_arrays.sol b/test/libsolidity/semanticTests/abiEncoderV2/calldata_overlapped_dynamic_arrays.sol index 796488a9f..2af8b8cde 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/calldata_overlapped_dynamic_arrays.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/calldata_overlapped_dynamic_arrays.sol @@ -33,7 +33,7 @@ contract C { // f_which(uint256[],uint256[2],uint256): 0x40, 1, 2, 1, 5, 6 -> 0x20, 0x40, 5, 2 // f_which(uint256[],uint256[2],uint256): 0x40, 1, 2, 1 -> FAILURE // f_storage(uint256[],uint256[2]): 0x20, 1, 2 -> 0x20, 0x60, 0x20, 1, 2 -// gas irOptimized: 111650 +// gas irOptimized: 111639 // gas legacy: 112944 // gas legacyOptimized: 112092 // f_storage(uint256[],uint256[2]): 0x40, 1, 2, 5, 6 -> 0x20, 0x80, 0x20, 2, 5, 6 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/storage_array_encoding.sol b/test/libsolidity/semanticTests/abiEncoderV2/storage_array_encoding.sol index c72ac0075..6685776d0 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/storage_array_encoding.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/storage_array_encoding.sol @@ -18,10 +18,10 @@ contract C { // EVMVersion: >homestead // ---- // h(uint256[2][]): 0x20, 3, 123, 124, 223, 224, 323, 324 -> 32, 256, 0x20, 3, 123, 124, 223, 224, 323, 324 -// gas irOptimized: 180823 +// gas irOptimized: 180808 // gas legacy: 184830 // gas legacyOptimized: 181493 // i(uint256[2][2]): 123, 124, 223, 224 -> 32, 128, 123, 124, 223, 224 -// gas irOptimized: 112459 +// gas irOptimized: 112425 // gas legacy: 115398 // gas legacyOptimized: 112982 diff --git a/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol b/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol index 03084f0a3..c0c2fbfe3 100644 --- a/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol +++ b/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol @@ -8,6 +8,6 @@ contract C { } // ---- // f(bytes): 0x20, 0x80, 0x21, 0x40, 0x7, "abcdefg" -> 0x21, 0x40, 0x7, "abcdefg" -// gas irOptimized: 135693 +// gas irOptimized: 135662 // gas legacy: 137278 -// gas legacyOptimized: 136043 +// gas legacyOptimized: 136048 diff --git a/test/libsolidity/semanticTests/array/array_memory_index_access.sol b/test/libsolidity/semanticTests/array/array_memory_index_access.sol index 116582415..1e75afeff 100644 --- a/test/libsolidity/semanticTests/array/array_memory_index_access.sol +++ b/test/libsolidity/semanticTests/array/array_memory_index_access.sol @@ -26,7 +26,7 @@ contract C { // index(uint256): 10 -> true // index(uint256): 20 -> true // index(uint256): 0xFF -> true -// gas irOptimized: 135073 +// gas irOptimized: 135060 // gas legacy: 241703 // gas legacyOptimized: 151613 // accessIndex(uint256,int256): 10, 1 -> 2 diff --git a/test/libsolidity/semanticTests/array/array_storage_index_access.sol b/test/libsolidity/semanticTests/array/array_storage_index_access.sol index 1b6e461a3..1ea50824f 100644 --- a/test/libsolidity/semanticTests/array/array_storage_index_access.sol +++ b/test/libsolidity/semanticTests/array/array_storage_index_access.sol @@ -16,38 +16,38 @@ contract C { // ---- // test_indices(uint256): 1 -> // test_indices(uint256): 129 -> -// gas irOptimized: 3019936 +// gas irOptimized: 3016570 // gas legacy: 3069098 // gas legacyOptimized: 3013250 // test_indices(uint256): 5 -> -// gas irOptimized: 577789 +// gas irOptimized: 576716 // gas legacy: 574754 // gas legacyOptimized: 572383 // test_indices(uint256): 10 -> -// gas irOptimized: 158291 +// gas irOptimized: 158059 // gas legacy: 162468 // gas legacyOptimized: 158336 // test_indices(uint256): 15 -> -// gas irOptimized: 173296 +// gas irOptimized: 172984 // gas legacy: 179513 // gas legacyOptimized: 173606 // test_indices(uint256): 0xFF -> -// gas irOptimized: 5678606 +// gas irOptimized: 5672104 // gas legacy: 5775928 // gas legacyOptimized: 5666726 // test_indices(uint256): 1000 -> -// gas irOptimized: 18197173 +// gas irOptimized: 18173701 // gas legacy: 18583810 // gas legacyOptimized: 18171248 // test_indices(uint256): 129 -> -// gas irOptimized: 4156312 +// gas irOptimized: 4147676 // gas legacy: 4164468 // gas legacyOptimized: 4122100 // test_indices(uint256): 128 -> -// gas irOptimized: 411289 +// gas irOptimized: 409209 // gas legacy: 463706 // gas legacyOptimized: 418061 // test_indices(uint256): 1 -> -// gas irOptimized: 581362 +// gas irOptimized: 580316 // gas legacy: 576904 // gas legacyOptimized: 575649 diff --git a/test/libsolidity/semanticTests/array/array_storage_index_boundary_test.sol b/test/libsolidity/semanticTests/array/array_storage_index_boundary_test.sol index ffe98ee43..a9e4fd8d3 100644 --- a/test/libsolidity/semanticTests/array/array_storage_index_boundary_test.sol +++ b/test/libsolidity/semanticTests/array/array_storage_index_boundary_test.sol @@ -16,11 +16,11 @@ contract C { // test_boundary_check(uint256,uint256): 1, 1 -> FAILURE, hex"4e487b71", 0x32 // test_boundary_check(uint256,uint256): 10, 10 -> FAILURE, hex"4e487b71", 0x32 // test_boundary_check(uint256,uint256): 256, 256 -> FAILURE, hex"4e487b71", 0x32 -// gas irOptimized: 140383 +// gas irOptimized: 137904 // gas legacy: 133633 // gas legacyOptimized: 114354 // test_boundary_check(uint256,uint256): 256, 255 -> 0 -// gas irOptimized: 142515 +// gas irOptimized: 140039 // gas legacy: 135949 // gas legacyOptimized: 116533 // test_boundary_check(uint256,uint256): 256, 0xFFFF -> FAILURE, hex"4e487b71", 0x32 diff --git a/test/libsolidity/semanticTests/array/array_storage_index_zeroed_test.sol b/test/libsolidity/semanticTests/array/array_storage_index_zeroed_test.sol index 6b3f4643c..836901963 100644 --- a/test/libsolidity/semanticTests/array/array_storage_index_zeroed_test.sol +++ b/test/libsolidity/semanticTests/array/array_storage_index_zeroed_test.sol @@ -52,18 +52,18 @@ contract C { // ---- // test_zeroed_indicies(uint256): 1 -> // test_zeroed_indicies(uint256): 5 -> -// gas irOptimized: 131925 +// gas irOptimized: 131804 // gas legacy: 132804 // gas legacyOptimized: 130649 // test_zeroed_indicies(uint256): 10 -> -// gas irOptimized: 225874 +// gas irOptimized: 225692 // gas legacy: 227786 // gas legacyOptimized: 223830 // test_zeroed_indicies(uint256): 15 -> -// gas irOptimized: 323938 +// gas irOptimized: 323700 // gas legacy: 326902 // gas legacyOptimized: 321206 // test_zeroed_indicies(uint256): 0xFF -> -// gas irOptimized: 5116738 +// gas irOptimized: 5112496 // gas legacy: 5165874 // gas legacyOptimized: 5062182 diff --git a/test/libsolidity/semanticTests/array/array_storage_length_access.sol b/test/libsolidity/semanticTests/array/array_storage_length_access.sol index 6a611cc17..0669a3209 100644 --- a/test/libsolidity/semanticTests/array/array_storage_length_access.sol +++ b/test/libsolidity/semanticTests/array/array_storage_length_access.sol @@ -16,7 +16,7 @@ contract C { // gas legacy: 128571 // gas legacyOptimized: 110143 // set_get_length(uint256): 0xFFF -> 0xFFF -// gas irOptimized: 1220647 +// gas irOptimized: 1209119 // gas legacy: 1689548 // gas legacyOptimized: 1393535 // set_get_length(uint256): 0xFFFFF -> FAILURE # Out-of-gas # diff --git a/test/libsolidity/semanticTests/array/array_storage_push_empty.sol b/test/libsolidity/semanticTests/array/array_storage_push_empty.sol index b59afd039..9949b59ea 100644 --- a/test/libsolidity/semanticTests/array/array_storage_push_empty.sol +++ b/test/libsolidity/semanticTests/array/array_storage_push_empty.sol @@ -12,11 +12,11 @@ contract C { // EVMVersion: >=petersburg // ---- // pushEmpty(uint256): 128 -// gas irOptimized: 406413 +// gas irOptimized: 404095 // gas legacy: 415744 // gas legacyOptimized: 397380 // pushEmpty(uint256): 256 -// gas irOptimized: 693185 +// gas irOptimized: 689843 // gas legacy: 715316 // gas legacyOptimized: 688632 // pushEmpty(uint256): 38869 -> FAILURE # out-of-gas # diff --git a/test/libsolidity/semanticTests/array/array_storage_push_empty_length_address.sol b/test/libsolidity/semanticTests/array/array_storage_push_empty_length_address.sol index 9c3a426fe..4b5b407ea 100644 --- a/test/libsolidity/semanticTests/array/array_storage_push_empty_length_address.sol +++ b/test/libsolidity/semanticTests/array/array_storage_push_empty_length_address.sol @@ -21,11 +21,11 @@ contract C { // gas legacy: 77730 // gas legacyOptimized: 77162 // set_get_length(uint256): 0xFF -> 0xFF -// gas irOptimized: 161440 +// gas irOptimized: 158881 // gas legacy: 696850 // gas legacyOptimized: 134488 // set_get_length(uint256): 0xFFF -> 0xFFF -// gas irOptimized: 1800622 +// gas irOptimized: 1762213 // gas legacy: 9857362 // gas legacyOptimized: 1393660 // set_get_length(uint256): 0xFFFFF -> FAILURE # Out-of-gas # diff --git a/test/libsolidity/semanticTests/array/array_storage_push_pop.sol b/test/libsolidity/semanticTests/array/array_storage_push_pop.sol index 91948540f..5befbe228 100644 --- a/test/libsolidity/semanticTests/array/array_storage_push_pop.sol +++ b/test/libsolidity/semanticTests/array/array_storage_push_pop.sol @@ -17,11 +17,11 @@ contract C { // gas legacy: 105722 // gas legacyOptimized: 103508 // set_get_length(uint256): 0xFF -> 0 -// gas irOptimized: 821106 +// gas irOptimized: 815997 // gas legacy: 808020 // gas legacyOptimized: 784467 // set_get_length(uint256): 0xFFF -> 0 -// gas irOptimized: 12828798 +// gas irOptimized: 12746889 // gas legacy: 12612192 // gas legacyOptimized: 12239199 // set_get_length(uint256): 0xFFFF -> FAILURE # Out-of-gas # diff --git a/test/libsolidity/semanticTests/array/arrays_complex_from_and_to_storage.sol b/test/libsolidity/semanticTests/array/arrays_complex_from_and_to_storage.sol index 05a663c0b..715e8a589 100644 --- a/test/libsolidity/semanticTests/array/arrays_complex_from_and_to_storage.sol +++ b/test/libsolidity/semanticTests/array/arrays_complex_from_and_to_storage.sol @@ -12,7 +12,7 @@ contract Test { } // ---- // set(uint24[3][]): 0x20, 0x06, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12 -> 0x06 -// gas irOptimized: 186537 +// gas irOptimized: 186554 // gas legacy: 211054 // gas legacyOptimized: 206042 // data(uint256,uint256): 0x02, 0x02 -> 0x09 diff --git a/test/libsolidity/semanticTests/array/byte_array_transitional_2.sol b/test/libsolidity/semanticTests/array/byte_array_transitional_2.sol index 554f4361a..92f58bd11 100644 --- a/test/libsolidity/semanticTests/array/byte_array_transitional_2.sol +++ b/test/libsolidity/semanticTests/array/byte_array_transitional_2.sol @@ -17,6 +17,6 @@ contract c { } // ---- // test() -> 0 -// gas irOptimized: 125584 +// gas irOptimized: 125212 // gas legacy: 150372 // gas legacyOptimized: 146391 diff --git a/test/libsolidity/semanticTests/array/bytes_length_member.sol b/test/libsolidity/semanticTests/array/bytes_length_member.sol index 04dcf2d34..750467a21 100644 --- a/test/libsolidity/semanticTests/array/bytes_length_member.sol +++ b/test/libsolidity/semanticTests/array/bytes_length_member.sol @@ -13,7 +13,7 @@ contract c { // ---- // getLength() -> 0 // set(): 1, 2 -> true -// gas irOptimized: 110400 +// gas irOptimized: 110392 // gas legacy: 110952 -// gas legacyOptimized: 110580 +// gas legacyOptimized: 110579 // getLength() -> 68 diff --git a/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol b/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol index fe6f07a40..ca65f0706 100644 --- a/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol +++ b/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol @@ -8,7 +8,7 @@ contract C { } // ---- // constructor(): 1, 2, 3 -> -// gas irOptimized: 140952 +// gas irOptimized: 139656 // gas legacy: 180517 // gas legacyOptimized: 150462 // a(uint256): 0 -> 1 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 3be5ba29f..7d5219878 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_calldata_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_calldata_storage.sol @@ -20,7 +20,7 @@ contract c { } // ---- // store(uint256[9],uint8[3][]): 21, 22, 23, 24, 25, 26, 27, 28, 29, 0x140, 4, 1, 2, 3, 11, 12, 13, 21, 22, 23, 31, 32, 33 -> 32 -// gas irOptimized: 648323 +// gas irOptimized: 648319 // gas legacy: 694356 // gas legacyOptimized: 693864 // retrieve() -> 9, 28, 9, 28, 4, 3, 32 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_cleanup_uint40.sol b/test/libsolidity/semanticTests/array/copying/array_copy_cleanup_uint40.sol index d88aaebcd..a06ee7f89 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_cleanup_uint40.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_cleanup_uint40.sol @@ -46,6 +46,6 @@ contract C { } // ---- // f() -> true -// gas irOptimized: 117369 +// gas irOptimized: 117261 // gas legacy: 124660 // gas legacyOptimized: 122801 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_clear_storage.sol b/test/libsolidity/semanticTests/array/copying/array_copy_clear_storage.sol index ebc6dadbe..0bdcda1d9 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_clear_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_clear_storage.sol @@ -13,6 +13,6 @@ contract C { } // ---- // f() -> 0 -// gas irOptimized: 107488 +// gas irOptimized: 107453 // gas legacy: 108218 // gas legacyOptimized: 107625 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_different_packing.sol b/test/libsolidity/semanticTests/array/copying/array_copy_different_packing.sol index 6f616f4b5..6d83f3758 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_different_packing.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_different_packing.sol @@ -18,6 +18,6 @@ contract c { } // ---- // test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x05000000000000000000000000000000000000000000000000 -// gas irOptimized: 208122 +// gas irOptimized: 208044 // gas legacy: 221769 // gas legacyOptimized: 220611 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 80364f025..d28090277 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_including_array.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_including_array.sol @@ -35,12 +35,12 @@ contract c { } // ---- // test() -> 0x02000202 -// gas irOptimized: 4548245 +// gas irOptimized: 4548150 // gas legacy: 4476222 // gas legacyOptimized: 4448113 // storageEmpty -> 1 // clear() -> 0, 0 -// gas irOptimized: 4475224 +// gas irOptimized: 4475134 // gas legacy: 4408014 // gas legacyOptimized: 4381784 // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_nested_array.sol b/test/libsolidity/semanticTests/array/copying/array_copy_nested_array.sol index 7b5b30b79..4297f11fc 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_nested_array.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_nested_array.sol @@ -12,6 +12,6 @@ contract c { } // ---- // test(uint256[2][]): 32, 3, 7, 8, 9, 10, 11, 12 -> 10 -// gas irOptimized: 689714 +// gas irOptimized: 689666 // gas legacy: 686178 // gas legacyOptimized: 685628 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base.sol index d17e45a2f..911653b37 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base.sol @@ -17,6 +17,6 @@ contract c { } // ---- // test() -> 5, 4 -// gas irOptimized: 205062 +// gas irOptimized: 205045 // gas legacy: 213863 // gas legacyOptimized: 212902 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base_nested.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base_nested.sol index 4ab3d0bd8..f75338bb7 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base_nested.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base_nested.sol @@ -21,6 +21,6 @@ contract c { } // ---- // test() -> 3, 4 -// gas irOptimized: 169602 +// gas irOptimized: 169586 // gas legacy: 175424 // gas legacyOptimized: 172535 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dyn_dyn.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dyn_dyn.sol index 29c845f13..99dd1ca93 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dyn_dyn.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dyn_dyn.sol @@ -15,7 +15,7 @@ contract c { // ---- // setData1(uint256,uint256,uint256): 10, 5, 4 -> // copyStorageStorage() -> -// gas irOptimized: 111366 +// gas irOptimized: 111348 // gas legacy: 109272 // gas legacyOptimized: 109262 // getData2(uint256): 5 -> 10, 4 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dynamic_dynamic.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dynamic_dynamic.sol index fcdcf9c2d..30173409e 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dynamic_dynamic.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dynamic_dynamic.sol @@ -17,6 +17,6 @@ contract c { } // ---- // test() -> 5, 4 -// gas irOptimized: 252986 +// gas irOptimized: 252929 // gas legacy: 250892 // gas legacyOptimized: 250046 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 943a5206e..13cd7ed0c 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_dynamic.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_dynamic.sol @@ -11,6 +11,6 @@ contract c { } // ---- // test() -> 9, 4 -// gas irOptimized: 123142 +// gas irOptimized: 123136 // gas legacy: 123567 // gas legacyOptimized: 123202 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_static.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_static.sol index 3b0a229c9..0d613e5e9 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_static.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_static.sol @@ -14,6 +14,6 @@ contract c { } // ---- // test() -> 8, 0 -// gas irOptimized: 196278 +// gas irOptimized: 196259 // gas legacy: 194843 // gas legacyOptimized: 194281 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_struct.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_struct.sol index 4339c89b5..cfb623393 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_struct.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_struct.sol @@ -17,7 +17,7 @@ contract c { } // ---- // test() -> 4, 5 -// gas irOptimized: 190870 +// gas irOptimized: 190694 // gas legacy: 190852 // gas legacyOptimized: 189658 // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_to_memory_nested.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_to_memory_nested.sol index c9c6e3228..86c76e765 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_to_memory_nested.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_to_memory_nested.sol @@ -15,6 +15,6 @@ contract C { } // ---- // f() -> 0x20, 2, 0x40, 0xa0, 2, 0, 1, 2, 2, 3 -// gas irOptimized: 161715 +// gas irOptimized: 161627 // gas legacy: 162203 -// gas legacyOptimized: 159941 +// gas legacyOptimized: 159934 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 31addad5e..74d2ab909 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover.sol @@ -17,6 +17,6 @@ contract c { } // ---- // test() -> 0xffffffff, 0x0000000000000000000000000a00090008000700060005000400030002000100, 0x0000000000000000000000000000000000000000000000000000000000000000 -// gas irOptimized: 104665 +// gas irOptimized: 104534 // gas legacy: 166874 // gas legacyOptimized: 145474 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_target_simple.sol b/test/libsolidity/semanticTests/array/copying/array_copy_target_simple.sol index 0a306cade..b22905989 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_target_simple.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_target_simple.sol @@ -18,6 +18,6 @@ contract c { } // ---- // test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x0 -// gas irOptimized: 273576 +// gas irOptimized: 273564 // gas legacy: 283666 // gas legacyOptimized: 282023 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_target_simple_2.sol b/test/libsolidity/semanticTests/array/copying/array_copy_target_simple_2.sol index de100d096..ad4c5818b 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_target_simple_2.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_target_simple_2.sol @@ -18,6 +18,6 @@ contract c { } // ---- // test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x00 -// gas irOptimized: 233285 +// gas irOptimized: 233271 // gas legacy: 236523 // gas legacyOptimized: 235592 diff --git a/test/libsolidity/semanticTests/array/copying/array_elements_to_mapping.sol b/test/libsolidity/semanticTests/array/copying/array_elements_to_mapping.sol index 53ca44cdc..b1e8659be 100644 --- a/test/libsolidity/semanticTests/array/copying/array_elements_to_mapping.sol +++ b/test/libsolidity/semanticTests/array/copying/array_elements_to_mapping.sol @@ -52,9 +52,9 @@ contract C { } // ---- // from_storage() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 -// gas irOptimized: 150061 +// gas irOptimized: 150004 // gas legacy: 150745 -// gas legacyOptimized: 148685 +// gas legacyOptimized: 148678 // from_storage_ptr() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 // from_memory() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 // from_calldata(uint8[][]): 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 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 8cc849ecd..ad79a5ec5 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: 180759 +// gas irOptimized: 180716 // test2(uint256[][2]): 0x20, 0x40, 0x40, 2, 23, 42 -> 2, 65 -// gas irOptimized: 157562 +// gas irOptimized: 157544 // test3(uint256[2][]): 0x20, 2, 23, 42, 23, 42 -> 2, 65 -// gas irOptimized: 134637 +// gas irOptimized: 134629 // test4(uint256[2][2]): 23, 42, 23, 42 -> 65 -// gas irOptimized: 111270 +// gas irOptimized: 111252 diff --git a/test/libsolidity/semanticTests/array/copying/array_nested_memory_to_storage.sol b/test/libsolidity/semanticTests/array/copying/array_nested_memory_to_storage.sol index 08e427eea..9bd19d629 100644 --- a/test/libsolidity/semanticTests/array/copying/array_nested_memory_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/array_nested_memory_to_storage.sol @@ -38,12 +38,12 @@ contract Test { } // ---- // test() -> 24 -// gas irOptimized: 226687 +// gas irOptimized: 226661 // gas legacy: 227084 // gas legacyOptimized: 226529 // test1() -> 3 // test2() -> 6 // test3() -> 24 -// gas irOptimized: 141244 +// gas irOptimized: 141223 // gas legacy: 142238 // gas legacyOptimized: 141365 diff --git a/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic.sol b/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic.sol index 9a2ab14cb..01329504d 100644 --- a/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic.sol +++ b/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic.sol @@ -45,7 +45,7 @@ contract C { } // ---- // copyExternalStorageArrayOfFunctionType() -> true -// gas irOptimized: 104606 +// gas irOptimized: 104592 // gas legacy: 108554 // gas legacyOptimized: 102413 // copyInternalArrayOfFunctionType() -> true diff --git a/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic_different_mutability.sol b/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic_different_mutability.sol index dc30e44b6..50756d0b0 100644 --- a/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic_different_mutability.sol +++ b/test/libsolidity/semanticTests/array/copying/array_of_function_external_storage_to_storage_dynamic_different_mutability.sol @@ -48,7 +48,7 @@ contract C { } // ---- // copyExternalStorageArraysOfFunctionType() -> true -// gas irOptimized: 104279 +// gas irOptimized: 104265 // gas legacy: 108295 // gas legacyOptimized: 102146 // copyInternalArrayOfFunctionType() -> true diff --git a/test/libsolidity/semanticTests/array/copying/array_of_struct_calldata_to_storage.sol b/test/libsolidity/semanticTests/array/copying/array_of_struct_calldata_to_storage.sol index ec193d693..b908649a2 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: 119736 +// gas irOptimized: 119691 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 3024f44ad..32deb9e06 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: 118393 +// gas irOptimized: 118360 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 b60a7c3c2..e3998e955 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: 327759 +// gas irOptimized: 327383 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 e175dd87c..de7553c28 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: 181950 +// gas irOptimized: 181912 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 e335d8684..5c44ef16a 100644 --- a/test/libsolidity/semanticTests/array/copying/array_storage_multi_items_per_slot.sol +++ b/test/libsolidity/semanticTests/array/copying/array_storage_multi_items_per_slot.sol @@ -12,6 +12,6 @@ contract C { } // ---- // f() -> 1, 2, 3 -// gas irOptimized: 131932 +// gas irOptimized: 131915 // gas legacy: 134606 // gas legacyOptimized: 131938 diff --git a/test/libsolidity/semanticTests/array/copying/array_to_mapping.sol b/test/libsolidity/semanticTests/array/copying/array_to_mapping.sol index 9fcbbffce..540c6516f 100644 --- a/test/libsolidity/semanticTests/array/copying/array_to_mapping.sol +++ b/test/libsolidity/semanticTests/array/copying/array_to_mapping.sol @@ -37,8 +37,8 @@ contract C { } // ---- // from_storage() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 -// gas irOptimized: 147892 +// gas irOptimized: 147868 // gas legacy: 148896 -// gas legacyOptimized: 146908 +// gas legacyOptimized: 146901 // from_storage_ptr() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 // from_memory() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 diff --git a/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol b/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol index 523a0ebeb..c20d536e2 100644 --- a/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol +++ b/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol @@ -5,11 +5,11 @@ contract c { } // ---- // set(uint256): 1, 2 -> true -// gas irOptimized: 110574 +// gas irOptimized: 110558 // gas legacy: 111312 // gas legacyOptimized: 110744 // set(uint256): 2, 2, 3, 4, 5 -> true -// gas irOptimized: 177525 +// gas irOptimized: 177509 // gas legacy: 178314 // gas legacyOptimized: 177719 // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/array/copying/bytes_storage_to_storage.sol b/test/libsolidity/semanticTests/array/copying/bytes_storage_to_storage.sol index 9448970b7..5b96afb03 100644 --- a/test/libsolidity/semanticTests/array/copying/bytes_storage_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/bytes_storage_to_storage.sol @@ -17,25 +17,25 @@ contract c { // ---- // f(uint256): 0 -> 0x20, 0x00 // f(uint256): 31 -> 0x20, 0x1f, 0x0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e00 -// gas irOptimized: 109255 +// gas irOptimized: 109794 // gas legacy: 123948 // gas legacyOptimized: 118948 // f(uint256): 32 -> 0x20, 0x20, 1780731860627700044960722568376592200742329637303199754547598369979440671 -// gas irOptimized: 123936 +// gas irOptimized: 124047 // gas legacy: 140362 // gas legacyOptimized: 135386 // f(uint256): 33 -> 0x20, 33, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x2000000000000000000000000000000000000000000000000000000000000000 -// gas irOptimized: 130543 +// gas irOptimized: 130663 // gas legacy: 147916 -// gas legacyOptimized: 142290 +// gas legacyOptimized: 142278 // f(uint256): 63 -> 0x20, 0x3f, 1780731860627700044960722568376592200742329637303199754547598369979440671, 14532552714582660066924456880521368950258152170031413196862950297402215316992 -// gas irOptimized: 139333 +// gas irOptimized: 139543 // gas legacy: 171136 -// gas legacyOptimized: 161550 +// gas legacyOptimized: 161538 // f(uint256): 12 -> 0x20, 0x0c, 0x0102030405060708090a0b0000000000000000000000000000000000000000 // gas legacy: 59345 // gas legacyOptimized: 57279 // f(uint256): 129 -> 0x20, 0x81, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f, 29063324697304692433803953038474361308315562010425523193971352996434451193439, 0x606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f, -57896044618658097711785492504343953926634992332820282019728792003956564819968 -// gas irOptimized: 441985 +// gas irOptimized: 442419 // gas legacy: 505021 // gas legacyOptimized: 486997 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 3f629686f..2dfde7afa 100644 --- a/test/libsolidity/semanticTests/array/copying/calldata_array_dynamic_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/calldata_array_dynamic_to_storage.sol @@ -9,6 +9,6 @@ contract C { } // ---- // f(uint256[]): 0x20, 0x03, 0x1, 0x2, 0x3 -> 0x1 -// gas irOptimized: 110970 +// gas irOptimized: 110962 // gas legacy: 111551 // gas legacyOptimized: 111339 diff --git a/test/libsolidity/semanticTests/array/copying/calldata_array_to_mapping.sol b/test/libsolidity/semanticTests/array/copying/calldata_array_to_mapping.sol index 26f3d587f..64b8cd930 100644 --- a/test/libsolidity/semanticTests/array/copying/calldata_array_to_mapping.sol +++ b/test/libsolidity/semanticTests/array/copying/calldata_array_to_mapping.sol @@ -14,4 +14,4 @@ contract C { // compileViaYul: true // ---- // from_calldata(uint8[][]): 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 -// gas irOptimized: 139905 +// gas irOptimized: 139685 diff --git a/test/libsolidity/semanticTests/array/copying/cleanup_during_multi_element_per_slot_copy.sol b/test/libsolidity/semanticTests/array/copying/cleanup_during_multi_element_per_slot_copy.sol index 9a111e2bc..d2361dac5 100644 --- a/test/libsolidity/semanticTests/array/copying/cleanup_during_multi_element_per_slot_copy.sol +++ b/test/libsolidity/semanticTests/array/copying/cleanup_during_multi_element_per_slot_copy.sol @@ -16,7 +16,7 @@ contract C { } // ---- // constructor() -// gas irOptimized: 234419 +// gas irOptimized: 226349 // gas legacy: 215757 // gas legacyOptimized: 181760 // f() -> 0 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 edb657ad9..cc2344cea 100644 --- a/test/libsolidity/semanticTests/array/copying/copy_byte_array_in_struct_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/copy_byte_array_in_struct_to_storage.sol @@ -35,12 +35,12 @@ contract C { } // ---- // f() -> 0x40, 0x80, 6, 0x6162636465660000000000000000000000000000000000000000000000000000, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000 -// gas irOptimized: 179752 +// gas irOptimized: 179737 // gas legacy: 181001 -// gas legacyOptimized: 180014 +// gas legacyOptimized: 180018 // g() -> 0x40, 0xc0, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000, 0x11, 0x3132333435363738393233343536373839000000000000000000000000000000 -// gas irOptimized: 106682 +// gas irOptimized: 106666 // gas legacy: 109720 -// gas legacyOptimized: 106937 +// gas legacyOptimized: 106932 // h() -> 0x40, 0x60, 0x00, 0x00 // storageEmpty -> 1 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 61d5ccf86..d4599cdb7 100644 --- a/test/libsolidity/semanticTests/array/copying/copy_byte_array_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/copy_byte_array_to_storage.sol @@ -46,6 +46,6 @@ contract C { } // ---- // f() -> 0xff -// gas irOptimized: 143426 +// gas irOptimized: 143412 // gas legacy: 153395 -// gas legacyOptimized: 146722 +// gas legacyOptimized: 146720 diff --git a/test/libsolidity/semanticTests/array/copying/copy_function_internal_storage_array.sol b/test/libsolidity/semanticTests/array/copying/copy_function_internal_storage_array.sol index 18795ff79..850803c13 100644 --- a/test/libsolidity/semanticTests/array/copying/copy_function_internal_storage_array.sol +++ b/test/libsolidity/semanticTests/array/copying/copy_function_internal_storage_array.sol @@ -15,6 +15,6 @@ contract C { } // ---- // test() -> 7 -// gas irOptimized: 122477 +// gas irOptimized: 122454 // gas legacy: 205176 // gas legacyOptimized: 204971 diff --git a/test/libsolidity/semanticTests/array/copying/copy_removes_bytes_data.sol b/test/libsolidity/semanticTests/array/copying/copy_removes_bytes_data.sol index 58fc1c13d..752dd6494 100644 --- a/test/libsolidity/semanticTests/array/copying/copy_removes_bytes_data.sol +++ b/test/libsolidity/semanticTests/array/copying/copy_removes_bytes_data.sol @@ -7,9 +7,9 @@ contract c { } // ---- // set(): 1, 2, 3, 4, 5 -> true -// gas irOptimized: 177383 +// gas irOptimized: 177375 // gas legacy: 177954 -// gas legacyOptimized: 177554 +// gas legacyOptimized: 177553 // storageEmpty -> 0 // reset() -> true // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/copying/copying_bytes_multiassign.sol b/test/libsolidity/semanticTests/array/copying/copying_bytes_multiassign.sol index 8277df30a..4bf021094 100644 --- a/test/libsolidity/semanticTests/array/copying/copying_bytes_multiassign.sol +++ b/test/libsolidity/semanticTests/array/copying/copying_bytes_multiassign.sol @@ -18,9 +18,9 @@ contract sender { } // ---- // (): 7 -> -// gas irOptimized: 110820 +// gas irOptimized: 110831 // gas legacy: 111388 -// gas legacyOptimized: 111071 +// gas legacyOptimized: 111070 // val() -> 0 // forward(bool): true -> true // val() -> 0x80 diff --git a/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_calldata_to_storage.sol b/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_calldata_to_storage.sol index eb0eb108f..1214a73db 100644 --- a/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_calldata_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_calldata_to_storage.sol @@ -31,8 +31,8 @@ contract C { // compileViaYul: true // ---- // test1((uint8[],uint8[2])[][][]): 0x20, 1, 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -> 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -// gas irOptimized: 327821 +// gas irOptimized: 327844 // test2((uint8[],uint8[2])[][1][]): 0x20, 2, 0x40, 0x0160, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13, 0x20, 1, 0x20, 0x60, 31, 37, 2, 23, 29 -> 0x20, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13 -// gas irOptimized: 140867 +// gas irOptimized: 140870 // test3((uint8[],uint8[2])[1][][2]): 0x20, 0x40, 0x60, 0, 2, 0x40, 288, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -> 0x20, 2, 0x40, 288, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -// gas irOptimized: 188473 +// gas irOptimized: 188515 diff --git a/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_memory_to_storage.sol b/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_memory_to_storage.sol index 9dbc64f73..b3eda2122 100644 --- a/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_memory_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_memory_to_storage.sol @@ -31,8 +31,8 @@ contract C { // compileViaYul: true // ---- // test1((uint8[],uint8[2])[][][]): 0x20, 1, 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -> 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -// gas irOptimized: 332527 +// gas irOptimized: 332687 // test2((uint8[],uint8[2])[][1][]): 0x20, 2, 0x40, 0x0160, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13, 0x20, 1, 0x20, 0x60, 31, 37, 2, 23, 29 -> 0x20, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13 -// gas irOptimized: 145155 +// gas irOptimized: 145161 // test3((uint8[],uint8[2])[1][][2]): 0x20, 0x40, 0x60, 0, 2, 0x40, 288, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -> 0x20, 2, 0x40, 288, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -// gas irOptimized: 192476 +// gas irOptimized: 192608 diff --git a/test/libsolidity/semanticTests/array/copying/function_type_array_to_storage.sol b/test/libsolidity/semanticTests/array/copying/function_type_array_to_storage.sol index 68db47519..53455e9eb 100644 --- a/test/libsolidity/semanticTests/array/copying/function_type_array_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/function_type_array_to_storage.sol @@ -46,7 +46,7 @@ contract C { } // ---- // test() -> 0x20, 0x14, "[a called][b called]" -// gas irOptimized: 116638 +// gas irOptimized: 116631 // gas legacy: 118936 // gas legacyOptimized: 116975 // test2() -> 0x20, 0x14, "[b called][a called]" 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 074ca934f..f659c28d6 100644 --- a/test/libsolidity/semanticTests/array/copying/memory_dyn_2d_bytes_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/memory_dyn_2d_bytes_to_storage.sol @@ -18,6 +18,6 @@ contract C { } // ---- // f() -> 3 -// gas irOptimized: 128116 +// gas irOptimized: 128273 // gas legacy: 130584 -// gas legacyOptimized: 129031 +// gas legacyOptimized: 129028 diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_element_storage_to_storage.sol b/test/libsolidity/semanticTests/array/copying/nested_array_element_storage_to_storage.sol index c962d815f..ad8cbbb2a 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_element_storage_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_element_storage_to_storage.sol @@ -70,15 +70,15 @@ contract C { } // ---- // test1() -> -// gas irOptimized: 150508 +// gas irOptimized: 150460 // gas legacy: 150949 // gas legacyOptimized: 150906 // test2() -> FAILURE -// gas irOptimized: 150385 +// gas irOptimized: 150378 // gas legacy: 150673 // gas legacyOptimized: 150576 // test3() -> -// gas irOptimized: 123776 +// gas irOptimized: 123762 // gas legacy: 125333 // gas legacyOptimized: 125127 // test4() -> FAILURE diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_calldata_to_storage.sol b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_calldata_to_storage.sol index fe60365e4..52dcb2565 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_calldata_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_calldata_to_storage.sol @@ -29,8 +29,8 @@ contract C { // compileViaYul: true // ---- // test1((uint8[],uint8[2])[][]): 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -> 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -// gas irOptimized: 304714 +// gas irOptimized: 304751 // test2((uint8[],uint8[2])[][1]): 0x20, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13 -> 0x20, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13 -// gas irOptimized: 116454 +// gas irOptimized: 116449 // test3((uint8[],uint8[2])[1][]): 0x20, 2, 0x40, 0x0120, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -> 0x20, 2, 0x40, 0x0120, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -// gas irOptimized: 187962 +// gas irOptimized: 188004 diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_memory_to_storage.sol b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_memory_to_storage.sol index ccf2f2a20..48513d001 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_memory_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_memory_to_storage.sol @@ -29,8 +29,8 @@ contract C { // compileViaYul: true // ---- // test1((uint8[],uint8[2])[][]): 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -> 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -// gas irOptimized: 309068 +// gas irOptimized: 309071 // test2((uint8[],uint8[2])[][1]): 0x20, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13 -> 0x20, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13 -// gas irOptimized: 118167 +// gas irOptimized: 118264 // test3((uint8[],uint8[2])[1][]): 0x20, 2, 0x40, 0x0120, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -> 0x20, 2, 0x40, 0x0120, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -// gas irOptimized: 190961 +// gas irOptimized: 191003 diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_storage_to_storage.sol b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_storage_to_storage.sol index fb06b3188..be2e2447e 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_storage_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_storage_to_storage.sol @@ -63,7 +63,7 @@ contract C { // compileViaYul: true // ---- // test1() -// gas irOptimized: 123237 +// gas irOptimized: 123202 // test2() -// gas irOptimized: 123043 +// gas irOptimized: 123030 // test3() diff --git a/test/libsolidity/semanticTests/array/copying/nested_dynamic_array_element_calldata_to_storage.sol b/test/libsolidity/semanticTests/array/copying/nested_dynamic_array_element_calldata_to_storage.sol index 6e44ed268..c32f7bf6b 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_dynamic_array_element_calldata_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_dynamic_array_element_calldata_to_storage.sol @@ -30,7 +30,7 @@ contract C { // compileViaYul: true // ---- // test(uint8[][][]): 0x20, 2, 0x40, 0x60, 0, 2, 0x40, 0x80, 1, 7, 2, 8, 9 -// gas irOptimized: 138054 +// gas irOptimized: 138040 // test2(uint8[][]): 0x20, 2, 0x40, 0x80, 1, 7, 2, 8, 9 -// gas irOptimized: 164232 +// gas irOptimized: 164248 // gas legacyOptimized: 120228 diff --git a/test/libsolidity/semanticTests/array/copying/storage_memory_nested.sol b/test/libsolidity/semanticTests/array/copying/storage_memory_nested.sol index f7a863b46..f6079f1a8 100644 --- a/test/libsolidity/semanticTests/array/copying/storage_memory_nested.sol +++ b/test/libsolidity/semanticTests/array/copying/storage_memory_nested.sol @@ -17,6 +17,6 @@ contract C { } // ---- // f() -> 1, 2, 3, 4, 5, 6, 7 -// gas irOptimized: 205974 +// gas irOptimized: 205881 // gas legacy: 212237 // gas legacyOptimized: 211425 diff --git a/test/libsolidity/semanticTests/array/copying/storage_memory_nested_bytes.sol b/test/libsolidity/semanticTests/array/copying/storage_memory_nested_bytes.sol index 2a7863015..5bbff52fb 100644 --- a/test/libsolidity/semanticTests/array/copying/storage_memory_nested_bytes.sol +++ b/test/libsolidity/semanticTests/array/copying/storage_memory_nested_bytes.sol @@ -11,6 +11,6 @@ contract C { } // ---- // f() -> 0x20, 0x02, 0x40, 0x80, 3, 0x6162630000000000000000000000000000000000000000000000000000000000, 0x99, 44048183304486788312148433451363384677562265908331949128489393215789685032262, 32241931068525137014058842823026578386641954854143559838526554899205067598957, 49951309422467613961193228765530489307475214998374779756599339590522149884499, 0x54555658595a6162636465666768696a6b6c6d6e6f707172737475767778797a, 0x4142434445464748494a4b4c4d4e4f5051525354555658595a00000000000000 -// gas irOptimized: 202805 +// gas irOptimized: 202738 // gas legacy: 204798 -// gas legacyOptimized: 203368 +// gas legacyOptimized: 203357 diff --git a/test/libsolidity/semanticTests/array/copying/storage_memory_nested_from_pointer.sol b/test/libsolidity/semanticTests/array/copying/storage_memory_nested_from_pointer.sol index 0f3f7783d..ce4e31769 100644 --- a/test/libsolidity/semanticTests/array/copying/storage_memory_nested_from_pointer.sol +++ b/test/libsolidity/semanticTests/array/copying/storage_memory_nested_from_pointer.sol @@ -18,6 +18,6 @@ contract C { } // ---- // f() -> 1, 2, 3, 4, 5, 6, 7 -// gas irOptimized: 205974 +// gas irOptimized: 205881 // gas legacy: 212242 // gas legacyOptimized: 211430 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 b40bfaced..cfbf5c874 100644 --- a/test/libsolidity/semanticTests/array/copying/storage_memory_nested_struct.sol +++ b/test/libsolidity/semanticTests/array/copying/storage_memory_nested_struct.sol @@ -24,6 +24,6 @@ contract C { } // ---- // f() -> 11, 0x0c, 1, 0x15, 22, 4 -// gas irOptimized: 291155 +// gas irOptimized: 291047 // gas legacy: 293407 // gas legacyOptimized: 290218 diff --git a/test/libsolidity/semanticTests/array/copying/storage_memory_packed_dyn.sol b/test/libsolidity/semanticTests/array/copying/storage_memory_packed_dyn.sol index 341a4c9d9..bfda8d7af 100644 --- a/test/libsolidity/semanticTests/array/copying/storage_memory_packed_dyn.sol +++ b/test/libsolidity/semanticTests/array/copying/storage_memory_packed_dyn.sol @@ -13,6 +13,6 @@ contract C { } // ---- // f() -> 2, 3, 4 -// gas irOptimized: 109804 +// gas irOptimized: 109698 // gas legacy: 126129 // gas legacyOptimized: 120622 diff --git a/test/libsolidity/semanticTests/array/create_memory_array.sol b/test/libsolidity/semanticTests/array/create_memory_array.sol index 0d099815b..ecfecb9c0 100644 --- a/test/libsolidity/semanticTests/array/create_memory_array.sol +++ b/test/libsolidity/semanticTests/array/create_memory_array.sol @@ -18,6 +18,6 @@ contract C { } // ---- // f() -> "A", 8, 4, "B" -// gas irOptimized: 125827 +// gas irOptimized: 125819 // gas legacy: 121382 // gas legacyOptimized: 115488 diff --git a/test/libsolidity/semanticTests/array/delete/bytes_delete_element.sol b/test/libsolidity/semanticTests/array/delete/bytes_delete_element.sol index a653db837..583f6af17 100644 --- a/test/libsolidity/semanticTests/array/delete/bytes_delete_element.sol +++ b/test/libsolidity/semanticTests/array/delete/bytes_delete_element.sol @@ -16,6 +16,6 @@ contract c { } // ---- // test1() -> true -// gas irOptimized: 206322 +// gas irOptimized: 206086 // gas legacy: 254056 -// gas legacyOptimized: 246887 +// gas legacyOptimized: 246892 diff --git a/test/libsolidity/semanticTests/array/dynamic_array_cleanup.sol b/test/libsolidity/semanticTests/array/dynamic_array_cleanup.sol index 13d510f80..a04ea013a 100644 --- a/test/libsolidity/semanticTests/array/dynamic_array_cleanup.sol +++ b/test/libsolidity/semanticTests/array/dynamic_array_cleanup.sol @@ -14,7 +14,7 @@ contract c { // ---- // storageEmpty -> 1 // fill() -> -// gas irOptimized: 519276 +// gas irOptimized: 519266 // gas legacy: 521414 // gas legacyOptimized: 516983 // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol b/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol index bce78baa4..2f6769a24 100644 --- a/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol +++ b/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol @@ -41,7 +41,7 @@ contract c { // ---- // getLengths() -> 0, 0 // setLengths(uint256,uint256): 48, 49 -> -// gas irOptimized: 111301 +// gas irOptimized: 110797 // gas legacy: 108273 // gas legacyOptimized: 100269 // 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 4c5f64695..7621d05bd 100644 --- a/test/libsolidity/semanticTests/array/dynamic_multi_array_cleanup.sol +++ b/test/libsolidity/semanticTests/array/dynamic_multi_array_cleanup.sol @@ -16,7 +16,7 @@ contract c { // ---- // storageEmpty -> 1 // fill() -> 8 -// gas irOptimized: 122916 +// gas irOptimized: 122742 // gas legacy: 121602 // gas legacyOptimized: 120589 // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol b/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol index 337946a20..a354cf804 100644 --- a/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol +++ b/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol @@ -10,7 +10,7 @@ contract c { // ---- // storageEmpty -> 1 // fill() -> -// gas irOptimized: 465324 +// gas irOptimized: 465314 // gas legacy: 471178 // gas legacyOptimized: 467478 // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol b/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol index 9d8dc0bc7..79c0f8fbf 100644 --- a/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol +++ b/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol @@ -18,6 +18,6 @@ contract B { } // ---- // f() -> 2, 3, 4, 5, 6, 1000, 1001, 1002, 1003, 1004 -// gas irOptimized: 115828 +// gas irOptimized: 114204 // gas legacy: 230001 // gas legacyOptimized: 130637 diff --git a/test/libsolidity/semanticTests/array/fixed_arrays_in_constructors.sol b/test/libsolidity/semanticTests/array/fixed_arrays_in_constructors.sol index 71fec7bda..ac11d779a 100644 --- a/test/libsolidity/semanticTests/array/fixed_arrays_in_constructors.sol +++ b/test/libsolidity/semanticTests/array/fixed_arrays_in_constructors.sol @@ -9,7 +9,7 @@ contract Creator { } // ---- // constructor(): 1, 2, 3, 4 -> -// gas irOptimized: 127659 +// gas irOptimized: 126363 // gas legacy: 174186 // gas legacyOptimized: 128709 // r() -> 4 diff --git a/test/libsolidity/semanticTests/array/function_array_cross_calls.sol b/test/libsolidity/semanticTests/array/function_array_cross_calls.sol index 7e29d82a8..a2bc2ff90 100644 --- a/test/libsolidity/semanticTests/array/function_array_cross_calls.sol +++ b/test/libsolidity/semanticTests/array/function_array_cross_calls.sol @@ -42,6 +42,6 @@ contract C { } // ---- // test() -> 5, 6, 7 -// gas irOptimized: 260895 +// gas irOptimized: 256074 // gas legacy: 441556 // gas legacyOptimized: 279321 diff --git a/test/libsolidity/semanticTests/array/invalid_encoding_for_storage_byte_array.sol b/test/libsolidity/semanticTests/array/invalid_encoding_for_storage_byte_array.sol index 815c1768c..4d8422ecd 100644 --- a/test/libsolidity/semanticTests/array/invalid_encoding_for_storage_byte_array.sol +++ b/test/libsolidity/semanticTests/array/invalid_encoding_for_storage_byte_array.sol @@ -40,7 +40,7 @@ contract C { // copyFromStorageShort() // x() -> 0x20, 3, 0x6162630000000000000000000000000000000000000000000000000000000000 // copyFromStorageLong() -// gas irOptimized: 121123 +// gas irOptimized: 121104 // gas legacy: 121904 // gas legacyOptimized: 121400 // x() -> 0x20, 0x25, 0x3132333435363738393031323334353637383930313233343536373839303132, 0x3334353637000000000000000000000000000000000000000000000000000000 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 7f80f1bd0..a08d27ac0 100644 --- a/test/libsolidity/semanticTests/array/pop/array_pop_array_transition.sol +++ b/test/libsolidity/semanticTests/array/pop/array_pop_array_transition.sol @@ -23,7 +23,7 @@ contract c { } // ---- // test() -> 1, 2, 3 -// gas irOptimized: 1828169 +// gas irOptimized: 1827730 // gas legacy: 1822466 // gas legacyOptimized: 1813404 // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/pop/array_pop_uint16_transition.sol b/test/libsolidity/semanticTests/array/pop/array_pop_uint16_transition.sol index 6a657032b..93e1512bc 100644 --- a/test/libsolidity/semanticTests/array/pop/array_pop_uint16_transition.sol +++ b/test/libsolidity/semanticTests/array/pop/array_pop_uint16_transition.sol @@ -18,7 +18,7 @@ contract c { } // ---- // test() -> 38, 28, 18 -// gas irOptimized: 148168 +// gas irOptimized: 148087 // gas legacy: 151184 // gas legacyOptimized: 142418 // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/pop/array_pop_uint24_transition.sol b/test/libsolidity/semanticTests/array/pop/array_pop_uint24_transition.sol index 1a74ea972..c28e1b91c 100644 --- a/test/libsolidity/semanticTests/array/pop/array_pop_uint24_transition.sol +++ b/test/libsolidity/semanticTests/array/pop/array_pop_uint24_transition.sol @@ -18,7 +18,7 @@ contract c { } // ---- // test() -> 20, 10 -// gas irOptimized: 125933 +// gas irOptimized: 126072 // gas legacy: 127216 // gas legacyOptimized: 122224 // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty.sol b/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty.sol index 95a2b012c..68e52a195 100644 --- a/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty.sol +++ b/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty.sol @@ -16,7 +16,7 @@ contract c { } // ---- // test() -> true -// gas irOptimized: 140325 +// gas irOptimized: 140056 // gas legacy: 178397 // gas legacyOptimized: 163832 // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty_garbage_ref.sol b/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty_garbage_ref.sol index f6eb8e127..a014e761e 100644 --- a/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty_garbage_ref.sol +++ b/test/libsolidity/semanticTests/array/pop/byte_array_pop_long_storage_empty_garbage_ref.sol @@ -15,7 +15,7 @@ contract c { } // ---- // test() -> -// gas irOptimized: 113826 +// gas irOptimized: 113782 // gas legacy: 131245 // gas legacyOptimized: 126668 // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/pop/byte_array_pop_masking_long.sol b/test/libsolidity/semanticTests/array/pop/byte_array_pop_masking_long.sol index 623b58739..e4e0b0b0d 100644 --- a/test/libsolidity/semanticTests/array/pop/byte_array_pop_masking_long.sol +++ b/test/libsolidity/semanticTests/array/pop/byte_array_pop_masking_long.sol @@ -9,6 +9,6 @@ contract c { } // ---- // test() -> 0x20, 33, 0x303030303030303030303030303030303030303030303030303030303030303, 0x0300000000000000000000000000000000000000000000000000000000000000 -// gas irOptimized: 108053 +// gas irOptimized: 107969 // gas legacy: 125420 // gas legacyOptimized: 122472 diff --git a/test/libsolidity/semanticTests/array/push/array_push.sol b/test/libsolidity/semanticTests/array/push/array_push.sol index 0dbd7c11b..3e7ceb5a8 100644 --- a/test/libsolidity/semanticTests/array/push/array_push.sol +++ b/test/libsolidity/semanticTests/array/push/array_push.sol @@ -16,6 +16,6 @@ contract c { } // ---- // test() -> 5, 4, 3, 3 -// gas irOptimized: 111401 +// gas irOptimized: 111363 // gas legacy: 111807 // gas legacyOptimized: 111122 diff --git a/test/libsolidity/semanticTests/array/push/array_push_nested_from_calldata.sol b/test/libsolidity/semanticTests/array/push/array_push_nested_from_calldata.sol index 87616f1f5..66af798b9 100644 --- a/test/libsolidity/semanticTests/array/push/array_push_nested_from_calldata.sol +++ b/test/libsolidity/semanticTests/array/push/array_push_nested_from_calldata.sol @@ -12,6 +12,6 @@ contract C { } // ---- // f(uint120[]): 0x20, 3, 1, 2, 3 -> 1 -// gas irOptimized: 112825 +// gas irOptimized: 112813 // gas legacy: 113659 // gas legacyOptimized: 113482 diff --git a/test/libsolidity/semanticTests/array/push/array_push_struct.sol b/test/libsolidity/semanticTests/array/push/array_push_struct.sol index f7918bbb4..bc09edeb5 100644 --- a/test/libsolidity/semanticTests/array/push/array_push_struct.sol +++ b/test/libsolidity/semanticTests/array/push/array_push_struct.sol @@ -20,6 +20,6 @@ contract c { } // ---- // test() -> 2, 3, 4, 5 -// gas irOptimized: 135199 +// gas irOptimized: 135082 // gas legacy: 147443 // gas legacyOptimized: 146434 diff --git a/test/libsolidity/semanticTests/array/push/array_push_struct_from_calldata.sol b/test/libsolidity/semanticTests/array/push/array_push_struct_from_calldata.sol index 91a6a0b37..bce81a868 100644 --- a/test/libsolidity/semanticTests/array/push/array_push_struct_from_calldata.sol +++ b/test/libsolidity/semanticTests/array/push/array_push_struct_from_calldata.sol @@ -16,6 +16,6 @@ contract c { } // ---- // test((uint16,uint16,uint16[3],uint16[])): 0x20, 2, 3, 0, 0, 4, 0xC0, 4, 0, 0, 5, 0, 0 -> 2, 3, 4, 5 -// gas irOptimized: 137087 +// gas irOptimized: 137031 // gas legacy: 142423 // gas legacyOptimized: 137993 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 08cfe58a3..3b49b22d7 100644 --- a/test/libsolidity/semanticTests/array/push/byte_array_push_transition.sol +++ b/test/libsolidity/semanticTests/array/push/byte_array_push_transition.sol @@ -15,6 +15,6 @@ contract c { } // ---- // test() -> 0 -// gas irOptimized: 173252 +// gas irOptimized: 172113 // gas legacy: 215891 // gas legacyOptimized: 203615 diff --git a/test/libsolidity/semanticTests/array/push/nested_bytes_push.sol b/test/libsolidity/semanticTests/array/push/nested_bytes_push.sol index b2fbbc977..a21e1ba21 100644 --- a/test/libsolidity/semanticTests/array/push/nested_bytes_push.sol +++ b/test/libsolidity/semanticTests/array/push/nested_bytes_push.sol @@ -13,6 +13,6 @@ contract C { } // ---- // f() -> -// gas irOptimized: 179165 +// gas irOptimized: 179110 // gas legacy: 181014 -// gas legacyOptimized: 180413 +// gas legacyOptimized: 180422 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 4b5a2b89d..6901e32b8 100644 --- a/test/libsolidity/semanticTests/array/push/push_no_args_2d.sol +++ b/test/libsolidity/semanticTests/array/push/push_no_args_2d.sol @@ -27,14 +27,14 @@ contract C { // ---- // l() -> 0 // f(uint256,uint256): 42, 64 -> -// gas irOptimized: 112290 +// gas irOptimized: 112266 // gas legacy: 107920 // gas legacyOptimized: 101897 // l() -> 1 // ll(uint256): 0 -> 43 // a(uint256,uint256): 0, 42 -> 64 // f(uint256,uint256): 84, 128 -> -// gas irOptimized: 118710 +// gas irOptimized: 118686 // gas legacy: 109972 // gas legacyOptimized: 96331 // l() -> 2 diff --git a/test/libsolidity/semanticTests/array/push/push_no_args_bytes.sol b/test/libsolidity/semanticTests/array/push/push_no_args_bytes.sol index 8ba57af02..6a2b70153 100644 --- a/test/libsolidity/semanticTests/array/push/push_no_args_bytes.sol +++ b/test/libsolidity/semanticTests/array/push/push_no_args_bytes.sol @@ -21,7 +21,7 @@ contract C { // ---- // l() -> 0 // g(uint256): 70 -> -// gas irOptimized: 182362 +// gas irOptimized: 182497 // gas legacy: 183445 // gas legacyOptimized: 178995 // l() -> 70 diff --git a/test/libsolidity/semanticTests/array/reusing_memory.sol b/test/libsolidity/semanticTests/array/reusing_memory.sol index b690fad1d..92b0c06bf 100644 --- a/test/libsolidity/semanticTests/array/reusing_memory.sol +++ b/test/libsolidity/semanticTests/array/reusing_memory.sol @@ -24,6 +24,6 @@ contract Main { } // ---- // f(uint256): 0x34 -> 0x46bddb1178e94d7f2892ff5f366840eb658911794f2c3a44c450aa2c505186c1 -// gas irOptimized: 112161 +// gas irOptimized: 111924 // gas legacy: 125162 // gas legacyOptimized: 113012 diff --git a/test/libsolidity/semanticTests/byte_array_to_storage_cleanup.sol b/test/libsolidity/semanticTests/byte_array_to_storage_cleanup.sol index d76260c9a..c09528d2b 100644 --- a/test/libsolidity/semanticTests/byte_array_to_storage_cleanup.sol +++ b/test/libsolidity/semanticTests/byte_array_to_storage_cleanup.sol @@ -28,9 +28,9 @@ contract C { // compileViaYul: also // ---- // constructor() -> -// gas irOptimized: 442746 +// gas irOptimized: 439080 // gas legacy: 711299 -// gas legacyOptimized: 481080 +// gas legacyOptimized: 481296 // h() -> 0x20, 0x40, 0x00, 0 // ~ emit ev(uint256[],uint256): 0x40, 0x21, 0x02, 0x00, 0x00 // g() -> 0x20, 0x40, 0, 0x00 diff --git a/test/libsolidity/semanticTests/calldata/copy_from_calldata_removes_bytes_data.sol b/test/libsolidity/semanticTests/calldata/copy_from_calldata_removes_bytes_data.sol index 3dd93c12e..c87f6bfcf 100644 --- a/test/libsolidity/semanticTests/calldata/copy_from_calldata_removes_bytes_data.sol +++ b/test/libsolidity/semanticTests/calldata/copy_from_calldata_removes_bytes_data.sol @@ -9,9 +9,9 @@ contract c { // EVMVersion: >=byzantium // ---- // (): 1, 2, 3, 4, 5 -> -// gas irOptimized: 155155 +// gas irOptimized: 155131 // gas legacy: 155473 -// gas legacyOptimized: 155299 +// gas legacyOptimized: 155298 // checkIfDataIsEmpty() -> false // sendMessage() -> true, 0x40, 0 // checkIfDataIsEmpty() -> true diff --git a/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol b/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol index 24c33facb..2bfab4fe6 100644 --- a/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol +++ b/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol @@ -24,6 +24,6 @@ contract Creator { } // ---- // f(uint256,address[]): 7, 0x40, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 -> 7, 8 -// gas irOptimized: 429160 +// gas irOptimized: 424511 // gas legacy: 581443 // gas legacyOptimized: 444588 diff --git a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol index 3df201222..b4d5dd880 100644 --- a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol +++ b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol @@ -24,6 +24,6 @@ contract Creator { } // ---- // f(uint256,bytes): 7, 0x40, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" -> 7, "h" -// gas irOptimized: 278528 +// gas irOptimized: 275287 // gas legacy: 418462 -// gas legacyOptimized: 291755 +// gas legacyOptimized: 291760 diff --git a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol index 99260d2ef..b77793c0f 100644 --- a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol +++ b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol @@ -8,8 +8,8 @@ contract Test { } // ---- // constructor(): 7, 0x40, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" -> -// gas irOptimized: 269441 +// gas irOptimized: 268145 // gas legacy: 311324 -// gas legacyOptimized: 258351 +// gas legacyOptimized: 258388 // m_x() -> 7 // m_s() -> 0x20, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" diff --git a/test/libsolidity/semanticTests/constructor/constructor_arguments_external.sol b/test/libsolidity/semanticTests/constructor/constructor_arguments_external.sol index 4f8ebefea..3037aaa31 100644 --- a/test/libsolidity/semanticTests/constructor/constructor_arguments_external.sol +++ b/test/libsolidity/semanticTests/constructor/constructor_arguments_external.sol @@ -17,7 +17,7 @@ contract Main { } // ---- // constructor(): "abc", true -// gas irOptimized: 105906 +// gas irOptimized: 104394 // gas legacy: 143300 // gas legacyOptimized: 102961 // getFlag() -> true diff --git a/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol b/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol index dd91c86a2..75fa809ed 100644 --- a/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol +++ b/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol @@ -9,7 +9,7 @@ contract C { } // ---- // constructor(): 1, 2, 3, 4 -> -// gas irOptimized: 172314 +// gas irOptimized: 171018 // gas legacy: 218378 // gas legacyOptimized: 176195 // a() -> 1 diff --git a/test/libsolidity/semanticTests/constructor/no_callvalue_check.sol b/test/libsolidity/semanticTests/constructor/no_callvalue_check.sol index 9319d592a..eec01005e 100644 --- a/test/libsolidity/semanticTests/constructor/no_callvalue_check.sol +++ b/test/libsolidity/semanticTests/constructor/no_callvalue_check.sol @@ -17,6 +17,6 @@ contract C { } // ---- // f(), 2000 ether -> true -// gas irOptimized: 119457 +// gas irOptimized: 119441 // gas legacy: 122621 // gas legacyOptimized: 122490 diff --git a/test/libsolidity/semanticTests/constructor_inheritance_init_order.sol b/test/libsolidity/semanticTests/constructor_inheritance_init_order.sol index 00dfef4ab..20cd8760b 100644 --- a/test/libsolidity/semanticTests/constructor_inheritance_init_order.sol +++ b/test/libsolidity/semanticTests/constructor_inheritance_init_order.sol @@ -14,5 +14,5 @@ contract B is A { // compileViaYul: true // ---- // constructor() -> -// gas irOptimized: 120936 +// gas irOptimized: 119640 // y() -> 42 diff --git a/test/libsolidity/semanticTests/constructor_inheritance_init_order_2.sol b/test/libsolidity/semanticTests/constructor_inheritance_init_order_2.sol index 9b982d6e9..820c56a4e 100644 --- a/test/libsolidity/semanticTests/constructor_inheritance_init_order_2.sol +++ b/test/libsolidity/semanticTests/constructor_inheritance_init_order_2.sol @@ -9,7 +9,7 @@ contract B is A { } // ---- // constructor() -> -// gas irOptimized: 120936 +// gas irOptimized: 119640 // gas legacy: 133594 // gas legacyOptimized: 115341 // y() -> 42 diff --git a/test/libsolidity/semanticTests/constructor_with_params.sol b/test/libsolidity/semanticTests/constructor_with_params.sol index 13bdb625b..1916f692f 100644 --- a/test/libsolidity/semanticTests/constructor_with_params.sol +++ b/test/libsolidity/semanticTests/constructor_with_params.sol @@ -9,7 +9,7 @@ contract C { } // ---- // constructor(): 2, 0 -> -// gas irOptimized: 102902 +// gas irOptimized: 101390 // gas legacy: 115678 // i() -> 2 // k() -> 0 diff --git a/test/libsolidity/semanticTests/constructor_with_params_diamond_inheritance.sol b/test/libsolidity/semanticTests/constructor_with_params_diamond_inheritance.sol index fc2dd8f71..b2f66e450 100644 --- a/test/libsolidity/semanticTests/constructor_with_params_diamond_inheritance.sol +++ b/test/libsolidity/semanticTests/constructor_with_params_diamond_inheritance.sol @@ -21,7 +21,7 @@ contract D is B, C { } // ---- // constructor(): 2, 0 -> -// gas irOptimized: 153694 +// gas irOptimized: 151966 // gas legacy: 168623 // gas legacyOptimized: 144577 // i() -> 2 diff --git a/test/libsolidity/semanticTests/constructor_with_params_inheritance.sol b/test/libsolidity/semanticTests/constructor_with_params_inheritance.sol index a0b4c772d..f5b20d981 100644 --- a/test/libsolidity/semanticTests/constructor_with_params_inheritance.sol +++ b/test/libsolidity/semanticTests/constructor_with_params_inheritance.sol @@ -12,7 +12,7 @@ contract D is C { } // ---- // constructor(): 2, 0 -> -// gas irOptimized: 123317 +// gas irOptimized: 121805 // gas legacy: 137193 // gas legacyOptimized: 118548 // i() -> 2 diff --git a/test/libsolidity/semanticTests/events/event_dynamic_array_storage.sol b/test/libsolidity/semanticTests/events/event_dynamic_array_storage.sol index 057496c6d..fec281c59 100644 --- a/test/libsolidity/semanticTests/events/event_dynamic_array_storage.sol +++ b/test/libsolidity/semanticTests/events/event_dynamic_array_storage.sol @@ -13,6 +13,6 @@ contract C { // ---- // createEvent(uint256): 42 -> // ~ emit E(uint256[]): 0x20, 0x03, 0x2a, 0x2b, 0x2c -// gas irOptimized: 113510 +// gas irOptimized: 113485 // gas legacy: 116314 // gas legacyOptimized: 114407 diff --git a/test/libsolidity/semanticTests/events/event_dynamic_array_storage_v2.sol b/test/libsolidity/semanticTests/events/event_dynamic_array_storage_v2.sol index 5c5138742..2b5a7114d 100644 --- a/test/libsolidity/semanticTests/events/event_dynamic_array_storage_v2.sol +++ b/test/libsolidity/semanticTests/events/event_dynamic_array_storage_v2.sol @@ -14,6 +14,6 @@ contract C { // ---- // createEvent(uint256): 42 -> // ~ emit E(uint256[]): 0x20, 0x03, 0x2a, 0x2b, 0x2c -// gas irOptimized: 113510 +// gas irOptimized: 113485 // gas legacy: 116314 // gas legacyOptimized: 114407 diff --git a/test/libsolidity/semanticTests/events/event_dynamic_nested_array_storage_v2.sol b/test/libsolidity/semanticTests/events/event_dynamic_nested_array_storage_v2.sol index 7b9a9400b..d6cfb68be 100644 --- a/test/libsolidity/semanticTests/events/event_dynamic_nested_array_storage_v2.sol +++ b/test/libsolidity/semanticTests/events/event_dynamic_nested_array_storage_v2.sol @@ -15,6 +15,6 @@ contract C { // ---- // createEvent(uint256): 42 -> // ~ emit E(uint256[][]): 0x20, 0x02, 0x40, 0xa0, 0x02, 0x2a, 0x2b, 0x02, 0x2c, 0x2d -// gas irOptimized: 185095 +// gas irOptimized: 185033 // gas legacy: 187495 -// gas legacyOptimized: 184534 +// gas legacyOptimized: 184525 diff --git a/test/libsolidity/semanticTests/events/event_indexed_string.sol b/test/libsolidity/semanticTests/events/event_indexed_string.sol index a6283f274..dfd9dd399 100644 --- a/test/libsolidity/semanticTests/events/event_indexed_string.sol +++ b/test/libsolidity/semanticTests/events/event_indexed_string.sol @@ -17,6 +17,6 @@ contract C { // ---- // deposit() -> // ~ emit E(string,uint256[4]): #0xa7fb06bb999a5eb9aff9e0779953f4e1e4ce58044936c2f51c7fb879b85c08bd, #0xe755d8cc1a8cde16a2a31160dcd8017ac32d7e2f13215b29a23cdae40a78aa81 -// gas irOptimized: 332157 +// gas irOptimized: 330920 // gas legacy: 387608 // gas legacyOptimized: 373772 diff --git a/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol b/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol index f2ee4894f..f9f53275b 100644 --- a/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol +++ b/test/libsolidity/semanticTests/externalContracts/FixedFeeRegistrar.sol @@ -74,7 +74,7 @@ contract FixedFeeRegistrar is Registrar { } // ---- // constructor() -// gas irOptimized: 413501 +// gas irOptimized: 384610 // gas legacy: 913421 // gas legacyOptimized: 476928 // reserve(string), 69 ether: 0x20, 3, "abc" -> diff --git a/test/libsolidity/semanticTests/externalContracts/base64.sol b/test/libsolidity/semanticTests/externalContracts/base64.sol index 328b55ec9..fd7288c8f 100644 --- a/test/libsolidity/semanticTests/externalContracts/base64.sol +++ b/test/libsolidity/semanticTests/externalContracts/base64.sol @@ -33,7 +33,7 @@ contract test { // EVMVersion: >=constantinople // ---- // constructor() -// gas irOptimized: 409367 +// gas irOptimized: 406907 // gas legacy: 737652 // gas legacyOptimized: 526820 // encode_inline_asm(bytes): 0x20, 0 -> 0x20, 0 @@ -51,10 +51,10 @@ contract test { // encode_no_asm(bytes): 0x20, 5, "fooba" -> 0x20, 8, "Zm9vYmE=" // encode_no_asm(bytes): 0x20, 6, "foobar" -> 0x20, 8, "Zm9vYmFy" // encode_inline_asm_large() -// gas irOptimized: 1373038 +// gas irOptimized: 1373025 // gas legacy: 1672031 // gas legacyOptimized: 1199031 // encode_no_asm_large() -// gas irOptimized: 3276098 +// gas irOptimized: 3276081 // gas legacy: 4705075 // gas legacyOptimized: 2890075 diff --git a/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol b/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol index 38bb47759..5e815fad4 100644 --- a/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol +++ b/test/libsolidity/semanticTests/externalContracts/deposit_contract.sol @@ -176,7 +176,7 @@ contract DepositContract is IDepositContract, ERC165 { } // ---- // constructor() -// gas irOptimized: 1415659 +// gas irOptimized: 1391860 // gas legacy: 2391952 // gas legacyOptimized: 1752320 // supportsInterface(bytes4): 0x0 -> 0 @@ -184,27 +184,27 @@ contract DepositContract is IDepositContract, ERC165 { // supportsInterface(bytes4): 0x01ffc9a700000000000000000000000000000000000000000000000000000000 -> true # ERC-165 id # // supportsInterface(bytes4): 0x8564090700000000000000000000000000000000000000000000000000000000 -> true # the deposit interface id # // get_deposit_root() -> 0xd70a234731285c6804c2a4f56711ddb8c82c99740f207854891028af34e27e5e -// gas irOptimized: 117264 +// gas irOptimized: 116864 // gas legacy: 151981 // gas legacyOptimized: 124447 // get_deposit_count() -> 0x20, 8, 0 # TODO: check balance and logs after each deposit # // deposit(bytes,bytes,bytes,bytes32), 32 ether: 0 -> FAILURE # Empty input # // get_deposit_root() -> 0xd70a234731285c6804c2a4f56711ddb8c82c99740f207854891028af34e27e5e -// gas irOptimized: 117264 +// gas irOptimized: 116864 // gas legacy: 151981 // gas legacyOptimized: 124447 // get_deposit_count() -> 0x20, 8, 0 // deposit(bytes,bytes,bytes,bytes32), 1 ether: 0x80, 0xe0, 0x120, 0xaa4a8d0b7d9077248630f1a4701ae9764e42271d7f22b7838778411857fd349e, 0x30, 0x933ad9491b62059dd065b560d256d8957a8c402cc6e8d8ee7290ae11e8f73292, 0x67a8811c397529dac52ae1342ba58c9500000000000000000000000000000000, 0x20, 0x00f50428677c60f997aadeab24aabf7fceaef491c96a52b463ae91f95611cf71, 0x60, 0xa29d01cc8c6296a8150e515b5995390ef841dc18948aa3e79be6d7c1851b4cbb, 0x5d6ff49fa70b9c782399506a22a85193151b9b691245cebafd2063012443c132, 0x4b6c36debaedefb7b2d71b0503ffdc00150aaffd42e63358238ec888901738b8 -> # txhash: 0x7085c586686d666e8bb6e9477a0f0b09565b2060a11f1c4209d3a52295033832 # // ~ emit DepositEvent(bytes,bytes,bytes,bytes,bytes): 0xa0, 0x0100, 0x0140, 0x0180, 0x0200, 0x30, 0x933ad9491b62059dd065b560d256d8957a8c402cc6e8d8ee7290ae11e8f73292, 0x67a8811c397529dac52ae1342ba58c9500000000000000000000000000000000, 0x20, 0xf50428677c60f997aadeab24aabf7fceaef491c96a52b463ae91f95611cf71, 0x08, 0xca9a3b00000000000000000000000000000000000000000000000000000000, 0x60, 0xa29d01cc8c6296a8150e515b5995390ef841dc18948aa3e79be6d7c1851b4cbb, 0x5d6ff49fa70b9c782399506a22a85193151b9b691245cebafd2063012443c132, 0x4b6c36debaedefb7b2d71b0503ffdc00150aaffd42e63358238ec888901738b8, 0x08, 0x00 // get_deposit_root() -> 0x2089653123d9c721215120b6db6738ba273bbc5228ac093b1f983badcdc8a438 -// gas irOptimized: 117249 +// gas irOptimized: 116849 // gas legacy: 151990 // gas legacyOptimized: 124459 // get_deposit_count() -> 0x20, 8, 0x0100000000000000000000000000000000000000000000000000000000000000 // deposit(bytes,bytes,bytes,bytes32), 32 ether: 0x80, 0xe0, 0x120, 0xdbd986dc85ceb382708cf90a3500f500f0a393c5ece76963ac3ed72eccd2c301, 0x30, 0xb2ce0f79f90e7b3a113ca5783c65756f96c4b4673c2b5c1eb4efc22280259441, 0x06d601211e8866dc5b50dc48a244dd7c00000000000000000000000000000000, 0x20, 0x00344b6c73f71b11c56aba0d01b7d8ad83559f209d0a4101a515f6ad54c89771, 0x60, 0x945caaf82d18e78c033927d51f452ebcd76524497b91d7a11219cb3db6a1d369, 0x7595fc095ce489e46b2ef129591f2f6d079be4faaf345a02c5eb133c072e7c56, 0x0c6c3617eee66b4b878165c502357d49485326bc6b31bc96873f308c8f19c09d -> # txhash: 0x404d8e109822ce448e68f45216c12cb051b784d068fbe98317ab8e50c58304ac # // ~ emit DepositEvent(bytes,bytes,bytes,bytes,bytes): 0xa0, 0x0100, 0x0140, 0x0180, 0x0200, 0x30, 0xb2ce0f79f90e7b3a113ca5783c65756f96c4b4673c2b5c1eb4efc22280259441, 0x06d601211e8866dc5b50dc48a244dd7c00000000000000000000000000000000, 0x20, 0x344b6c73f71b11c56aba0d01b7d8ad83559f209d0a4101a515f6ad54c89771, 0x08, 0x40597307000000000000000000000000000000000000000000000000000000, 0x60, 0x945caaf82d18e78c033927d51f452ebcd76524497b91d7a11219cb3db6a1d369, 0x7595fc095ce489e46b2ef129591f2f6d079be4faaf345a02c5eb133c072e7c56, 0x0c6c3617eee66b4b878165c502357d49485326bc6b31bc96873f308c8f19c09d, 0x08, 0x0100000000000000000000000000000000000000000000000000000000000000 // get_deposit_root() -> 0x40255975859377d912c53aa853245ebd939bdd2b33a28e084babdcc1ed8238ee -// gas irOptimized: 117249 +// gas irOptimized: 116849 // gas legacy: 151990 // gas legacyOptimized: 124459 // get_deposit_count() -> 0x20, 8, 0x0200000000000000000000000000000000000000000000000000000000000000 diff --git a/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol b/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol index 7860560f6..8bb2b37c4 100644 --- a/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol +++ b/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol @@ -48,7 +48,7 @@ contract test { } // ---- // constructor() -// gas irOptimized: 1870040 +// gas irOptimized: 1849535 // gas legacy: 2430726 // gas legacyOptimized: 1854979 // div(int256,int256): 3141592653589793238, 88714123 -> 35412542528203691288251815328 diff --git a/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol b/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol index 6cda4f1e9..1e546feab 100644 --- a/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol +++ b/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol @@ -48,7 +48,7 @@ contract test { } // ---- // constructor() -// gas irOptimized: 1731900 +// gas irOptimized: 1723462 // gas legacy: 2210160 // gas legacyOptimized: 1734152 // div(uint256,uint256): 3141592653589793238, 88714123 -> 35412542528203691288251815328 diff --git a/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol b/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol index b3ba44964..19a79f537 100644 --- a/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol +++ b/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol @@ -33,7 +33,7 @@ contract test { } // ---- // constructor() -// gas irOptimized: 424583 +// gas irOptimized: 406643 // gas legacy: 631753 // gas legacyOptimized: 459425 // prb_pi() -> 3141592656369545286 diff --git a/test/libsolidity/semanticTests/externalContracts/snark.sol b/test/libsolidity/semanticTests/externalContracts/snark.sol index 254befe01..e92f95b4a 100644 --- a/test/libsolidity/semanticTests/externalContracts/snark.sol +++ b/test/libsolidity/semanticTests/externalContracts/snark.sol @@ -294,11 +294,11 @@ contract Test { // f() -> true // g() -> true // pair() -> true -// gas irOptimized: 269918 +// gas irOptimized: 269901 // gas legacy: 275678 // gas legacyOptimized: 267193 // verifyTx() -> true // ~ emit Verified(string): 0x20, 0x16, "Successfully verified." -// gas irOptimized: 783371 +// gas irOptimized: 783281 // gas legacy: 804346 // gas legacyOptimized: 772349 diff --git a/test/libsolidity/semanticTests/externalContracts/strings.sol b/test/libsolidity/semanticTests/externalContracts/strings.sol index c2ad61557..c3eba4e0f 100644 --- a/test/libsolidity/semanticTests/externalContracts/strings.sol +++ b/test/libsolidity/semanticTests/externalContracts/strings.sol @@ -49,7 +49,7 @@ contract test { } // ---- // constructor() -// gas irOptimized: 636074 +// gas irOptimized: 632372 // gas legacy: 1065857 // gas legacyOptimized: 725207 // toSlice(string): 0x20, 11, "hello world" -> 11, 0xa0 @@ -69,6 +69,6 @@ contract test { // gas legacy: 31621 // gas legacyOptimized: 27914 // benchmark(string,bytes32): 0x40, 0x0842021, 8, "solidity" -> 0x2020 -// gas irOptimized: 1981693 +// gas irOptimized: 1981664 // gas legacy: 4235651 // gas legacyOptimized: 2319622 diff --git a/test/libsolidity/semanticTests/functionCall/creation_function_call_with_args.sol b/test/libsolidity/semanticTests/functionCall/creation_function_call_with_args.sol index 0fd2efeb9..cbbded9d5 100644 --- a/test/libsolidity/semanticTests/functionCall/creation_function_call_with_args.sol +++ b/test/libsolidity/semanticTests/functionCall/creation_function_call_with_args.sol @@ -15,7 +15,7 @@ contract D { } // ---- // constructor(): 2 -> -// gas irOptimized: 193999 +// gas irOptimized: 193567 // gas legacy: 241234 // gas legacyOptimized: 192961 // f() -> 2 diff --git a/test/libsolidity/semanticTests/functionCall/creation_function_call_with_salt.sol b/test/libsolidity/semanticTests/functionCall/creation_function_call_with_salt.sol index 5952a88e0..e6b4ae90b 100644 --- a/test/libsolidity/semanticTests/functionCall/creation_function_call_with_salt.sol +++ b/test/libsolidity/semanticTests/functionCall/creation_function_call_with_salt.sol @@ -17,7 +17,7 @@ contract D { // EVMVersion: >=constantinople // ---- // constructor(): 2 -> -// gas irOptimized: 194162 +// gas irOptimized: 193730 // gas legacy: 241606 // gas legacyOptimized: 193193 // f() -> 2 diff --git a/test/libsolidity/semanticTests/functionCall/failed_create.sol b/test/libsolidity/semanticTests/functionCall/failed_create.sol index ffe7a7f37..6460794ad 100644 --- a/test/libsolidity/semanticTests/functionCall/failed_create.sol +++ b/test/libsolidity/semanticTests/functionCall/failed_create.sol @@ -17,7 +17,7 @@ contract C { // EVMVersion: >=byzantium // ---- // constructor(), 20 wei -// gas irOptimized: 177446 +// gas irOptimized: 171806 // gas legacy: 285547 // gas legacyOptimized: 168515 // f(uint256): 20 -> 0x137aa4dfc0911524504fcd4d98501f179bc13b4a @@ -25,7 +25,7 @@ contract C { // f(uint256): 20 -> FAILURE // x() -> 1 // stack(uint256): 1023 -> FAILURE -// gas irOptimized: 259624 +// gas irOptimized: 252410 // gas legacy: 477722 // gas legacyOptimized: 299567 // x() -> 1 diff --git a/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol b/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol index 9c73e208e..6ebab90ff 100644 --- a/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol +++ b/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol @@ -38,7 +38,7 @@ contract test { } // ---- // constructor(), 20 wei -> -// gas irOptimized: 260052 +// gas irOptimized: 253950 // gas legacy: 391588 // gas legacyOptimized: 268089 // sendAmount(uint256): 5 -> 5 diff --git a/test/libsolidity/semanticTests/functionCall/gas_and_value_brace_syntax.sol b/test/libsolidity/semanticTests/functionCall/gas_and_value_brace_syntax.sol index 801b22d17..1cb5e0d54 100644 --- a/test/libsolidity/semanticTests/functionCall/gas_and_value_brace_syntax.sol +++ b/test/libsolidity/semanticTests/functionCall/gas_and_value_brace_syntax.sol @@ -37,7 +37,7 @@ contract test { } // ---- // constructor(), 20 wei -> -// gas irOptimized: 260052 +// gas irOptimized: 253950 // gas legacy: 391588 // gas legacyOptimized: 268089 // sendAmount(uint256): 5 -> 5 diff --git a/test/libsolidity/semanticTests/functionCall/mapping_array_internal_argument.sol b/test/libsolidity/semanticTests/functionCall/mapping_array_internal_argument.sol index bb2221f2c..28c1822d7 100644 --- a/test/libsolidity/semanticTests/functionCall/mapping_array_internal_argument.sol +++ b/test/libsolidity/semanticTests/functionCall/mapping_array_internal_argument.sol @@ -18,7 +18,7 @@ contract test { } // ---- // set(uint8,uint8,uint8,uint8,uint8): 1, 21, 22, 42, 43 -> 0, 0, 0, 0 -// gas irOptimized: 111668 +// gas irOptimized: 111628 // gas legacy: 113748 // gas legacyOptimized: 111772 // get(uint8): 1 -> 21, 22, 42, 43 diff --git a/test/libsolidity/semanticTests/immutable/multi_creation.sol b/test/libsolidity/semanticTests/immutable/multi_creation.sol index 8aaf961aa..e03861450 100644 --- a/test/libsolidity/semanticTests/immutable/multi_creation.sol +++ b/test/libsolidity/semanticTests/immutable/multi_creation.sol @@ -27,7 +27,7 @@ contract C { } // ---- // f() -> 3, 7, 5 -// gas irOptimized: 124849 +// gas irOptimized: 124003 // gas legacy: 148528 // gas legacyOptimized: 123971 // x() -> 7 diff --git a/test/libsolidity/semanticTests/immutable/use_scratch.sol b/test/libsolidity/semanticTests/immutable/use_scratch.sol index ff10c13aa..0a5ccf729 100644 --- a/test/libsolidity/semanticTests/immutable/use_scratch.sol +++ b/test/libsolidity/semanticTests/immutable/use_scratch.sol @@ -15,7 +15,7 @@ contract C { } // ---- // constructor(): 3 -> -// gas irOptimized: 124838 +// gas irOptimized: 123542 // gas legacy: 197645 // gas legacyOptimized: 137678 // f() -> 84, 23 diff --git a/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol b/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol index 5390f64db..3866d3be0 100644 --- a/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol +++ b/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol @@ -39,7 +39,7 @@ contract Main { } // ---- // constructor(), 22 wei -> -// gas irOptimized: 266886 +// gas irOptimized: 262320 // gas legacy: 392786 // gas legacyOptimized: 261633 // getFlag() -> true diff --git a/test/libsolidity/semanticTests/isoltestTesting/balance_other_contract.sol b/test/libsolidity/semanticTests/isoltestTesting/balance_other_contract.sol index 39f3c2d0f..306bc3567 100644 --- a/test/libsolidity/semanticTests/isoltestTesting/balance_other_contract.sol +++ b/test/libsolidity/semanticTests/isoltestTesting/balance_other_contract.sol @@ -16,7 +16,7 @@ contract ClientReceipt { } // ---- // constructor(), 2000 wei -> -// gas irOptimized: 171865 +// gas irOptimized: 169915 // gas legacy: 230038 // gas legacyOptimized: 173883 // balance -> 1500 diff --git a/test/libsolidity/semanticTests/libraries/internal_types_in_library.sol b/test/libsolidity/semanticTests/libraries/internal_types_in_library.sol index 169f2e295..8a4356061 100644 --- a/test/libsolidity/semanticTests/libraries/internal_types_in_library.sol +++ b/test/libsolidity/semanticTests/libraries/internal_types_in_library.sol @@ -22,6 +22,6 @@ contract Test { // ---- // library: Lib // f() -> 4, 0x11 -// gas irOptimized: 112209 +// gas irOptimized: 112115 // gas legacy: 135413 // gas legacyOptimized: 119325 diff --git a/test/libsolidity/semanticTests/libraries/using_library_mappings_public.sol b/test/libsolidity/semanticTests/libraries/using_library_mappings_public.sol index b180d52e4..1f06908e2 100644 --- a/test/libsolidity/semanticTests/libraries/using_library_mappings_public.sol +++ b/test/libsolidity/semanticTests/libraries/using_library_mappings_public.sol @@ -19,6 +19,6 @@ contract Test { // ---- // library: Lib // f() -> 1, 0, 0x2a, 0x17, 0, 0x63 -// gas irOptimized: 119654 +// gas irOptimized: 119642 // gas legacy: 124674 // gas legacyOptimized: 119669 diff --git a/test/libsolidity/semanticTests/libraries/using_library_mappings_return.sol b/test/libsolidity/semanticTests/libraries/using_library_mappings_return.sol index d46ed0a56..e26ccacb9 100644 --- a/test/libsolidity/semanticTests/libraries/using_library_mappings_return.sol +++ b/test/libsolidity/semanticTests/libraries/using_library_mappings_return.sol @@ -17,6 +17,6 @@ contract Test { // ---- // library: Lib // f() -> 1, 0, 0x2a, 0x17, 0, 0x63 -// gas irOptimized: 120265 +// gas irOptimized: 120200 // gas legacy: 125109 // gas legacyOptimized: 120128 diff --git a/test/libsolidity/semanticTests/salted_create/salted_create.sol b/test/libsolidity/semanticTests/salted_create/salted_create.sol index 11b74168d..743ff5fd2 100644 --- a/test/libsolidity/semanticTests/salted_create/salted_create.sol +++ b/test/libsolidity/semanticTests/salted_create/salted_create.sol @@ -21,6 +21,6 @@ contract A { // ---- // different_salt() -> true // same_salt() -> true -// gas irOptimized: 98438897 +// gas irOptimized: 98438895 // gas legacy: 98439109 // gas legacyOptimized: 98438967 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 025c8259d..34180fa69 100644 --- a/test/libsolidity/semanticTests/salted_create/salted_create_with_value.sol +++ b/test/libsolidity/semanticTests/salted_create/salted_create_with_value.sol @@ -21,6 +21,6 @@ contract A { // EVMVersion: >=constantinople // ---- // f(), 10 ether -> 3007, 3008, 3009 -// gas irOptimized: 254238 +// gas irOptimized: 253035 // gas legacy: 381063 // gas legacyOptimized: 279694 diff --git a/test/libsolidity/semanticTests/smoke/constructor.sol b/test/libsolidity/semanticTests/smoke/constructor.sol index eb1d73a44..79b92867b 100644 --- a/test/libsolidity/semanticTests/smoke/constructor.sol +++ b/test/libsolidity/semanticTests/smoke/constructor.sol @@ -12,7 +12,7 @@ contract C { } // ---- // constructor(), 2 wei: 3 -> -// gas irOptimized: 106374 +// gas irOptimized: 104412 // gas legacy: 148308 // gas legacyOptimized: 106727 // state() -> 3 diff --git a/test/libsolidity/semanticTests/state/blockhash_basic.sol b/test/libsolidity/semanticTests/state/blockhash_basic.sol index 62138a9b2..01069aa0c 100644 --- a/test/libsolidity/semanticTests/state/blockhash_basic.sol +++ b/test/libsolidity/semanticTests/state/blockhash_basic.sol @@ -12,7 +12,7 @@ contract C { } // ---- // constructor() -// gas irOptimized: 109878 +// gas irOptimized: 108150 // gas legacy: 152179 // gas legacyOptimized: 106750 // genesisHash() -> 0x3737373737373737373737373737373737373737373737373737373737373737 diff --git a/test/libsolidity/semanticTests/storage/empty_nonempty_empty.sol b/test/libsolidity/semanticTests/storage/empty_nonempty_empty.sol index 20755a069..7897144d5 100644 --- a/test/libsolidity/semanticTests/storage/empty_nonempty_empty.sol +++ b/test/libsolidity/semanticTests/storage/empty_nonempty_empty.sol @@ -22,9 +22,9 @@ contract Test { // set(bytes): 0x20, 0 // storageEmpty -> 1 // set(bytes): 0x20, 66, "12345678901234567890123456789012", "12345678901234567890123456789012", "12" -// gas irOptimized: 111895 +// gas irOptimized: 111878 // gas legacy: 112734 -// gas legacyOptimized: 112110 +// gas legacyOptimized: 112115 // storageEmpty -> 0 // set(bytes): 0x20, 3, "abc" // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol b/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol index b1686d907..2c29abc79 100644 --- a/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol +++ b/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol @@ -42,6 +42,6 @@ contract C { } // ---- // test() -> true -// gas irOptimized: 132505 +// gas irOptimized: 132493 // gas legacy: 136009 // gas legacyOptimized: 133478 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 0bcc74b6b..add42a8f3 100644 --- a/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_nested_array_to_storage.sol +++ b/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_nested_array_to_storage.sol @@ -16,6 +16,6 @@ contract C { } // ---- // f(uint32,(uint128,uint256[][2],uint32)): 55, 0x40, 77, 0x60, 88, 0x40, 0x40, 2, 1, 2 -> 55, 77, 1, 2, 88 -// gas irOptimized: 202829 +// gas irOptimized: 202843 // gas legacy: 207384 // gas legacyOptimized: 203584 diff --git a/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol b/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol index 52ad00649..699836179 100644 --- a/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol +++ b/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol @@ -23,6 +23,6 @@ contract CopyTest { } // ---- // run() -> 2, 23, 42 -// gas irOptimized: 193687 +// gas irOptimized: 193677 // gas legacy: 185731 // gas legacyOptimized: 184458 diff --git a/test/libsolidity/semanticTests/structs/copy_from_mapping.sol b/test/libsolidity/semanticTests/structs/copy_from_mapping.sol index df118de32..75898d316 100644 --- a/test/libsolidity/semanticTests/structs/copy_from_mapping.sol +++ b/test/libsolidity/semanticTests/structs/copy_from_mapping.sol @@ -36,8 +36,8 @@ contract C { } // ---- // to_state() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 121497 +// gas irOptimized: 121487 // gas legacy: 123069 -// gas legacyOptimized: 121758 +// gas legacyOptimized: 121759 // to_storage() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 // to_memory() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 diff --git a/test/libsolidity/semanticTests/structs/copy_struct_array_from_storage.sol b/test/libsolidity/semanticTests/structs/copy_struct_array_from_storage.sol index aed54f98b..937eeeaf4 100644 --- a/test/libsolidity/semanticTests/structs/copy_struct_array_from_storage.sol +++ b/test/libsolidity/semanticTests/structs/copy_struct_array_from_storage.sol @@ -87,7 +87,7 @@ contract Test { // EVMVersion: >homestead // ---- // test1() -> true -// gas irOptimized: 152954 +// gas irOptimized: 152882 // gas legacy: 153012 // gas legacyOptimized: 152637 // test2() -> true diff --git a/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol b/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol index 66954a7f5..b6e374f2a 100644 --- a/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol +++ b/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol @@ -44,8 +44,8 @@ contract C { } // ---- // to_state() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 121598 +// gas irOptimized: 121584 // gas legacy: 123208 -// gas legacyOptimized: 121765 +// gas legacyOptimized: 121766 // to_storage() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 // to_memory() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 diff --git a/test/libsolidity/semanticTests/structs/copy_substructures_to_mapping.sol b/test/libsolidity/semanticTests/structs/copy_substructures_to_mapping.sol index 065187cdc..2e1d5cb2d 100644 --- a/test/libsolidity/semanticTests/structs/copy_substructures_to_mapping.sol +++ b/test/libsolidity/semanticTests/structs/copy_substructures_to_mapping.sol @@ -52,14 +52,14 @@ contract C { } // ---- // from_memory() -> 0x20, 0x60, 0xa0, 0x15, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 123029 +// gas irOptimized: 123028 // gas legacy: 130227 -// gas legacyOptimized: 128762 +// gas legacyOptimized: 128761 // from_state() -> 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 121721 +// gas irOptimized: 121703 // gas legacy: 123282 -// gas legacyOptimized: 121870 +// gas legacyOptimized: 121871 // from_calldata((bytes,uint16[],uint16)): 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -> 0x20, 0x60, 0xa0, 0x15, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 115116 +// gas irOptimized: 115113 // gas legacy: 122516 -// gas legacyOptimized: 120806 +// gas legacyOptimized: 120807 diff --git a/test/libsolidity/semanticTests/structs/copy_to_mapping.sol b/test/libsolidity/semanticTests/structs/copy_to_mapping.sol index 5b99efc64..5b55a99b9 100644 --- a/test/libsolidity/semanticTests/structs/copy_to_mapping.sol +++ b/test/libsolidity/semanticTests/structs/copy_to_mapping.sol @@ -45,18 +45,18 @@ contract C { } // ---- // from_state() -> 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 121693 +// gas irOptimized: 121680 // gas legacy: 123144 // gas legacyOptimized: 121811 // from_storage() -> 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 121737 +// gas irOptimized: 121725 // gas legacy: 123193 // gas legacyOptimized: 121863 // from_memory() -> 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 122942 +// gas irOptimized: 122939 // gas legacy: 130088 // gas legacyOptimized: 128757 // from_calldata((bytes,uint16[],uint16)): 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -> 0x20, 0x60, 0xa0, 21, 3, 0x666f6f0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 -// gas irOptimized: 115056 +// gas irOptimized: 115032 // gas legacy: 118301 // gas legacyOptimized: 115435 diff --git a/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol b/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol index 3089f97b5..e5b139d5c 100644 --- a/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol +++ b/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol @@ -66,7 +66,7 @@ contract Test { } // ---- // load() -> 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 -// gas irOptimized: 110326 +// gas irOptimized: 110317 // gas legacy: 112964 // gas legacyOptimized: 110876 // store() -> 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 diff --git a/test/libsolidity/semanticTests/structs/struct_containing_bytes_copy_and_delete.sol b/test/libsolidity/semanticTests/structs/struct_containing_bytes_copy_and_delete.sol index 4a64f0813..c8437300d 100644 --- a/test/libsolidity/semanticTests/structs/struct_containing_bytes_copy_and_delete.sol +++ b/test/libsolidity/semanticTests/structs/struct_containing_bytes_copy_and_delete.sol @@ -23,17 +23,17 @@ contract c { // ---- // storageEmpty -> 1 // set(uint256,bytes,uint256): 12, 0x60, 13, 33, "12345678901234567890123456789012", "3" -> true -// gas irOptimized: 133596 +// gas irOptimized: 133582 // gas legacy: 134628 -// gas legacyOptimized: 133875 +// gas legacyOptimized: 133874 // test(uint256): 32 -> "3" // storageEmpty -> 0 // copy() -> true // storageEmpty -> 1 // set(uint256,bytes,uint256): 12, 0x60, 13, 33, "12345678901234567890123456789012", "3" -> true -// gas irOptimized: 133596 +// gas irOptimized: 133582 // gas legacy: 134628 -// gas legacyOptimized: 133875 +// gas legacyOptimized: 133874 // storageEmpty -> 0 // del() -> true // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/structs/struct_copy.sol b/test/libsolidity/semanticTests/structs/struct_copy.sol index 6da42ebec..a321f0686 100644 --- a/test/libsolidity/semanticTests/structs/struct_copy.sol +++ b/test/libsolidity/semanticTests/structs/struct_copy.sol @@ -35,12 +35,12 @@ contract c { } // ---- // set(uint256): 7 -> true -// gas irOptimized: 109896 +// gas irOptimized: 109893 // gas legacy: 110597 // gas legacyOptimized: 110003 // retrieve(uint256): 7 -> 1, 3, 4, 2 // copy(uint256,uint256): 7, 8 -> true -// gas irOptimized: 118593 +// gas irOptimized: 118582 // gas legacy: 119147 // gas legacyOptimized: 118619 // 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 22d9dd29d..71b40acc8 100644 --- a/test/libsolidity/semanticTests/structs/struct_copy_via_local.sol +++ b/test/libsolidity/semanticTests/structs/struct_copy_via_local.sol @@ -17,6 +17,6 @@ contract c { } // ---- // test() -> true -// gas irOptimized: 109713 +// gas irOptimized: 109706 // gas legacy: 110615 // gas legacyOptimized: 109705 diff --git a/test/libsolidity/semanticTests/structs/struct_delete_storage_with_array.sol b/test/libsolidity/semanticTests/structs/struct_delete_storage_with_array.sol index 7ec85c929..d76618bbc 100644 --- a/test/libsolidity/semanticTests/structs/struct_delete_storage_with_array.sol +++ b/test/libsolidity/semanticTests/structs/struct_delete_storage_with_array.sol @@ -42,10 +42,10 @@ contract C { } // ---- // f() -> -// gas irOptimized: 113232 +// gas irOptimized: 113210 // gas legacy: 113591 // gas legacyOptimized: 113103 // g() -> -// gas irOptimized: 118604 +// gas irOptimized: 118580 // gas legacy: 118764 // gas legacyOptimized: 118172 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 c19875062..9af377469 100644 --- a/test/libsolidity/semanticTests/structs/struct_memory_to_storage_function_ptr.sol +++ b/test/libsolidity/semanticTests/structs/struct_memory_to_storage_function_ptr.sol @@ -28,6 +28,6 @@ contract C { } // ---- // f() -> 42, 23, 34, 42, 42 -// gas irOptimized: 110388 +// gas irOptimized: 110382 // gas legacy: 111993 // gas legacyOptimized: 110546 diff --git a/test/libsolidity/semanticTests/structs/structs.sol b/test/libsolidity/semanticTests/structs/structs.sol index 61456cd7e..b5e9d10bb 100644 --- a/test/libsolidity/semanticTests/structs/structs.sol +++ b/test/libsolidity/semanticTests/structs/structs.sol @@ -30,7 +30,7 @@ contract test { // ---- // check() -> false // set() -> -// gas irOptimized: 134435 +// gas irOptimized: 134417 // gas legacy: 135246 // gas legacyOptimized: 134062 // check() -> true diff --git a/test/libsolidity/semanticTests/userDefinedValueType/calldata.sol b/test/libsolidity/semanticTests/userDefinedValueType/calldata.sol index 1e58c9b03..2e85c3463 100644 --- a/test/libsolidity/semanticTests/userDefinedValueType/calldata.sol +++ b/test/libsolidity/semanticTests/userDefinedValueType/calldata.sol @@ -49,11 +49,11 @@ contract C { } // ---- // test_f() -> true -// gas irOptimized: 122489 +// gas irOptimized: 122388 // gas legacy: 126030 // gas legacyOptimized: 123120 // test_g() -> true -// gas irOptimized: 106871 +// gas irOptimized: 106740 // gas legacy: 112300 // gas legacyOptimized: 107649 // addresses(uint256): 0 -> 0x18 diff --git a/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol b/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol index 31e754a9b..27ab530cd 100644 --- a/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol +++ b/test/libsolidity/semanticTests/userDefinedValueType/erc20.sol @@ -113,7 +113,7 @@ contract ERC20 { // ---- // constructor() // ~ emit Transfer(address,address,uint256): #0x00, #0x1212121212121212121212121212120000000012, 0x14 -// gas irOptimized: 360201 +// gas irOptimized: 352698 // gas legacy: 834932 // gas legacyOptimized: 412648 // totalSupply() -> 20 diff --git a/test/libsolidity/semanticTests/various/address_code.sol b/test/libsolidity/semanticTests/various/address_code.sol index 2712503a4..606737746 100644 --- a/test/libsolidity/semanticTests/various/address_code.sol +++ b/test/libsolidity/semanticTests/various/address_code.sol @@ -14,9 +14,9 @@ contract C { } // ---- // constructor() -> -// gas irOptimized: 175145 +// gas irOptimized: 172853 // gas legacy: 241796 -// gas legacyOptimized: 153411 +// gas legacyOptimized: 153454 // initCode() -> 0x20, 0 // f() -> true // g() -> 0 diff --git a/test/libsolidity/semanticTests/various/create_calldata.sol b/test/libsolidity/semanticTests/various/create_calldata.sol index fc4e885ff..b40b0eab4 100644 --- a/test/libsolidity/semanticTests/various/create_calldata.sol +++ b/test/libsolidity/semanticTests/various/create_calldata.sol @@ -8,7 +8,7 @@ contract C { } // ---- // constructor(): 42 -> -// gas irOptimized: 146699 +// gas irOptimized: 144924 // gas legacy: 173845 -// gas legacyOptimized: 137736 +// gas legacyOptimized: 137677 // s() -> 0x20, 0 diff --git a/test/libsolidity/semanticTests/various/destructuring_assignment.sol b/test/libsolidity/semanticTests/various/destructuring_assignment.sol index 1534891dc..b13db85d1 100644 --- a/test/libsolidity/semanticTests/various/destructuring_assignment.sol +++ b/test/libsolidity/semanticTests/various/destructuring_assignment.sol @@ -33,6 +33,6 @@ contract C { } // ---- // f(bytes): 0x20, 0x5, "abcde" -> 0 -// gas irOptimized: 241853 +// gas irOptimized: 241832 // gas legacy: 243284 -// gas legacyOptimized: 242421 +// gas legacyOptimized: 242420 diff --git a/test/libsolidity/semanticTests/various/erc20.sol b/test/libsolidity/semanticTests/various/erc20.sol index 47f4005e3..b752a5210 100644 --- a/test/libsolidity/semanticTests/various/erc20.sol +++ b/test/libsolidity/semanticTests/various/erc20.sol @@ -96,7 +96,7 @@ contract ERC20 { // ---- // constructor() // ~ emit Transfer(address,address,uint256): #0x00, #0x1212121212121212121212121212120000000012, 0x14 -// gas irOptimized: 355485 +// gas irOptimized: 353276 // gas legacy: 807683 // gas legacyOptimized: 408718 // totalSupply() -> 20 diff --git a/test/libsolidity/semanticTests/various/negative_stack_height.sol b/test/libsolidity/semanticTests/various/negative_stack_height.sol index 92b6b5650..3c9130e9f 100644 --- a/test/libsolidity/semanticTests/various/negative_stack_height.sol +++ b/test/libsolidity/semanticTests/various/negative_stack_height.sol @@ -66,4 +66,4 @@ contract C { // ---- // constructor() -> // gas legacy: 575272 -// gas legacyOptimized: 346970 +// gas legacyOptimized: 345026 diff --git a/test/libsolidity/semanticTests/various/senders_balance.sol b/test/libsolidity/semanticTests/various/senders_balance.sol index 6a8da2778..37d6919db 100644 --- a/test/libsolidity/semanticTests/various/senders_balance.sol +++ b/test/libsolidity/semanticTests/various/senders_balance.sol @@ -16,7 +16,7 @@ contract D { } // ---- // constructor(), 27 wei -> -// gas irOptimized: 169377 +// gas irOptimized: 168729 // gas legacy: 218459 // gas legacyOptimized: 167292 // f() -> 27 diff --git a/test/libsolidity/semanticTests/various/skip_dynamic_types_for_structs.sol b/test/libsolidity/semanticTests/various/skip_dynamic_types_for_structs.sol index efff7a950..e6b9a6aae 100644 --- a/test/libsolidity/semanticTests/various/skip_dynamic_types_for_structs.sol +++ b/test/libsolidity/semanticTests/various/skip_dynamic_types_for_structs.sol @@ -19,6 +19,6 @@ contract C { } // ---- // g() -> 2, 6 -// gas irOptimized: 178542 +// gas irOptimized: 178487 // gas legacy: 180839 -// gas legacyOptimized: 179375 +// gas legacyOptimized: 179374 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 d95a2cd7c..1306529d4 100644 --- a/test/libsolidity/semanticTests/various/staticcall_for_view_and_pure.sol +++ b/test/libsolidity/semanticTests/various/staticcall_for_view_and_pure.sol @@ -37,10 +37,10 @@ contract D { // f() -> 0x1 # This should work, next should throw # // gas legacy: 102095 // fview() -> FAILURE -// gas irOptimized: 98438596 +// gas irOptimized: 98438588 // gas legacy: 98438774 // gas legacyOptimized: 98438580 // fpure() -> FAILURE -// gas irOptimized: 98438596 +// gas irOptimized: 98438589 // gas legacy: 98438774 // gas legacyOptimized: 98438580 diff --git a/test/libsolidity/semanticTests/various/swap_in_storage_overwrite.sol b/test/libsolidity/semanticTests/various/swap_in_storage_overwrite.sol index 482847b67..bd5a59519 100644 --- a/test/libsolidity/semanticTests/various/swap_in_storage_overwrite.sol +++ b/test/libsolidity/semanticTests/various/swap_in_storage_overwrite.sol @@ -26,7 +26,7 @@ contract c { // x() -> 0, 0 // y() -> 0, 0 // set() -> -// gas irOptimized: 109690 +// gas irOptimized: 109684 // gas legacy: 109728 // gas legacyOptimized: 109680 // x() -> 1, 2 diff --git a/test/libsolidity/semanticTests/various/value_complex.sol b/test/libsolidity/semanticTests/various/value_complex.sol index 80f8bb55c..880dfbc20 100644 --- a/test/libsolidity/semanticTests/various/value_complex.sol +++ b/test/libsolidity/semanticTests/various/value_complex.sol @@ -19,7 +19,7 @@ contract test { } // ---- // constructor(), 20 wei -> -// gas irOptimized: 174351 +// gas irOptimized: 173055 // gas legacy: 252296 // gas legacyOptimized: 180352 // sendAmount(uint256): 5 -> 8 diff --git a/test/libsolidity/semanticTests/various/value_insane.sol b/test/libsolidity/semanticTests/various/value_insane.sol index 4a4432758..897b9faba 100644 --- a/test/libsolidity/semanticTests/various/value_insane.sol +++ b/test/libsolidity/semanticTests/various/value_insane.sol @@ -18,7 +18,7 @@ contract test { } // ---- // constructor(), 20 wei -> -// gas irOptimized: 175215 +// gas irOptimized: 173919 // gas legacy: 253820 // gas legacyOptimized: 180784 // sendAmount(uint256): 5 -> 8 diff --git a/test/libsolidity/semanticTests/viaYul/copy_struct_invalid_ir_bug.sol b/test/libsolidity/semanticTests/viaYul/copy_struct_invalid_ir_bug.sol index 4b8f599a8..ed5ecf3ed 100644 --- a/test/libsolidity/semanticTests/viaYul/copy_struct_invalid_ir_bug.sol +++ b/test/libsolidity/semanticTests/viaYul/copy_struct_invalid_ir_bug.sol @@ -21,6 +21,6 @@ contract C { } // ---- // f() -> -// gas irOptimized: 113010 +// gas irOptimized: 112980 // gas legacy: 112890 // gas legacyOptimized: 112580 diff --git a/test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul b/test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul index b69d19cdb..8a453e004 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul @@ -457,26 +457,25 @@ } } // ==== -// EVMVersion: >=constantinople +// EVMVersion: >=shanghai // ---- // step: fullSuite // // { // { -// let _1 := 0 -// let _2 := mload(_1) +// let _1 := mload(0) // let pos := 0x20 -// let length := mload(_2) +// let length := mload(_1) // mstore(pos, length) // pos := 64 -// let srcPtr := add(_2, 0x20) -// let i := _1 +// let srcPtr := add(_1, 0x20) +// let i := 0 // for { } lt(i, length) { i := add(i, 1) } // { -// let _3 := mload(srcPtr) +// let _2 := mload(srcPtr) // let pos_1 := pos -// let srcPtr_1 := _3 -// let i_1 := _1 +// let srcPtr_1 := _2 +// let i_1 := 0 // for { } lt(i_1, 0x3) { i_1 := add(i_1, 1) } // { // mstore(pos_1, and(mload(srcPtr_1), sub(shl(160, 1), 1))) @@ -489,7 +488,7 @@ // let a, b, c, d := abi_decode_uint256t_uint256t_array_uint256_dynt_array_array_uint256_memory_dyn(mload(0x20), mload(64)) // sstore(a, b) // sstore(c, d) -// sstore(_1, pos) +// sstore(0, pos) // } // function abi_decode_array_array_uint256_memory_dyn(offset, end) -> array // { diff --git a/test/libyul/yulOptimizerTests/fullSuite/clear_after_if_continue.yul b/test/libyul/yulOptimizerTests/fullSuite/clear_after_if_continue.yul index 71ed36d97..d5a5af833 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/clear_after_if_continue.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/clear_after_if_continue.yul @@ -6,6 +6,8 @@ } if y { revert(0, 0) } } +// ==== +// EVMVersion: >=shanghai // ---- // step: fullSuite // @@ -13,15 +15,7 @@ // { // let y := mload(0x20) // let _1 := iszero(and(y, 8)) -// for { } -// iszero(_1) -// { -// if y -// { -// let _2 := 0 -// revert(_2, _2) -// } -// } +// for { } iszero(_1) { if y { revert(0, 0) } } // { // if y { continue } // sstore(1, 0) diff --git a/test/libyul/yulOptimizerTests/fullSuite/create2_and_mask.yul b/test/libyul/yulOptimizerTests/fullSuite/create2_and_mask.yul index 813c2706e..f9d248e2f 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/create2_and_mask.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/create2_and_mask.yul @@ -7,15 +7,14 @@ sstore(a, b) } // ==== -// EVMVersion: >=constantinople +// EVMVersion: >=shanghai // ---- // step: fullSuite // // { // { // let _1 := sub(shl(160, 1), 1) -// let _2 := 0 -// let a := and(create2(_2, _2, 0x20, _2), _1) -// sstore(a, and(_1, create2(_2, _2, 0x20, _2))) +// let a := and(create2(0, 0, 0x20, 0), _1) +// sstore(a, and(_1, create2(0, 0, 0x20, 0))) // } // } diff --git a/test/libyul/yulOptimizerTests/fullSuite/static_array_slot_computation.yul b/test/libyul/yulOptimizerTests/fullSuite/static_array_slot_computation.yul index 72c09d3dc..bf74af6f4 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/static_array_slot_computation.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/static_array_slot_computation.yul @@ -22,22 +22,21 @@ } } // ==== -// EVMVersion: >=constantinople +// EVMVersion: >=shanghai // ---- // step: fullSuite // // { // { -// let _1 := 0 -// if eq(0x26121ff0, shr(224, calldataload(_1))) +// if eq(0x26121ff0, shr(224, calldataload(0))) // { -// if callvalue() { revert(_1, _1) } -// if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) } -// if iszero(lt(0x0a, sload(_1))) +// if callvalue() { revert(0, 0) } +// if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) } +// if iszero(lt(0x0a, sload(0))) // { -// mstore(_1, shl(224, 0x4e487b71)) +// mstore(0, shl(224, 0x4e487b71)) // mstore(4, 0x32) -// revert(_1, 0x24) +// revert(0, 0x24) // } // sstore(0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56d, 0x05) // } diff --git a/test/libyul/yulOptimizerTests/fullSuite/unusedFunctionParameterPruner_loop.yul b/test/libyul/yulOptimizerTests/fullSuite/unusedFunctionParameterPruner_loop.yul index 7955ee12e..f0b7546d0 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/unusedFunctionParameterPruner_loop.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/unusedFunctionParameterPruner_loop.yul @@ -12,6 +12,8 @@ } } } +// ==== +// EVMVersion: >=shanghai // ---- // step: fullSuite // @@ -25,13 +27,12 @@ // function f() // { // let b := 10 -// let _1 := 0 -// let a := calldataload(_1) -// let _2 := iszero(a) +// let a := calldataload(0) +// let _1 := iszero(a) // for { } iszero(b) { b := add(b, not(0)) } // { -// mstore(a, _1) -// if _2 { leave } +// mstore(a, 0) +// if _1 { leave } // } // } // }