aboutsummaryrefslogtreecommitdiffstats
path: root/test/libyul/yulOptimizerTests/fullSimplify/invariant.yul
blob: a8eedef129f5eed52344e312e06b9f2b673c53f2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{
    let a := calldataload(sub(7, 7))
    let b := sub(a, 0)
    // Below, `b` is not eliminated, because
    // we run CSE and then Simplify.
    // Elimination of `b` would require another
    // run of CSE afterwards.
    mstore(b, eq(calldataload(0), a))
}
// ----
// fullSimplify
// {
//     let a := calldataload(0)
//     let _4 := 0
//     let b := a
//     mstore(b, eq(calldataload(_4), a))
// }