solidity/test/libyul/yulOptimizerTests/loopInvariantCodeMotion/no_move_storage_loop.yul
Harikrishnan Mulackal bbf15c9af3 Tests and Changelog
2020-08-19 12:41:29 +02:00

26 lines
481 B
Plaintext

{
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 := sload(f())
}
}
// ----
// step: loopInvariantCodeMotion
//
// {
// function f() -> x
// { x := g() }
// function g() -> x_1
// {
// for { } 1 { }
// { }
// }
// let b := 1
// let a := 1
// for { } iszero(eq(a, 10)) { a := add(a, 1) }
// { let t := sload(f()) }
// }