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

25 lines
412 B
Plaintext

{
let x
// Cannot be removed, because we might run the loop only once
x := 1
for { } calldataload(0) { }
{
mstore(x, 2)
// Cannot be removed because of the line above
x := 2
}
x := 3
}
// ----
// step: unusedAssignEliminator
//
// {
// let x
// x := 1
// for { } calldataload(0) { }
// {
// mstore(x, 2)
// x := 2
// }
// }