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

21 lines
361 B
Plaintext

{
let x
// Will be used in some and overwritten in others
x := 1
switch calldataload(0)
case 0 { x := 2 }
default { mstore(x, 1) }
mstore(x, 0)
}
// ----
// step: unusedAssignEliminator
//
// {
// let x
// x := 1
// switch calldataload(0)
// case 0 { x := 2 }
// default { mstore(x, 1) }
// mstore(x, 0)
// }