aboutsummaryrefslogtreecommitdiffstats
path: root/test/libjulia/yulOptimizerTests/expressionJoiner/switch_expression.yul
blob: 0e4e540e1a7250ef64e9c8cd000fbf23340a184d (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
25
26
27
28
{
    let a := mload(3)
    let b := sload(a)
    let c := mload(7)
    let d := add(c, b)
    switch d
    case 3 {
        let x := mload(3)
        let y := add(x, 3)
    }
    default {
        sstore(1, 0)
    }
    let z := 3
    let t := add(z, 9)
}
// ----
// expressionJoiner
// {
//     switch add(mload(7), sload(mload(3)))
//     case 3 {
//         let y := add(mload(3), 3)
//     }
//     default {
//         sstore(1, 0)
//     }
//     let t := add(3, 9)
// }