aboutsummaryrefslogtreecommitdiffstats
path: root/test/libyul/yulOptimizerTests/redundantAssignEliminator/if.yul
blob: 958bfc6616971d09d942fbaba0eac8df163b6d7a (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 c
    let d
    c := calldataload(0)
    d := 1
    if c {
        d := 2
    }
    // This enforces that none of the assignments above can be removed.
    mstore(0, d)
}
// ----
// redundantAssignEliminator
// {
//     let c
//     let d
//     c := calldataload(0)
//     d := 1
//     if c
//     {
//         d := 2
//     }
//     mstore(0, d)
// }