solidity/test/libyul/yulOptimizerTests/loopInvariantCodeMotion/no_move_state_recursive_function.yul

27 lines
524 B
Plaintext
Raw Normal View History

2020-07-03 14:20:27 +00:00
{
function f() -> x { x := g() }
function g() -> x { x := g() }
let b := 1
for { let a := 1 } iszero(eq(a, 10)) { a := add(a, 1) } {
let t := extcodesize(f())
let q := sload(g())
}
}
// ----
// step: loopInvariantCodeMotion
//
// {
// function f() -> x
// { x := g() }
// function g() -> x_1
// { x_1 := g() }
// let b := 1
// let a := 1
// for { } iszero(eq(a, 10)) { a := add(a, 1) }
// {
// let t := extcodesize(f())
// let q := sload(g())
// }
// }