solidity/test/libyul/yulOptimizerTests/redundantAssignEliminator/for_rerun.yul

25 lines
420 B
Plaintext
Raw Normal View History

2018-10-23 13:55:48 +00:00
{
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
}
2019-04-01 14:33:46 +00:00
// ====
// step: redundantAssignEliminator
2018-10-23 13:55:48 +00:00
// ----
// {
// let x
// x := 1
// for { } calldataload(0) { }
2018-10-23 13:55:48 +00:00
// {
// mstore(x, 2)
// x := 2
// }
// }