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

20 lines
324 B
Plaintext

{
let x
// Will be overwritten in all branches
x := 1
switch calldataload(0)
case 0 { x := 2 }
default { x := 3 }
mstore(x, 0)
}
// ----
// step: unusedAssignEliminator
//
// {
// let x
// switch calldataload(0)
// case 0 { x := 2 }
// default { x := 3 }
// mstore(x, 0)
// }