diff --git a/test/cmdlineTests/evm_to_wasm/output b/test/cmdlineTests/evm_to_wasm/output index fa454f80f..8a6e9812b 100644 --- a/test/cmdlineTests/evm_to_wasm/output +++ b/test/cmdlineTests/evm_to_wasm/output @@ -14,8 +14,7 @@ object "object" { code { function main() { - let hi := i64.shl(i64.extend_i32_u(bswap32(i32.wrap_i64(0))), 32) - let y := i64.or(hi, i64.extend_i32_u(bswap32(i32.wrap_i64(i64.shr_u(0, 32))))) + let y := i64.or(i64.shl(i64.extend_i32_u(bswap32(i32.wrap_i64(0))), 32), i64.extend_i32_u(bswap32(i32.wrap_i64(i64.shr_u(0, 32))))) i64.store(0:i32, y) i64.store(i32.add(0:i32, 8:i32), y) i64.store(i32.add(0:i32, 16:i32), y) @@ -23,8 +22,7 @@ object "object" { i64.store(32:i32, y) i64.store(i32.add(32:i32, 8:i32), y) i64.store(i32.add(32:i32, 16:i32), y) - let hi_1 := i64.shl(i64.extend_i32_u(bswap32(i32.wrap_i64(1))), 32) - i64.store(i32.add(32:i32, 24:i32), i64.or(hi_1, i64.extend_i32_u(bswap32(i32.wrap_i64(i64.shr_u(1, 32)))))) + i64.store(i32.add(32:i32, 24:i32), i64.or(i64.shl(i64.extend_i32_u(bswap32(i32.wrap_i64(1))), 32), i64.extend_i32_u(bswap32(i32.wrap_i64(i64.shr_u(1, 32)))))) eth.storageStore(0:i32, 32:i32) } function bswap16(x:i32) -> y:i32 @@ -33,15 +31,14 @@ object "object" { } function bswap32(x:i32) -> y:i32 { - let hi:i32 := i32.shl(bswap16(x), 16:i32) - y := i32.or(hi, bswap16(i32.shr_u(x, 16:i32))) + y := i32.or(i32.shl(bswap16(x), 16:i32), bswap16(i32.shr_u(x, 16:i32))) } } } Binary representation: -0061736d01000000010e0360000060017f017f60027f7f0002190108657468657265756d0c73746f7261676553746f726500020304030001010503010001060100071102066d656d6f72790200046d61696e00010ac70103850101037e02404200a71003ad422086210020004200422088a71003ad84210141002001370000410041086a2001370000410041106a2001370000410041186a200137000041202001370000412041086a2001370000412041106a20013700004201a71003ad4220862102412041186a20024201422088a71003ad843700004100412010000b0b1f01017f024020004108744180fe0371200041087641ff01717221010b20010b1e01027f02402000100241107421022002200041107610027221010b20010b +0061736d01000000010e0360000060017f017f60027f7f0002190108657468657265756d0c73746f7261676553746f726500020304030001010503010001060100071102066d656d6f72790200046d61696e00010aba01037d01017e02404200a71003ad4220864200422088a71003ad84210041002000370000410041086a2000370000410041106a2000370000410041186a200037000041202000370000412041086a2000370000412041106a2000370000412041186a4201a71003ad4220864201422088a71003ad843700004100412010000b0b1f01017f024020004108744180fe0371200041087641ff01717221010b20010b1a01017f024020001002411074200041107610027221010b20010b Text representation: (module @@ -50,12 +47,9 @@ Text representation: (export "main" (func $main)) (func $main - (local $hi i64) (local $y i64) - (local $hi_1 i64) (block $label_ - (local.set $hi (i64.shl (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.const 0)))) (i64.const 32))) - (local.set $y (i64.or (local.get $hi) (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.shr_u (i64.const 0) (i64.const 32))))))) + (local.set $y (i64.or (i64.shl (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.const 0)))) (i64.const 32)) (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.shr_u (i64.const 0) (i64.const 32))))))) (i64.store (i32.const 0) (local.get $y)) (i64.store (i32.add (i32.const 0) (i32.const 8)) (local.get $y)) (i64.store (i32.add (i32.const 0) (i32.const 16)) (local.get $y)) @@ -63,8 +57,7 @@ Text representation: (i64.store (i32.const 32) (local.get $y)) (i64.store (i32.add (i32.const 32) (i32.const 8)) (local.get $y)) (i64.store (i32.add (i32.const 32) (i32.const 16)) (local.get $y)) - (local.set $hi_1 (i64.shl (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.const 1)))) (i64.const 32))) - (i64.store (i32.add (i32.const 32) (i32.const 24)) (i64.or (local.get $hi_1) (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.shr_u (i64.const 1) (i64.const 32))))))) + (i64.store (i32.add (i32.const 32) (i32.const 24)) (i64.or (i64.shl (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.const 1)))) (i64.const 32)) (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.shr_u (i64.const 1) (i64.const 32))))))) (call $eth.storageStore (i32.const 0) (i32.const 32)) ) ) @@ -84,10 +77,8 @@ Text representation: (param $x i32) (result i32) (local $y i32) - (local $hi i32) (block $label__2 - (local.set $hi (i32.shl (call $bswap16 (local.get $x)) (i32.const 16))) - (local.set $y (i32.or (local.get $hi) (call $bswap16 (i32.shr_u (local.get $x) (i32.const 16))))) + (local.set $y (i32.or (i32.shl (call $bswap16 (local.get $x)) (i32.const 16)) (call $bswap16 (i32.shr_u (local.get $x) (i32.const 16))))) ) (local.get $y) diff --git a/test/cmdlineTests/evm_to_wasm_break/output b/test/cmdlineTests/evm_to_wasm_break/output index 01a4cbb41..47ff603e2 100644 --- a/test/cmdlineTests/evm_to_wasm_break/output +++ b/test/cmdlineTests/evm_to_wasm_break/output @@ -111,13 +111,11 @@ object "object" { } function bswap32(x:i32) -> y:i32 { - let hi:i32 := i32.shl(bswap16(x), 16:i32) - y := i32.or(hi, bswap16(i32.shr_u(x, 16:i32))) + y := i32.or(i32.shl(bswap16(x), 16:i32), bswap16(i32.shr_u(x, 16:i32))) } function bswap64(x) -> y { - let hi := i64.shl(i64.extend_i32_u(bswap32(i32.wrap_i64(x))), 32) - y := i64.or(hi, i64.extend_i32_u(bswap32(i32.wrap_i64(i64.shr_u(x, 32))))) + y := i64.or(i64.shl(i64.extend_i32_u(bswap32(i32.wrap_i64(x))), 32), i64.extend_i32_u(bswap32(i32.wrap_i64(i64.shr_u(x, 32))))) } function calldataload() -> z1, z2, z3, z4 { @@ -154,8 +152,7 @@ object "object" { } function sstore(y1, y2, y3, y4) { - let hi := i64.shl(i64.extend_i32_u(bswap32(i32.wrap_i64(0))), 32) - let y := i64.or(hi, i64.extend_i32_u(bswap32(i32.wrap_i64(i64.shr_u(0, 32))))) + let y := i64.or(i64.shl(i64.extend_i32_u(bswap32(i32.wrap_i64(0))), 32), i64.extend_i32_u(bswap32(i32.wrap_i64(i64.shr_u(0, 32))))) i64.store(0:i32, y) i64.store(i32.add(0:i32, 8:i32), y) i64.store(i32.add(0:i32, 16:i32), y) @@ -171,7 +168,7 @@ object "object" { Binary representation: -0061736d010000000130096000006000017e6000017f60017e017e60047e7e7e7e0060047e7e7e7e017e60017f017f60027f7f0060037f7f7f00025e0408657468657265756d0c73746f7261676553746f7265000708657468657265756d06726576657274000708657468657265756d0f67657443616c6c4461746153697a65000208657468657265756d0c63616c6c44617461436f70790008030e0d0005030505050202060603010405030100010615047e0142000b7e0142000b7e0142000b7f0141000b071102066d656d6f72790200046d61696e00040abd090d8d0203087e017f107e02400240100f21002300210123012102230221030b200021042001210520022106200321074200420084420042018484504545210802400340200845450d010240024020042005200620071009100621092303210a2300210b2301210c0b2009200a84200b200c8484504504400c030b024020042005200620071007210d2300210e2301210f230221100b200d200e84200f20108484504504400c030b02402004200520062007100821112300211223012113230221140b2011201284201320148484504504400c010b0b02402004200520062007100521152300211623012117230221180b201521042016210520172106201821070c000b0b200420052006200710100b0b6701077e0240200342017c2108200842007c2107200242007c210920092008200354200720085472ad7c2106200142007c210a200a2009200254200620095472ad7c2105200042007c200a2001542005200a5472ad7c21040b20052400200624012007240220040b2401047e0240420042008442002000848450ad21040b20022400200324012004240220010b2f01047e02402000420051200142005120024200512003420251717171ad21070b20052400200624012007240220040b2f01047e02402000420051200142005120024200512003420451717171ad21070b20052400200624012007240220040bab0104017e017f017e047f02404100210542002106417f210702402007200020065220002006541b21082008410046044002402007200120065220012006541b21092009410046044002402007200220065220022006541b210a200a41004604402003420a54210505200a41014604404100210505410121050b0b0b05200941014604404100210505410121050b0b0b05200841014604404100210505410121050b0b0b2005ad21040b20040b2f02017f017e02404200210120012001200184200184520440000b20012001422088520440000b2001a721000b20000b2901017f024042004200420084420084520440000b42004220422088520440000b4220a721000b20000b1f01017f024020004108744180fe0371200041087641ff01717221010b20010b1e01027f02402000100c411074210220022000411076100c7221010b20010b2201027e02402000a7100dad422086210220022000422088a7100dad8421010b20010bdc0103047e097f047e024010022104100a2105100a2106100b21072006417f20076b4b04404100410010010b200420066b2108200620044b0440410021080b41002109200820094b044020052006200810030b200720084b0440200720086b210a200520086a210b2009210c02400340200c200a49450d010240200b200c6a20093a00000b200c41016a210c0c000b0b0b2009290000100e210d200941086a290000100e210e200941106a290000100e210f200941186a290000100e2110200d2100200e2101200f2102201021030b20012400200224012003240220000b7801027e02404200a7100dad422086210420044200422088a7100dad84210541002005370000410041086a2005370000410041106a2005370000410041186a200537000041202000100e370000412041086a2001100e370000412041106a2002100e370000412041186a2003100e3700004100412010000b0b +0061736d010000000130096000006000017e6000017f60017e017e60047e7e7e7e0060047e7e7e7e017e60017f017f60027f7f0060037f7f7f00025e0408657468657265756d0c73746f7261676553746f7265000708657468657265756d06726576657274000708657468657265756d0f67657443616c6c4461746153697a65000208657468657265756d0c63616c6c44617461436f70790008030e0d0005030505050202060603010405030100010615047e0142000b7e0142000b7e0142000b7f0141000b071102066d656d6f72790200046d61696e00040ab1090d8d0203087e017f107e02400240100f21002300210123012102230221030b200021042001210520022106200321074200420084420042018484504545210802400340200845450d010240024020042005200620071009100621092303210a2300210b2301210c0b2009200a84200b200c8484504504400c030b024020042005200620071007210d2300210e2301210f230221100b200d200e84200f20108484504504400c030b02402004200520062007100821112300211223012113230221140b2011201284201320148484504504400c010b0b02402004200520062007100521152300211623012117230221180b201521042016210520172106201821070c000b0b200420052006200710100b0b6701077e0240200342017c2108200842007c2107200242007c210920092008200354200720085472ad7c2106200142007c210a200a2009200254200620095472ad7c2105200042007c200a2001542005200a5472ad7c21040b20052400200624012007240220040b2401047e0240420042008442002000848450ad21040b20022400200324012004240220010b2f01047e02402000420051200142005120024200512003420251717171ad21070b20052400200624012007240220040b2f01047e02402000420051200142005120024200512003420451717171ad21070b20052400200624012007240220040bab0104017e017f017e047f02404100210542002106417f210702402007200020065220002006541b21082008410046044002402007200120065220012006541b21092009410046044002402007200220065220022006541b210a200a41004604402003420a54210505200a41014604404100210505410121050b0b0b05200941014604404100210505410121050b0b0b05200841014604404100210505410121050b0b0b2005ad21040b20040b2f02017f017e02404200210120012001200184200184520440000b20012001422088520440000b2001a721000b20000b2901017f024042004200420084420084520440000b42004220422088520440000b4220a721000b20000b1f01017f024020004108744180fe0371200041087641ff01717221010b20010b1a01017f02402000100c4110742000411076100c7221010b20010b1e01017e02402000a7100dad4220862000422088a7100dad8421010b20010bdc0103047e097f047e024010022104100a2105100a2106100b21072006417f20076b4b04404100410010010b200420066b2108200620044b0440410021080b41002109200820094b044020052006200810030b200720084b0440200720086b210a200520086a210b2009210c02400340200c200a49450d010240200b200c6a20093a00000b200c41016a210c0c000b0b0b2009290000100e210d200941086a290000100e210e200941106a290000100e210f200941186a290000100e2110200d2100200e2101200f2102201021030b20012400200224012003240220000b7401017e02404200a7100dad4220864200422088a7100dad84210441002004370000410041086a2004370000410041106a2004370000410041186a200437000041202000100e370000412041086a2001100e370000412041106a2002100e370000412041186a2003100e3700004100412010000b0b Text representation: (module @@ -471,10 +468,8 @@ Text representation: (param $x i32) (result i32) (local $y i32) - (local $hi i32) (block $label__17 - (local.set $hi (i32.shl (call $bswap16 (local.get $x)) (i32.const 16))) - (local.set $y (i32.or (local.get $hi) (call $bswap16 (i32.shr_u (local.get $x) (i32.const 16))))) + (local.set $y (i32.or (i32.shl (call $bswap16 (local.get $x)) (i32.const 16)) (call $bswap16 (i32.shr_u (local.get $x) (i32.const 16))))) ) (local.get $y) @@ -484,10 +479,8 @@ Text representation: (param $x i64) (result i64) (local $y i64) - (local $hi i64) (block $label__18 - (local.set $hi (i64.shl (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (local.get $x)))) (i64.const 32))) - (local.set $y (i64.or (local.get $hi) (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.shr_u (local.get $x) (i64.const 32))))))) + (local.set $y (i64.or (i64.shl (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (local.get $x)))) (i64.const 32)) (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.shr_u (local.get $x) (i64.const 32))))))) ) (local.get $y) @@ -563,11 +556,9 @@ Text representation: (param $y2 i64) (param $y3 i64) (param $y4 i64) - (local $hi i64) (local $y i64) (block $label__23 - (local.set $hi (i64.shl (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.const 0)))) (i64.const 32))) - (local.set $y (i64.or (local.get $hi) (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.shr_u (i64.const 0) (i64.const 32))))))) + (local.set $y (i64.or (i64.shl (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.const 0)))) (i64.const 32)) (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.shr_u (i64.const 0) (i64.const 32))))))) (i64.store (i32.const 0) (local.get $y)) (i64.store (i32.add (i32.const 0) (i32.const 8)) (local.get $y)) (i64.store (i32.add (i32.const 0) (i32.const 16)) (local.get $y)) diff --git a/test/cmdlineTests/evm_to_wasm_output_selection_ewasm_ir_only/output b/test/cmdlineTests/evm_to_wasm_output_selection_ewasm_ir_only/output index 3124db17d..4c122df09 100644 --- a/test/cmdlineTests/evm_to_wasm_output_selection_ewasm_ir_only/output +++ b/test/cmdlineTests/evm_to_wasm_output_selection_ewasm_ir_only/output @@ -8,8 +8,7 @@ object "object" { code { function main() { - let hi := i64.shl(i64.extend_i32_u(bswap32(i32.wrap_i64(0))), 32) - let y := i64.or(hi, i64.extend_i32_u(bswap32(i32.wrap_i64(i64.shr_u(0, 32))))) + let y := i64.or(i64.shl(i64.extend_i32_u(bswap32(i32.wrap_i64(0))), 32), i64.extend_i32_u(bswap32(i32.wrap_i64(i64.shr_u(0, 32))))) i64.store(0:i32, y) i64.store(i32.add(0:i32, 8:i32), y) i64.store(i32.add(0:i32, 16:i32), y) @@ -17,8 +16,7 @@ object "object" { i64.store(32:i32, y) i64.store(i32.add(32:i32, 8:i32), y) i64.store(i32.add(32:i32, 16:i32), y) - let hi_1 := i64.shl(i64.extend_i32_u(bswap32(i32.wrap_i64(42))), 32) - i64.store(i32.add(32:i32, 24:i32), i64.or(hi_1, i64.extend_i32_u(bswap32(i32.wrap_i64(i64.shr_u(42, 32)))))) + i64.store(i32.add(32:i32, 24:i32), i64.or(i64.shl(i64.extend_i32_u(bswap32(i32.wrap_i64(42))), 32), i64.extend_i32_u(bswap32(i32.wrap_i64(i64.shr_u(42, 32)))))) eth.storageStore(0:i32, 32:i32) } function bswap16(x:i32) -> y:i32 @@ -27,8 +25,7 @@ object "object" { } function bswap32(x:i32) -> y:i32 { - let hi:i32 := i32.shl(bswap16(x), 16:i32) - y := i32.or(hi, bswap16(i32.shr_u(x, 16:i32))) + y := i32.or(i32.shl(bswap16(x), 16:i32), bswap16(i32.shr_u(x, 16:i32))) } } } diff --git a/test/cmdlineTests/evm_to_wasm_output_selection_ewasm_only/output b/test/cmdlineTests/evm_to_wasm_output_selection_ewasm_only/output index e8b306260..18f710ecd 100644 --- a/test/cmdlineTests/evm_to_wasm_output_selection_ewasm_only/output +++ b/test/cmdlineTests/evm_to_wasm_output_selection_ewasm_only/output @@ -8,12 +8,9 @@ Text representation: (export "main" (func $main)) (func $main - (local $hi i64) (local $y i64) - (local $hi_1 i64) (block $label_ - (local.set $hi (i64.shl (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.const 0)))) (i64.const 32))) - (local.set $y (i64.or (local.get $hi) (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.shr_u (i64.const 0) (i64.const 32))))))) + (local.set $y (i64.or (i64.shl (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.const 0)))) (i64.const 32)) (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.shr_u (i64.const 0) (i64.const 32))))))) (i64.store (i32.const 0) (local.get $y)) (i64.store (i32.add (i32.const 0) (i32.const 8)) (local.get $y)) (i64.store (i32.add (i32.const 0) (i32.const 16)) (local.get $y)) @@ -21,8 +18,7 @@ Text representation: (i64.store (i32.const 32) (local.get $y)) (i64.store (i32.add (i32.const 32) (i32.const 8)) (local.get $y)) (i64.store (i32.add (i32.const 32) (i32.const 16)) (local.get $y)) - (local.set $hi_1 (i64.shl (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.const 42)))) (i64.const 32))) - (i64.store (i32.add (i32.const 32) (i32.const 24)) (i64.or (local.get $hi_1) (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.shr_u (i64.const 42) (i64.const 32))))))) + (i64.store (i32.add (i32.const 32) (i32.const 24)) (i64.or (i64.shl (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.const 42)))) (i64.const 32)) (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.shr_u (i64.const 42) (i64.const 32))))))) (call $eth.storageStore (i32.const 0) (i32.const 32)) ) ) @@ -42,10 +38,8 @@ Text representation: (param $x i32) (result i32) (local $y i32) - (local $hi i32) (block $label__2 - (local.set $hi (i32.shl (call $bswap16 (local.get $x)) (i32.const 16))) - (local.set $y (i32.or (local.get $hi) (call $bswap16 (i32.shr_u (local.get $x) (i32.const 16))))) + (local.set $y (i32.or (i32.shl (call $bswap16 (local.get $x)) (i32.const 16)) (call $bswap16 (i32.shr_u (local.get $x) (i32.const 16))))) ) (local.get $y) diff --git a/test/cmdlineTests/name_simplifier/output b/test/cmdlineTests/name_simplifier/output index 219d76769..40c3fd373 100644 --- a/test/cmdlineTests/name_simplifier/output +++ b/test/cmdlineTests/name_simplifier/output @@ -103,13 +103,14 @@ object "C_59" { function fun_sumArray(var_s_mpos) -> var, var_mpos { /// @src 0:346:625 "contract C {..." - if iszero(mload(var_s_mpos)) { panic_error_0x32() } + let _1 := mload(var_s_mpos) + if iszero(_1) { panic_error_0x32() } sstore(/** @src 0:472:473 "0" */ 0x00, /** @src 0:346:625 "contract C {..." */ mload(/** @src 0:469:474 "_s[0]" */ mload(/** @src 0:346:625 "contract C {..." */ add(var_s_mpos, 32)))) - if iszero(lt(1, mload(var_s_mpos))) { panic_error_0x32() } - let _1 := mload(/** @src 0:489:494 "_s[1]" */ mload(/** @src 0:346:625 "contract C {..." */ add(var_s_mpos, 64))) - sstore(0x02, _1) + if iszero(lt(1, _1)) { panic_error_0x32() } + let _2 := mload(/** @src 0:489:494 "_s[1]" */ mload(/** @src 0:346:625 "contract C {..." */ add(var_s_mpos, 64))) + sstore(0x02, _2) /// @src 0:500:619 "return (t.y[0], \"longstringlongstringlongstringlongstringlongstringlongstringlongstringlongstringlongstringlongstring\")" - var := _1 + var := _2 /// @src 0:346:625 "contract C {..." let memPtr := mload(64) let newFreePtr := add(memPtr, 160) 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 3490a7342..b529908bc 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 @@ -69,9 +69,11 @@ stop sub_0: assembly { /* \"C\":79:428 contract C... */ - mstore(0x40, 0x80) + 0x80 + dup1 + 0x40 + mstore jumpi(tag_7, iszero(lt(calldatasize, 0x04))) - tag_8: 0x00 dup1 revert @@ -81,13 +83,14 @@ sub_0: assembly { calldataload 0xe0 shr - swap1 - dup2 + swap2 + dup3 0x26121ff0 eq tag_9 jumpi pop + pop dup1 0x793816ec eq @@ -97,26 +100,28 @@ sub_0: assembly { eq tag_13 jumpi + tag_14: 0x00 dup1 revert tag_13: - tag_8 + tag_14 tag_3 jump\t// in tag_11: pop - tag_8 + tag_14 tag_2 jump\t// in tag_9: jumpi(tag_19, callvalue) - dup1 + dup2 add(calldatasize, not(0x03)) slt tag_19 jumpi 0x20 + swap1 /* \"C\":290:298 immutVar */ immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") sub(shl(0xff, 0x01), 0x2a) @@ -129,9 +134,7 @@ sub_0: assembly { jumpi /* \"C\":79:428 contract C... */ tag_22: - mload(0x40) /* \"C\":117:119 41 */ - swap1 0x29 add /* \"C\":79:428 contract C... */ @@ -147,12 +150,13 @@ sub_0: assembly { jump(tag_22) /* \"C\":79:428 contract C... */ tag_19: + pop dup1 revert tag_2: pop - jumpi(tag_8, callvalue) - jumpi(tag_8, slt(add(not(0x03), calldatasize), 0x00)) + jumpi(tag_14, callvalue) + jumpi(tag_14, slt(add(not(0x03), calldatasize), 0x00)) 0x20 sload(0x00) mload(0x40) @@ -162,12 +166,12 @@ sub_0: assembly { return tag_3: pop - jumpi(tag_8, callvalue) + jumpi(tag_14, callvalue) 0x00 dup1 add(calldatasize, not(0x03)) slt - tag_19 + tag_30 jumpi dup1 sload @@ -337,6 +341,9 @@ sub_0: assembly { jump\t// in tag_46: jump(tag_33) + tag_30: + dup1 + revert /* \"C\":117:119 41 */ tag_4: pop @@ -397,7 +404,7 @@ sub_0: assembly { swap2 sub slt - tag_8 + tag_14 jumpi mload swap1 @@ -500,9 +507,11 @@ stop sub_0: assembly { /* \"D\":91:166 contract D is C(3)... */ - mstore(0x40, 0x80) + 0x80 + dup1 + 0x40 + mstore jumpi(tag_7, iszero(lt(calldatasize, 0x04))) - tag_8: 0x00 dup1 revert @@ -512,13 +521,14 @@ sub_0: assembly { calldataload 0xe0 shr - swap1 - dup2 + swap2 + dup3 0x26121ff0 eq tag_9 jumpi pop + pop dup1 0x793816ec eq @@ -528,26 +538,28 @@ sub_0: assembly { eq tag_13 jumpi + tag_14: 0x00 dup1 revert tag_13: - tag_8 + tag_14 tag_3 jump\t// in tag_11: pop - tag_8 + tag_14 tag_2 jump\t// in tag_9: jumpi(tag_19, callvalue) - dup1 + dup2 add(calldatasize, not(0x03)) slt tag_19 jumpi 0x20 + swap1 /* \"C\":290:298 immutVar */ immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") sub(shl(0xff, 0x01), 0x2a) @@ -560,9 +572,7 @@ sub_0: assembly { jumpi /* \"D\":91:166 contract D is C(3)... */ tag_22: - mload(0x40) /* \"C\":117:119 41 */ - swap1 0x29 add /* \"D\":91:166 contract D is C(3)... */ @@ -578,12 +588,13 @@ sub_0: assembly { jump(tag_22) /* \"D\":91:166 contract D is C(3)... */ tag_19: + pop dup1 revert tag_2: pop - jumpi(tag_8, callvalue) - jumpi(tag_8, slt(add(not(0x03), calldatasize), 0x00)) + jumpi(tag_14, callvalue) + jumpi(tag_14, slt(add(not(0x03), calldatasize), 0x00)) 0x20 sload(0x00) mload(0x40) @@ -593,12 +604,12 @@ sub_0: assembly { return tag_3: pop - jumpi(tag_8, callvalue) + jumpi(tag_14, callvalue) 0x00 dup1 add(calldatasize, not(0x03)) slt - tag_19 + tag_30 jumpi dup1 sload @@ -768,6 +779,9 @@ sub_0: assembly { jump\t// in tag_46: jump(tag_33) + tag_30: + dup1 + revert /* \"C\":117:119 41 */ tag_4: pop @@ -828,7 +842,7 @@ sub_0: assembly { swap2 sub slt - tag_8 + tag_14 jumpi mload swap1 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 a57dbdc35..f1ee22aca 100644 --- a/test/cmdlineTests/standard_debug_info_in_yul_location/output.json +++ b/test/cmdlineTests/standard_debug_info_in_yul_location/output.json @@ -646,21 +646,21 @@ object \"C_54\" { code { { /// @src 0:79:435 \"contract C...\" - mstore(64, memoryguard(0x80)) + let _1 := memoryguard(0x80) + mstore(64, _1) if iszero(lt(calldatasize(), 4)) { - let _1 := 0 - switch shr(224, calldataload(_1)) + let _2 := 0 + switch shr(224, calldataload(_2)) case 0x26121ff0 { - if callvalue() { revert(_1, _1) } - if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) } + if callvalue() { revert(_2, _2) } + if slt(add(calldatasize(), not(3)), _2) { revert(_2, _2) } /// @src 0:297:305 \"immutVar\" - let _2 := loadimmutable(\"8\") + let _3 := loadimmutable(\"8\") /// @src 0:79:435 \"contract C...\" - if and(1, sgt(_2, sub(shl(255, 1), 42))) { panic_error_0x11() } - let memPos := mload(64) - mstore(memPos, add(/** @src 0:124:126 \"41\" */ 0x29, /** @src 0:79:435 \"contract C...\" */ _2)) - return(memPos, 32) + if and(1, sgt(_3, sub(shl(255, 1), 42))) { panic_error_0x11() } + mstore(_1, add(/** @src 0:124:126 \"41\" */ 0x29, /** @src 0:79:435 \"contract C...\" */ _3)) + return(_1, 32) } case 0x793816ec { external_fun_stateVar() } case 0x9942ec6f { external_fun_f2() } @@ -1484,21 +1484,21 @@ object \"D_72\" { code { { /// @src 1:91:166 \"contract D is C(3)...\" - mstore(64, memoryguard(0x80)) + let _1 := memoryguard(0x80) + mstore(64, _1) if iszero(lt(calldatasize(), 4)) { - let _1 := 0 - switch shr(224, calldataload(_1)) + let _2 := 0 + switch shr(224, calldataload(_2)) case 0x26121ff0 { - if callvalue() { revert(_1, _1) } - if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) } + if callvalue() { revert(_2, _2) } + if slt(add(calldatasize(), not(3)), _2) { revert(_2, _2) } /// @src 0:297:305 \"immutVar\" - let _2 := loadimmutable(\"8\") + let _3 := loadimmutable(\"8\") /// @src 1:91:166 \"contract D is C(3)...\" - if and(1, sgt(_2, sub(shl(255, 1), 42))) { panic_error_0x11() } - let memPos := mload(64) - mstore(memPos, add(/** @src 0:124:126 \"41\" */ 0x29, /** @src 1:91:166 \"contract D is C(3)...\" */ _2)) - return(memPos, 32) + if and(1, sgt(_3, sub(shl(255, 1), 42))) { panic_error_0x11() } + mstore(_1, add(/** @src 0:124:126 \"41\" */ 0x29, /** @src 1:91:166 \"contract D is C(3)...\" */ _3)) + return(_1, 32) } case 0x793816ec { external_fun_stateVar() } case 0x9942ec6f { external_fun_f2() } diff --git a/test/cmdlineTests/standard_ewasm_requested/output.json b/test/cmdlineTests/standard_ewasm_requested/output.json index a8ab1fd0b..cb83ddc50 100644 --- a/test/cmdlineTests/standard_ewasm_requested/output.json +++ b/test/cmdlineTests/standard_ewasm_requested/output.json @@ -12,7 +12,6 @@ (func $main (local $p i32) (local $r i32) - (local $hi i64) (local $y i64) (local $z3 i64) (local $_1 i64) @@ -21,8 +20,7 @@ (local.set $r (i32.add (local.get $p) (i32.const 64))) (if (i32.lt_u (local.get $r) (local.get $p)) (then (unreachable))) - (local.set $hi (i64.shl (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.const 0)))) (i64.const 32))) - (local.set $y (i64.or (local.get $hi) (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.shr_u (i64.const 0) (i64.const 32))))))) + (local.set $y (i64.or (i64.shl (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.const 0)))) (i64.const 32)) (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.shr_u (i64.const 0) (i64.const 32))))))) (i64.store (local.get $r) (local.get $y)) (i64.store (i32.add (local.get $r) (i32.const 8)) (local.get $y)) (i64.store (i32.add (local.get $r) (i32.const 16)) (local.get $y)) @@ -129,10 +127,8 @@ (param $x i32) (result i32) (local $y i32) - (local $hi i32) (block $label__7 - (local.set $hi (i32.shl (call $bswap16 (local.get $x)) (i32.const 16))) - (local.set $y (i32.or (local.get $hi) (call $bswap16 (i32.shr_u (local.get $x) (i32.const 16))))) + (local.set $y (i32.or (i32.shl (call $bswap16 (local.get $x)) (i32.const 16)) (call $bswap16 (i32.shr_u (local.get $x) (i32.const 16))))) ) (local.get $y) @@ -141,10 +137,8 @@ (func $bswap64 (result i64) (local $y i64) - (local $hi i64) (block $label__8 - (local.set $hi (i64.shl (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.const 128)))) (i64.const 32))) - (local.set $y (i64.or (local.get $hi) (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.shr_u (i64.const 128) (i64.const 32))))))) + (local.set $y (i64.or (i64.shl (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.const 128)))) (i64.const 32)) (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.shr_u (i64.const 128) (i64.const 32))))))) ) (local.get $y) diff --git a/test/cmdlineTests/yul_to_wasm_source_location_crash/output b/test/cmdlineTests/yul_to_wasm_source_location_crash/output index 29ff631aa..219afcd93 100644 --- a/test/cmdlineTests/yul_to_wasm_source_location_crash/output +++ b/test/cmdlineTests/yul_to_wasm_source_location_crash/output @@ -9,8 +9,7 @@ object "C" { code { function main() { - let hi := i64.shl(i64.extend_i32_u(bswap32(i32.wrap_i64(0))), 32) - let y := i64.or(hi, i64.extend_i32_u(bswap32(i32.wrap_i64(i64.shr_u(0, 32))))) + let y := i64.or(i64.shl(i64.extend_i32_u(bswap32(i32.wrap_i64(0))), 32), i64.extend_i32_u(bswap32(i32.wrap_i64(i64.shr_u(0, 32))))) i64.store(0:i32, y) i64.store(i32.add(0:i32, 8:i32), y) i64.store(i32.add(0:i32, 16:i32), y) @@ -27,8 +26,7 @@ object "C" { } function bswap32(x:i32) -> y:i32 { - let hi:i32 := i32.shl(bswap16(x), 16:i32) - y := i32.or(hi, bswap16(i32.shr_u(x, 16:i32))) + y := i32.or(i32.shl(bswap16(x), 16:i32), bswap16(i32.shr_u(x, 16:i32))) } } } diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol index 07f4ab275..e218a5039 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol @@ -24,6 +24,6 @@ contract C { // compileViaYul: also // ---- // f() -> 0x20, 0x8, 0x40, 0x3, 0x9, 0xa, 0xb -// gas irOptimized: 203310 +// gas irOptimized: 203284 // gas legacy: 206075 // gas legacyOptimized: 203059 diff --git a/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol b/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol index 027ae4e16..dae0d00ab 100644 --- a/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol +++ b/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol @@ -11,6 +11,6 @@ contract C { // compileViaYul: also // ---- // f(bytes): 0x20, 0x80, 0x21, 0x40, 0x7, "abcdefg" -> 0x21, 0x40, 0x7, "abcdefg" -// gas irOptimized: 135918 +// gas irOptimized: 135910 // gas legacy: 137181 // gas legacyOptimized: 136073 diff --git a/test/libsolidity/semanticTests/array/bytes_length_member.sol b/test/libsolidity/semanticTests/array/bytes_length_member.sol index b4e018e65..25d040c92 100644 --- a/test/libsolidity/semanticTests/array/bytes_length_member.sol +++ b/test/libsolidity/semanticTests/array/bytes_length_member.sol @@ -15,7 +15,7 @@ contract c { // ---- // getLength() -> 0 // set(): 1, 2 -> true -// gas irOptimized: 110435 +// gas irOptimized: 110443 // gas legacy: 110723 // gas legacyOptimized: 110564 // getLength() -> 68 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 d2d7f4e48..8ac7ea87b 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_dynamic.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_dynamic.sol @@ -14,6 +14,6 @@ contract c { // compileViaYul: also // ---- // test() -> 9, 4 -// gas irOptimized: 123162 +// gas irOptimized: 123330 // gas legacy: 123579 // gas legacyOptimized: 123208 diff --git a/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol b/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol index 26ad58f4c..565f1f075 100644 --- a/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol +++ b/test/libsolidity/semanticTests/array/copying/bytes_inside_mappings.sol @@ -7,11 +7,11 @@ contract c { // compileViaYul: also // ---- // set(uint256): 1, 2 -> true -// gas irOptimized: 110604 +// gas irOptimized: 110618 // gas legacy: 111088 // gas legacyOptimized: 110733 // set(uint256): 2, 2, 3, 4, 5 -> true -// gas irOptimized: 177564 +// gas irOptimized: 177578 // gas legacy: 178018 // gas legacyOptimized: 177663 // 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 29a017e08..a9c77a4f6 100644 --- a/test/libsolidity/semanticTests/array/copying/bytes_storage_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/bytes_storage_to_storage.sol @@ -23,21 +23,21 @@ contract c { // gas legacy: 123884 // gas legacyOptimized: 119139 // f(uint256): 32 -> 0x20, 0x20, 1780731860627700044960722568376592200742329637303199754547598369979440671 -// gas irOptimized: 130727 +// gas irOptimized: 130701 // gas legacy: 134936 // gas legacyOptimized: 130046 // f(uint256): 33 -> 0x20, 33, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x2000000000000000000000000000000000000000000000000000000000000000 -// gas irOptimized: 137726 +// gas irOptimized: 137700 // gas legacy: 141728 // gas legacyOptimized: 136711 // f(uint256): 63 -> 0x20, 0x3f, 1780731860627700044960722568376592200742329637303199754547598369979440671, 14532552714582660066924456880521368950258152170031413196862950297402215316992 -// gas irOptimized: 152346 +// gas irOptimized: 152320 // gas legacy: 159768 // gas legacyOptimized: 150641 // f(uint256): 12 -> 0x20, 0x0c, 0x0102030405060708090a0b0000000000000000000000000000000000000000 // gas legacy: 59345 // gas legacyOptimized: 57279 // f(uint256): 129 -> 0x20, 0x81, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f, 29063324697304692433803953038474361308315562010425523193971352996434451193439, 0x606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f, -57896044618658097711785492504343953926634992332820282019728792003956564819968 -// gas irOptimized: 406083 +// gas irOptimized: 406057 // gas legacy: 421067 // gas legacyOptimized: 402910 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 05f8bd2bf..855666819 100644 --- a/test/libsolidity/semanticTests/array/copying/copy_byte_array_in_struct_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/copy_byte_array_in_struct_to_storage.sol @@ -37,11 +37,11 @@ contract C { // compileViaYul: also // ---- // f() -> 0x40, 0x80, 6, 0x6162636465660000000000000000000000000000000000000000000000000000, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000 -// gas irOptimized: 179895 +// gas irOptimized: 179868 // gas legacy: 180676 // gas legacyOptimized: 180070 // g() -> 0x40, 0xc0, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000, 0x11, 0x3132333435363738393233343536373839000000000000000000000000000000 -// gas irOptimized: 107274 +// gas irOptimized: 107284 // gas legacy: 107877 // gas legacyOptimized: 107236 // h() -> 0x40, 0x60, 0x00, 0x00 diff --git a/test/libsolidity/semanticTests/array/copying/copy_function_internal_storage_array.sol b/test/libsolidity/semanticTests/array/copying/copy_function_internal_storage_array.sol index 4c223d30c..1f2b81286 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 @@ -18,6 +18,6 @@ contract C { // compileViaYul: also // ---- // test() -> 7 -// gas irOptimized: 124034 +// gas irOptimized: 124017 // gas legacy: 205196 // gas legacyOptimized: 204987 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 cf8023a2f..83f7f6e68 100644 --- a/test/libsolidity/semanticTests/array/copying/copy_removes_bytes_data.sol +++ b/test/libsolidity/semanticTests/array/copying/copy_removes_bytes_data.sol @@ -9,7 +9,7 @@ contract c { // compileViaYul: also // ---- // set(): 1, 2, 3, 4, 5 -> true -// gas irOptimized: 177386 +// gas irOptimized: 177394 // gas legacy: 177653 // gas legacyOptimized: 177493 // storageEmpty -> 0 diff --git a/test/libsolidity/semanticTests/array/delete/bytes_delete_element.sol b/test/libsolidity/semanticTests/array/delete/bytes_delete_element.sol index f6208ea6f..ac4e8e8e5 100644 --- a/test/libsolidity/semanticTests/array/delete/bytes_delete_element.sol +++ b/test/libsolidity/semanticTests/array/delete/bytes_delete_element.sol @@ -18,6 +18,6 @@ contract c { // compileViaYul: also // ---- // test1() -> true -// gas irOptimized: 225890 +// gas irOptimized: 225872 // gas legacy: 254650 // gas legacyOptimized: 247384 diff --git a/test/libsolidity/semanticTests/array/fixed_arrays_in_constructors.sol b/test/libsolidity/semanticTests/array/fixed_arrays_in_constructors.sol index 3f66dca6f..38555cac6 100644 --- a/test/libsolidity/semanticTests/array/fixed_arrays_in_constructors.sol +++ b/test/libsolidity/semanticTests/array/fixed_arrays_in_constructors.sol @@ -11,7 +11,7 @@ contract Creator { // compileViaYul: also // ---- // constructor(): 1, 2, 3, 4 -> -// gas irOptimized: 129013 +// gas irOptimized: 126637 // gas legacy: 176789 // gas legacyOptimized: 129585 // 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 087ecf0a8..8b5a0ff63 100644 --- a/test/libsolidity/semanticTests/array/function_array_cross_calls.sol +++ b/test/libsolidity/semanticTests/array/function_array_cross_calls.sol @@ -45,6 +45,6 @@ contract C { // compileViaYul: also // ---- // test() -> 5, 6, 7 -// gas irOptimized: 292502 +// gas irOptimized: 292696 // gas legacy: 452136 // gas legacyOptimized: 284945 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 fb05db350..7b9da1d74 100644 --- a/test/libsolidity/semanticTests/array/pop/byte_array_pop_masking_long.sol +++ b/test/libsolidity/semanticTests/array/pop/byte_array_pop_masking_long.sol @@ -12,6 +12,6 @@ contract c { // compileViaYul: also // ---- // test() -> 0x20, 33, 0x303030303030303030303030303030303030303030303030303030303030303, 0x0300000000000000000000000000000000000000000000000000000000000000 -// gas irOptimized: 108487 +// gas irOptimized: 108482 // gas legacy: 125610 // gas legacyOptimized: 122582 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 b8dbff46a..472b86bf5 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 @@ -11,7 +11,7 @@ contract c { // compileViaYul: also // ---- // (): 1, 2, 3, 4, 5 -> -// gas irOptimized: 155170 +// gas irOptimized: 155178 // gas legacy: 155249 // gas legacyOptimized: 155212 // checkIfDataIsEmpty() -> false diff --git a/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol b/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol index 82050efa2..a9d0a55f3 100644 --- a/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol +++ b/test/libsolidity/semanticTests/constructor/arrays_in_constructors.sol @@ -26,6 +26,6 @@ contract Creator { // compileViaYul: also // ---- // f(uint256,address[]): 7, 0x40, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 -> 7, 8 -// gas irOptimized: 437093 +// gas irOptimized: 437103 // gas legacy: 590683 // gas legacyOptimized: 448326 diff --git a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol index bdd5c6eb5..1a64c034d 100644 --- a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol +++ b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_packer.sol @@ -26,6 +26,6 @@ contract Creator { // compileViaYul: also // ---- // f(uint256,bytes): 7, 0x40, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" -> 7, "h" -// gas irOptimized: 293203 +// gas irOptimized: 290958 // gas legacy: 428711 // gas legacyOptimized: 297922 diff --git a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol index d0b3f64cb..9a1a21cdb 100644 --- a/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol +++ b/test/libsolidity/semanticTests/constructor/bytes_in_constructors_unpacker.sol @@ -10,7 +10,7 @@ contract Test { // compileViaYul: also // ---- // constructor(): 7, 0x40, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" -> -// gas irOptimized: 283829 +// gas irOptimized: 283772 // gas legacy: 309607 // gas legacyOptimized: 260566 // m_x() -> 7 diff --git a/test/libsolidity/semanticTests/constructor/constructor_arguments_external.sol b/test/libsolidity/semanticTests/constructor/constructor_arguments_external.sol index 701f4accb..3eaec4c3e 100644 --- a/test/libsolidity/semanticTests/constructor/constructor_arguments_external.sol +++ b/test/libsolidity/semanticTests/constructor/constructor_arguments_external.sol @@ -19,7 +19,7 @@ contract Main { // compileViaYul: also // ---- // constructor(): "abc", true -// gas irOptimized: 106683 +// gas irOptimized: 104517 // gas legacy: 145838 // gas legacyOptimized: 104017 // 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 0c38107cc..23725629d 100644 --- a/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol +++ b/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol @@ -12,7 +12,7 @@ contract C { // compileViaYul: also // ---- // constructor(): 1, 2, 3, 4 -> -// gas irOptimized: 174020 +// gas irOptimized: 172940 // gas legacy: 221377 // gas legacyOptimized: 177671 // a() -> 1 diff --git a/test/libsolidity/semanticTests/constructor_inheritance_init_order.sol b/test/libsolidity/semanticTests/constructor_inheritance_init_order.sol index 4f9984503..07f0019e4 100644 --- a/test/libsolidity/semanticTests/constructor_inheritance_init_order.sol +++ b/test/libsolidity/semanticTests/constructor_inheritance_init_order.sol @@ -15,5 +15,5 @@ contract B is A { // compileViaYul: true // ---- // constructor() -> -// gas irOptimized: 121557 +// gas irOptimized: 119613 // 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 a583bd39f..73055561c 100644 --- a/test/libsolidity/semanticTests/constructor_inheritance_init_order_2.sol +++ b/test/libsolidity/semanticTests/constructor_inheritance_init_order_2.sol @@ -12,7 +12,7 @@ contract B is A { // compileViaYul: also // ---- // constructor() -> -// gas irOptimized: 121557 +// gas irOptimized: 119613 // gas legacy: 135046 // gas legacyOptimized: 116176 // y() -> 42 diff --git a/test/libsolidity/semanticTests/constructor_with_params.sol b/test/libsolidity/semanticTests/constructor_with_params.sol index ca4cf5a05..c0bce56d2 100644 --- a/test/libsolidity/semanticTests/constructor_with_params.sol +++ b/test/libsolidity/semanticTests/constructor_with_params.sol @@ -11,7 +11,7 @@ contract C { // compileViaYul: also // ---- // constructor(): 2, 0 -> -// gas irOptimized: 103630 +// gas irOptimized: 101470 // gas legacy: 117158 // 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 3e9ae1ab2..7860a27c0 100644 --- a/test/libsolidity/semanticTests/constructor_with_params_diamond_inheritance.sol +++ b/test/libsolidity/semanticTests/constructor_with_params_diamond_inheritance.sol @@ -23,7 +23,7 @@ contract D is B, C { // compileViaYul: also // ---- // constructor(): 2, 0 -> -// gas irOptimized: 156071 +// gas irOptimized: 154775 // gas legacy: 170665 // gas legacyOptimized: 145396 // i() -> 2 diff --git a/test/libsolidity/semanticTests/constructor_with_params_inheritance.sol b/test/libsolidity/semanticTests/constructor_with_params_inheritance.sol index ede647d60..92bf64708 100644 --- a/test/libsolidity/semanticTests/constructor_with_params_inheritance.sol +++ b/test/libsolidity/semanticTests/constructor_with_params_inheritance.sol @@ -14,7 +14,7 @@ contract D is C { // compileViaYul: also // ---- // constructor(): 2, 0 -> -// gas irOptimized: 124199 +// gas irOptimized: 122039 // gas legacy: 139250 // gas legacyOptimized: 119367 // i() -> 2 diff --git a/test/libsolidity/semanticTests/events/event_indexed_string.sol b/test/libsolidity/semanticTests/events/event_indexed_string.sol index 5d3ad5840..e8aaf42d5 100644 --- a/test/libsolidity/semanticTests/events/event_indexed_string.sol +++ b/test/libsolidity/semanticTests/events/event_indexed_string.sol @@ -19,6 +19,6 @@ contract C { // ---- // deposit() -> // ~ emit E(string,uint256[4]): #0xa7fb06bb999a5eb9aff9e0779953f4e1e4ce58044936c2f51c7fb879b85c08bd, #0xe755d8cc1a8cde16a2a31160dcd8017ac32d7e2f13215b29a23cdae40a78aa81 -// gas irOptimized: 343396 +// gas irOptimized: 343391 // gas legacy: 388679 // gas legacyOptimized: 374441 diff --git a/test/libsolidity/semanticTests/externalContracts/base64.sol b/test/libsolidity/semanticTests/externalContracts/base64.sol index 7101af594..394e0d678 100644 --- a/test/libsolidity/semanticTests/externalContracts/base64.sol +++ b/test/libsolidity/semanticTests/externalContracts/base64.sol @@ -34,7 +34,7 @@ contract test { // compileViaYul: also // ---- // constructor() -// gas irOptimized: 443542 +// gas irOptimized: 442966 // gas legacy: 765640 // gas legacyOptimized: 541810 // encode_inline_asm(bytes): 0x20, 0 -> 0x20, 0 @@ -56,6 +56,6 @@ contract test { // gas legacy: 1652033 // gas legacyOptimized: 1201033 // encode_no_asm_large() -// gas irOptimized: 3335099 +// gas irOptimized: 3330099 // gas legacy: 4777077 // gas legacyOptimized: 2890077 diff --git a/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol b/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol index e45d3360e..a2dbc0587 100644 --- a/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol +++ b/test/libsolidity/semanticTests/externalContracts/prbmath_signed.sol @@ -50,7 +50,7 @@ contract test { // compileViaYul: also // ---- // constructor() -// gas irOptimized: 1926032 +// gas irOptimized: 1933635 // gas legacy: 2478955 // gas legacyOptimized: 1877737 // 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 c37fe52b5..72f4918e4 100644 --- a/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol +++ b/test/libsolidity/semanticTests/externalContracts/prbmath_unsigned.sol @@ -50,7 +50,7 @@ contract test { // compileViaYul: also // ---- // constructor() -// gas irOptimized: 1780841 +// gas irOptimized: 1785353 // gas legacy: 2248594 // gas legacyOptimized: 1749096 // 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 b1c4c0169..fb645fae7 100644 --- a/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol +++ b/test/libsolidity/semanticTests/externalContracts/ramanujan_pi.sol @@ -35,7 +35,7 @@ contract test { // compileViaYul: also // ---- // constructor() -// gas irOptimized: 455866 +// gas irOptimized: 457042 // gas legacy: 671453 // gas legacyOptimized: 480242 // prb_pi() -> 3141592656369545286 diff --git a/test/libsolidity/semanticTests/externalContracts/strings.sol b/test/libsolidity/semanticTests/externalContracts/strings.sol index ce582e7c9..7f60a0835 100644 --- a/test/libsolidity/semanticTests/externalContracts/strings.sol +++ b/test/libsolidity/semanticTests/externalContracts/strings.sol @@ -51,7 +51,7 @@ contract test { // compileViaYul: also // ---- // constructor() -// gas irOptimized: 691317 +// gas irOptimized: 692397 // gas legacy: 1127730 // gas legacyOptimized: 753807 // toSlice(string): 0x20, 11, "hello world" -> 11, 0xa0 @@ -71,6 +71,6 @@ contract test { // gas legacy: 31621 // gas legacyOptimized: 27914 // benchmark(string,bytes32): 0x40, 0x0842021, 8, "solidity" -> 0x2020 -// gas irOptimized: 2040019 +// gas irOptimized: 2040035 // gas legacy: 4356286 // gas legacyOptimized: 2268278 diff --git a/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting.sol b/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting.sol index 79c3adccb..ecba08bb4 100644 --- a/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting.sol +++ b/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting.sol @@ -25,7 +25,7 @@ contract C { // compileViaYul: also // ---- // constructor(), 1 ether -> -// gas irOptimized: 303935 +// gas irOptimized: 299393 // gas legacy: 464030 // gas legacyOptimized: 304049 // f(uint256): 0 -> FAILURE diff --git a/test/libsolidity/semanticTests/functionCall/failed_create.sol b/test/libsolidity/semanticTests/functionCall/failed_create.sol index 19fd10bf6..80c6bc9e0 100644 --- a/test/libsolidity/semanticTests/functionCall/failed_create.sol +++ b/test/libsolidity/semanticTests/functionCall/failed_create.sol @@ -18,7 +18,7 @@ contract C { // compileViaYul: also // ---- // constructor(), 20 wei -// gas irOptimized: 212583 +// gas irOptimized: 211485 // gas legacy: 294335 // gas legacyOptimized: 174279 // f(uint256): 20 -> 1370859564726510389319704988634906228201275401179 diff --git a/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol b/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol index 40de1b509..bbd2420c3 100644 --- a/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol +++ b/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol @@ -41,7 +41,7 @@ contract test { // compileViaYul: also // ---- // constructor(), 20 wei -> -// gas irOptimized: 270609 +// gas irOptimized: 269313 // gas legacy: 402654 // gas legacyOptimized: 274470 // 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 6b3f99dee..c3c79f3ea 100644 --- a/test/libsolidity/semanticTests/functionCall/gas_and_value_brace_syntax.sol +++ b/test/libsolidity/semanticTests/functionCall/gas_and_value_brace_syntax.sol @@ -40,7 +40,7 @@ contract test { // compileViaYul: also // ---- // constructor(), 20 wei -> -// gas irOptimized: 270609 +// gas irOptimized: 269313 // gas legacy: 402654 // gas legacyOptimized: 274470 // sendAmount(uint256): 5 -> 5 diff --git a/test/libsolidity/semanticTests/immutable/multi_creation.sol b/test/libsolidity/semanticTests/immutable/multi_creation.sol index a66c86027..c04866fcd 100644 --- a/test/libsolidity/semanticTests/immutable/multi_creation.sol +++ b/test/libsolidity/semanticTests/immutable/multi_creation.sol @@ -29,7 +29,7 @@ contract C { // compileViaYul: also // ---- // f() -> 3, 7, 5 -// gas irOptimized: 126136 +// gas irOptimized: 126110 // gas legacy: 151334 // gas legacyOptimized: 125166 // x() -> 7 diff --git a/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol b/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol index 2ce71c31f..b0763e86d 100644 --- a/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol +++ b/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol @@ -25,6 +25,6 @@ contract B { // compileViaYul: also // ---- // g() -> 42 -// gas irOptimized: 101944 +// gas irOptimized: 102341 // gas legacy: 185053 // gas legacyOptimized: 114598 diff --git a/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol b/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol index b38e9a6ad..64b590d38 100644 --- a/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol +++ b/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol @@ -42,7 +42,7 @@ contract Main { // compileViaYul: also // ---- // constructor(), 22 wei -> -// gas irOptimized: 277680 +// gas irOptimized: 274614 // gas legacy: 402045 // gas legacyOptimized: 266772 // getFlag() -> true 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 6613e471b..9e9b221ba 100644 --- a/test/libsolidity/semanticTests/salted_create/salted_create_with_value.sol +++ b/test/libsolidity/semanticTests/salted_create/salted_create_with_value.sol @@ -22,6 +22,6 @@ contract A { // compileViaYul: also // ---- // f(), 10 ether -> 3007, 3008, 3009 -// gas irOptimized: 271831 +// gas irOptimized: 271828 // gas legacy: 422501 // gas legacyOptimized: 287472 diff --git a/test/libsolidity/semanticTests/state/blockhash_basic.sol b/test/libsolidity/semanticTests/state/blockhash_basic.sol index 829a8695d..edff66563 100644 --- a/test/libsolidity/semanticTests/state/blockhash_basic.sol +++ b/test/libsolidity/semanticTests/state/blockhash_basic.sol @@ -14,7 +14,7 @@ contract C { // compileViaYul: also // ---- // constructor() -// gas irOptimized: 111584 +// gas irOptimized: 110072 // gas legacy: 155081 // gas legacyOptimized: 107997 // genesisHash() -> 0x3737373737373737373737373737373737373737373737373737373737373737 diff --git a/test/libsolidity/semanticTests/various/address_code.sol b/test/libsolidity/semanticTests/various/address_code.sol index 2adf31716..d999fed18 100644 --- a/test/libsolidity/semanticTests/various/address_code.sol +++ b/test/libsolidity/semanticTests/various/address_code.sol @@ -17,7 +17,7 @@ contract C { // compileViaYul: also // ---- // constructor() -> -// gas irOptimized: 192317 +// gas irOptimized: 191402 // gas legacy: 240889 // gas legacyOptimized: 155314 // initCode() -> 0x20, 0 diff --git a/test/libsolidity/semanticTests/various/destructuring_assignment.sol b/test/libsolidity/semanticTests/various/destructuring_assignment.sol index 23b6c9e58..9f227830f 100644 --- a/test/libsolidity/semanticTests/various/destructuring_assignment.sol +++ b/test/libsolidity/semanticTests/various/destructuring_assignment.sol @@ -36,6 +36,6 @@ contract C { // compileViaYul: also // ---- // f(bytes): 0x20, 0x5, "abcde" -> 0 -// gas irOptimized: 240662 +// gas irOptimized: 240656 // gas legacy: 240349 // gas legacyOptimized: 239673