Skip to content

Commit

Permalink
eof: Update yulOptimizerTests tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodiazet committed Dec 13, 2024
1 parent 8d02ea2 commit 658f91a
Show file tree
Hide file tree
Showing 47 changed files with 81 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
}
mstore(1, codesize())
}
// ====
// bytecodeFormat: legacy
// ----
// step: commonSubexpressionEliminator
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ object "AccessControlDefaultAdminRules4233_14" {
data "AccessControlDefaultAdminRules4233_14_deployed" "AccessControlDefaultAdminRules4233_14_deployed"

}
// ====
// bytecodeFormat: legacy
// ----
// step: commonSubexpressionEliminator
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
let a := gas()
let b := gas()
}
// ====
// bytecodeFormat: legacy
// ----
// step: commonSubexpressionEliminator
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ object "main" {
}
data "abc" "Hello, World!"
}
// ====
// bytecodeFormat: legacy
// ----
// step: commonSubexpressionEliminator
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
let a := mul(1, codesize())
let b := mul(1, codesize())
}
// ====
// bytecodeFormat: legacy
// ----
// step: commonSubexpressionEliminator
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ object "A" {
}
data 'abc' "1234"
}
// ====
// bytecodeFormat: legacy
// ----
// step: disambiguator
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
}
// ====
// EVMVersion: >=byzantium
// bytecodeFormat: legacy
// ----
// step: equalStoreEliminator
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
}
// ====
// EVMVersion: >=byzantium
// bytecodeFormat: legacy
// ----
// step: equalStoreEliminator
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
}
// ====
// EVMVersion: >=byzantium
// bytecodeFormat: legacy
// ----
// step: equalStoreEliminator
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ object "test"
data 'A' "A"
}

// ====
// bytecodeFormat: legacy
// ----
// step: equivalentFunctionCombiner
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
}
// ====
// EVMVersion: >=constantinople
// bytecodeFormat: legacy
// ----
// step: expressionSimplifier
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
let b := and(0xffffffffffffffffffffffffffffffffffffffff, create(0, 0, 0x20))
sstore(a, b)
}
// ====
// bytecodeFormat: legacy
// ----
// step: expressionSimplifier
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
sstore(9, c)
sstore(10, d)
}
// ====
// bytecodeFormat: legacy
// ----
// step: expressionSimplifier
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
}
// ====
// EVMVersion: >=constantinople
// bytecodeFormat: legacy
// ----
// step: expressionSimplifier
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
}
// ====
// EVMVersion: >byzantium
// bytecodeFormat: legacy
// ----
// step: expressionSimplifier
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
return(calldataload(3), 0)
codecopy(calldataload(4), calldataload(5), sub(42,42))
}
// ====
// bytecodeFormat: legacy
// ----
// step: expressionSimplifier
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ object "main" {
}
data "abc" "Hello, World!"
}
// ====
// bytecodeFormat: legacy
// ----
// step: expressionSplitter
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
let a := div(create(0, 0, 0), 0)
mstore(0, a)
}
// ====
// bytecodeFormat: legacy
// ----
// step: fullSimplify
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
}
f(call(2, 0, 1, mod(x, 8), 1, 1, 1))
}
// ====
// bytecodeFormat: legacy
// ----
// step: fullSimplify
//
Expand Down
1 change: 1 addition & 0 deletions test/libyul/yulOptimizerTests/fullSuite/aztec.yul
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@
}
// ====
// EVMVersion: >=istanbul
// bytecodeFormat: legacy
// ----
// step: fullSuite
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
}
// ====
// EVMVersion: >=shanghai
// bytecodeFormat: legacy
// ----
// step: fullSuite
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
}
// ====
// EVMVersion: >=istanbul
// bytecodeFormat: legacy
// ----
// step: fullSuite
//
Expand Down
1 change: 1 addition & 0 deletions test/libyul/yulOptimizerTests/fullSuite/extcodelength.yul
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
}
// ====
// EVMVersion: >byzantium
// bytecodeFormat: legacy
// ----
// step: fullSuite
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
}
// ====
// EVMVersion: >homestead
// bytecodeFormat: legacy
// ----
// step: fullSuite
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
if iszero(out1) { leave }
}
}
// ====
// bytecodeFormat: legacy
// ----
// step: fullSuite
//
Expand Down
2 changes: 2 additions & 0 deletions test/libyul/yulOptimizerTests/loadResolver/keccak_crash.yul
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
{
for {} addmod(keccak256(0x0,create(0x0, 0x0, 0x0)), 0x0, 0x0) {} {}
}
// ====
// bytecodeFormat: legacy
// ----
// step: loadResolver
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

function g() {}
}
// ====
// bytecodeFormat: legacy
// ----
// step: loadResolver
//
Expand Down
1 change: 1 addition & 0 deletions test/libyul/yulOptimizerTests/loadResolver/staticcall.yul
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
}
// ====
// EVMVersion: >=byzantium
// bytecodeFormat: legacy
// ----
// step: loadResolver
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
}
// ====
// EVMVersion: >=constantinople
// bytecodeFormat: legacy
// ----
// step: loadResolver
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
sstore(a, inv)
}
}
// ====
// bytecodeFormat: legacy
// ----
// step: loopInvariantCodeMotion
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
let z := f()
}
}
// ====
// bytecodeFormat: legacy
// ----
// step: loopInvariantCodeMotion
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
let q := g()
}
}
// ====
// bytecodeFormat: legacy
// ----
// step: loopInvariantCodeMotion
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
let e := sload(g())
}
}
// ====
// bytecodeFormat: legacy
// ----
// step: loopInvariantCodeMotion
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
mstore(a, inv)
}
}
// ====
// bytecodeFormat: legacy
// ----
// step: loopInvariantCodeMotion
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
a := add(x, 1)
}
}
// ====
// bytecodeFormat: legacy
// ----
// step: loopInvariantCodeMotion
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
}

}
// ====
// bytecodeFormat: legacy
// ----
// step: loopInvariantCodeMotion
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
let q := sload(g())
}
}
// ====
// bytecodeFormat: legacy
// ----
// step: loopInvariantCodeMotion
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
let q := g()
}
}
// ====
// bytecodeFormat: legacy
// ----
// step: loopInvariantCodeMotion
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
let q := sload(g())
}
}
// ====
// bytecodeFormat: legacy
// ----
// step: loopInvariantCodeMotion
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
}
}
// ====
// bytecodeFormat: legacy
// ====
// EVMVersion: >=byzantium
// ----
// step: loopInvariantCodeMotion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
}

}
// ====
// bytecodeFormat: legacy
// ----
// step: loopInvariantCodeMotion
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
mstore(a, inv)
}
}
// ====
// bytecodeFormat: legacy
// ----
// step: loopInvariantCodeMotion
//
Expand Down
2 changes: 2 additions & 0 deletions test/libyul/yulOptimizerTests/rematerialiser/reassign.yul
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
let d := add(b, c)
pop(a) pop(b) pop(c) pop(d)
}
// ====
// bytecodeFormat: legacy
// ----
// step: rematerialiser
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
a := mul(a, 2)
let b := a
}
// ====
// bytecodeFormat: legacy
// ----
// step: rematerialiser
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
sstore(0, mload(0))
}

// ====
// bytecodeFormat: legacy
// ----
// step: unusedStoreEliminator
//
Expand Down
Loading

0 comments on commit 658f91a

Please sign in to comment.