solidity/test/libyul/yulOptimizerTests/unusedAssignEliminator/if_overwrite_all_branches.yul

24 lines
364 B
Plaintext
Raw Normal View History

2018-10-23 13:55:48 +00:00
{
let c
let d
c := calldataload(0)
// This assignment will be overwritten in all branches and thus can be removed.
d := 1
if c {
d := 2
}
d := 3
mstore(0, d)
}
// ----
// step: redundantAssignEliminator
//
2018-10-23 13:55:48 +00:00
// {
// let c
// let d
// c := calldataload(0)
// if c { }
2018-10-23 13:55:48 +00:00
// d := 3
// mstore(0, d)
// }