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

33 lines
469 B
Plaintext
Raw Normal View History

2018-10-23 13:55:48 +00:00
{
let x
let y
// Cannot be removed, because we might skip the loop
x := 1
for { } calldataload(0) { }
{
// Cannot be removed
x := 2
// Can be removed
y := 3
}
y := 8
mstore(x, 0)
}
2019-04-01 14:33:46 +00:00
// ====
// step: redundantAssignEliminator
2018-10-23 13:55:48 +00:00
// ----
// {
// let x
// let y
// x := 1
// for {
// }
// calldataload(0)
// {
// }
// {
// x := 2
// }
// mstore(x, 0)
// }