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

30 lines
526 B
Plaintext
Raw Normal View History

2019-12-02 11:33:24 +00:00
{
function f() -> x { x := g() }
function g() -> x { for {} 1 {} {} }
let b := 1
for { let a := 1 } iszero(eq(a, 10)) { a := add(a, 1) } {
let t := f()
let q := g()
}
}
// ----
// step: loopInvariantCodeMotion
//
2019-12-02 11:33:24 +00:00
// {
// let b := 1
// let a := 1
// for { } iszero(eq(a, 10)) { a := add(a, 1) }
// {
// let t := f()
// let q := g()
// }
// function f() -> x
// { x := g() }
// function g() -> x_1
// {
// for { } 1 { }
// { }
// }
2019-12-02 11:33:24 +00:00
// }