aboutsummaryrefslogtreecommitdiffstats
path: root/test/libjulia/yulOptimizerTests/rematerialiser/branches_switch.yul
blob: 8f70a79d93b7aaab0b1aa8b0da9584eeff931b7a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
    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))
}
// ----
// rematerialiser
// {
//     let a := 1
//     let b := 2
//     switch number()
//     case 1 {
//         b := 1
//     }
//     default {
//         let x := 1
//         let y := b
//         b := 1
//     }
//     pop(add(1, b))
// }