solidity/test/libyul/yulOptimizerTests/rematerialiser/branches_switch.yul

24 lines
384 B
Plaintext
Raw Normal View History

2018-10-11 15:59:45 +00:00
{
let a := 1
let b := 2
switch number()
case 1 { b := a }
default { let x := a let y := b b := a }
pop(add(a, b))
}
2019-04-01 14:33:46 +00:00
// ====
// step: rematerialiser
2018-10-11 15:59:45 +00:00
// ----
// {
// let a := 1
// let b := 2
// switch number()
// case 1 { b := 1 }
2018-10-11 15:59:45 +00:00
// default {
// let x := 1
// let y := b
// b := 1
// }
// pop(add(1, b))
// }