solidity/test/libyul/yulOptimizerTests/conditionalSimplifier/clear_before_for_post.yul
2019-11-01 14:01:56 +01:00

24 lines
419 B
Plaintext

{
let x
for {} x { sstore(1, x) } {
if x { continue }
// x is 0 here, but should not be 0
// anymore in the for loop post block
sstore(0, x)
}
sstore(0, x)
}
// ====
// step: conditionalSimplifier
// ----
// {
// let x
// for { } x { sstore(1, x) }
// {
// if x { continue }
// x := 0
// sstore(0, x)
// }
// sstore(0, x)
// }