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

21 lines
361 B
Plaintext
Raw Normal View History

2018-10-23 13:55:48 +00:00
{
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)
}
// ----
2021-11-23 09:42:18 +00:00
// step: unusedAssignEliminator
//
2018-10-23 13:55:48 +00:00
// {
// let x
// x := 1
// switch calldataload(0)
// case 0 { x := 2 }
// default { mstore(x, 1) }
2018-10-23 13:55:48 +00:00
// mstore(x, 0)
// }