solidity/test/libyul/yulOptimizerTests/unusedAssignEliminator/for_continue_2.yul
2021-11-23 14:58:04 +01:00

32 lines
556 B
Plaintext

{
let x
// Cannot be removed, because we might skip the loop
x := 1
for { } calldataload(0) { }
{
if callvalue() {
x := 2 // is preserved because of continue stmt below.
continue
}
x := 3
}
mstore(x, 0x42)
}
// ----
// step: unusedAssignEliminator
//
// {
// let x
// x := 1
// for { } calldataload(0) { }
// {
// if callvalue()
// {
// x := 2
// continue
// }
// x := 3
// }
// mstore(x, 0x42)
// }