summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/pre-codegen/range_iter.range_iter_next.PreCodegen.after.panic-unwind.mir
blob: 61957082d8bb0522a5f03bcdb6aaa55cd44c8bcf (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// MIR for `range_iter_next` after PreCodegen

fn range_iter_next(_1: &mut std::ops::Range<u32>) -> Option<u32> {
    debug it => _1;
    let mut _0: std::option::Option<u32>;
    scope 1 (inlined iter::range::<impl Iterator for std::ops::Range<u32>>::next) {
        debug self => _1;
        scope 2 (inlined <std::ops::Range<u32> as iter::range::RangeIteratorImpl>::spec_next) {
            debug self => _1;
            let mut _4: bool;
            let _5: u32;
            let mut _6: u32;
            let mut _7: &u32;
            let mut _8: &u32;
            scope 3 {
                debug old => _5;
                scope 4 {
                }
            }
            scope 5 (inlined cmp::impls::<impl PartialOrd for u32>::lt) {
                debug self => _7;
                debug other => _8;
                let mut _2: u32;
                let mut _3: u32;
            }
        }
    }

    bb0: {
        StorageLive(_5);
        StorageLive(_4);
        StorageLive(_7);
        StorageLive(_8);
        StorageLive(_2);
        _2 = ((*_1).0: u32);
        StorageLive(_3);
        _3 = ((*_1).1: u32);
        _4 = Lt(move _2, move _3);
        StorageDead(_3);
        StorageDead(_2);
        StorageDead(_8);
        StorageDead(_7);
        switchInt(move _4) -> [0: bb1, otherwise: bb2];
    }

    bb1: {
        _0 = Option::<u32>::None;
        goto -> bb4;
    }

    bb2: {
        _5 = ((*_1).0: u32);
        StorageLive(_6);
        _6 = <u32 as Step>::forward_unchecked(_5, const 1_usize) -> [return: bb3, unwind continue];
    }

    bb3: {
        ((*_1).0: u32) = move _6;
        StorageDead(_6);
        _0 = Option::<u32>::Some(_5);
        goto -> bb4;
    }

    bb4: {
        StorageDead(_4);
        StorageDead(_5);
        return;
    }
}