Optimize eq iszero jumpi to xor jumpi and remove double jump.

This commit is contained in:
chriseth
2022-03-10 14:41:41 +01:00
parent 2b201f21a1
commit b3fe042884
101 changed files with 312 additions and 253 deletions
@@ -18,6 +18,6 @@ contract C {
// compileViaYul: also
// ----
// f(uint32,(uint128,uint256[][2],uint32)): 55, 0x40, 77, 0x60, 88, 0x40, 0x40, 2, 1, 2 -> 55, 77, 1, 2, 88
// gas irOptimized: 203312
// gas irOptimized: 203303
// gas legacy: 209194
// gas legacyOptimized: 203583
@@ -88,7 +88,7 @@ contract Test {
// compileViaYul: also
// ----
// test1() -> true
// gas irOptimized: 150545
// gas irOptimized: 150533
// gas legacy: 150266
// gas legacyOptimized: 149875
// test2() -> true
@@ -26,8 +26,8 @@ contract c {
// storageEmpty -> 1
// set(uint256,bytes,uint256): 12, 0x60, 13, 33, "12345678901234567890123456789012", "3" -> true
// gas irOptimized: 133728
// gas legacy: 134436
// gas legacyOptimized: 133879
// gas legacy: 134433
// gas legacyOptimized: 133876
// test(uint256): 32 -> "3"
// storageEmpty -> 0
// copy() -> true
@@ -43,7 +43,7 @@ contract c {
// gas legacyOptimized: 110006
// retrieve(uint256): 7 -> 1, 3, 4, 2
// copy(uint256,uint256): 7, 8 -> true
// gas irOptimized: 118597
// gas irOptimized: 118591
// gas legacy: 119166
// gas legacyOptimized: 118622
// retrieve(uint256): 7 -> 1, 3, 4, 2