aboutsummaryrefslogtreecommitdiffstats
path: root/test/libyul/yulOptimizerTests/fullInliner/pop_result.yul
blob: cd9e27467da5c7c218bb94278703b949afc2496f (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
// An earlier version of the inliner produced
// pop(...) statements and explicitly removed them.
// This used to test that they are removed.
{
    function f(a) -> x {
        let r := mul(a, a)
        x := add(r, r)
    }
    pop(add(f(7), 2))
}
// ----
// fullInliner
// {
//     {
//         let _1 := 2
//         let f_a := 7
//         let f_x
//         let f_r := mul(f_a, f_a)
//         f_x := add(f_r, f_r)
//         pop(add(f_x, _1))
//     }
//     function f(a) -> x
//     {
//         let r := mul(a, a)
//         x := add(r, r)
//     }
// }