aboutsummaryrefslogtreecommitdiffstats
path: root/test/libjulia/yulOptimizerTests/expressionSplitter/inside_function.yul
blob: 8623f15d355231552a7219bcececf50092ee8ee1 (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 x := mul(f(0, mload(7)), 3)
    function f(a, b) -> c {
        c := mul(a, mload(add(b, c)))
    }
    sstore(x, f(mload(2), mload(2)))
}
// ----
// expressionSplitter
// {
//     let _1 := mload(7)
//     let _2 := f(0, _1)
//     let x := mul(_2, 3)
//     function f(a, b) -> c
//     {
//         let _3 := add(b, c)
//         let _4 := mload(_3)
//         c := mul(a, _4)
//     }
//     let _5 := mload(2)
//     let _6 := mload(2)
//     let _7 := f(_6, _5)
//     sstore(x, _7)
// }