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

29 lines
535 B
Plaintext

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