summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/copy-prop/dead_stores_better.f.CopyProp.after.mir
blob: 727791f50a4ef67b0b15283df8ff7677ebbea1d5 (plain)
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
// MIR for `f` after CopyProp

fn f(_1: usize) -> usize {
    debug a => _1;                       // in scope 0 at $DIR/dead_stores_better.rs:+0:10: +0:15
    let mut _0: usize;                   // return place in scope 0 at $DIR/dead_stores_better.rs:+0:27: +0:32
    let _2: usize;                       // in scope 0 at $DIR/dead_stores_better.rs:+1:9: +1:10
    let mut _3: usize;                   // in scope 0 at $DIR/dead_stores_better.rs:+3:9: +3:10
    let mut _4: usize;                   // in scope 0 at $DIR/dead_stores_better.rs:+4:8: +4:9
    scope 1 {
        debug b => _2;                   // in scope 1 at $DIR/dead_stores_better.rs:+1:9: +1:10
    }

    bb0: {
        _2 = _1;                         // scope 0 at $DIR/dead_stores_better.rs:+1:13: +1:14
        _1 = const 5_usize;              // scope 1 at $DIR/dead_stores_better.rs:+2:5: +2:10
        _1 = _2;                         // scope 1 at $DIR/dead_stores_better.rs:+3:5: +3:10
        StorageLive(_4);                 // scope 1 at $DIR/dead_stores_better.rs:+4:8: +4:9
        _4 = _1;                         // scope 1 at $DIR/dead_stores_better.rs:+4:8: +4:9
        _0 = id::<usize>(move _4) -> bb1; // scope 1 at $DIR/dead_stores_better.rs:+4:5: +4:10
                                         // mir::Constant
                                         // + span: $DIR/dead_stores_better.rs:16:5: 16:7
                                         // + literal: Const { ty: fn(usize) -> usize {id::<usize>}, val: Value(<ZST>) }
    }

    bb1: {
        StorageDead(_4);                 // scope 1 at $DIR/dead_stores_better.rs:+4:9: +4:10
        return;                          // scope 0 at $DIR/dead_stores_better.rs:+5:2: +5:2
    }
}