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

24 lines
368 B
Plaintext
Raw Normal View History

2018-10-23 13:55:48 +00:00
{
let x
// Will be overwritten in all branches
x := 1
switch calldataload(0)
case 0 { x := 2 }
default { x := 3 }
mstore(x, 0)
}
2019-04-01 14:33:46 +00:00
// ====
// step: redundantAssignEliminator
2018-10-23 13:55:48 +00:00
// ----
// {
// let x
// switch calldataload(0)
// case 0 {
// x := 2
// }
// default {
// x := 3
// }
// mstore(x, 0)
// }