aboutsummaryrefslogtreecommitdiffstats
path: root/test/libyul/yulOptimizerTests/fullInliner/inside_condition.yul
blob: ae25e9a3e135d7c31c2c127cb45e51cf645b71c6 (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
29
30
31
32
// This tests that breaking the expression inside the condition works properly.
{
    if gt(f(mload(1)), mload(0)) {
        sstore(0, 2)
    }
    function f(a) -> r {
        a := mload(a)
        r := add(a, calldatasize())
    }
}
// ----
// fullInliner
// {
//     {
//         let _1 := mload(0)
//         let f_a := mload(1)
//         let f_r
//         {
//             f_a := mload(f_a)
//             f_r := add(f_a, calldatasize())
//         }
//         if gt(f_r, _1)
//         {
//             sstore(0, 2)
//         }
//     }
//     function f(a) -> r
//     {
//         a := mload(a)
//         r := add(a, calldatasize())
//     }
// }