summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/building/while_storage.while_loop.PreCodegen.after.panic-abort.mir
blob: 26c82edf2d5fd04fbd809bbc3862a451e95ed0a8 (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
70
// MIR for `while_loop` after PreCodegen

fn while_loop(_1: bool) -> () {
    debug c => _1;
    let mut _0: ();
    let mut _2: bool;
    let mut _3: bool;
    let mut _4: bool;
    let mut _5: bool;
    let mut _6: ();
    let mut _7: !;
    let mut _8: !;
    let _9: ();
    let mut _10: !;

    bb0: {
        goto -> bb1;
    }

    bb1: {
        StorageLive(_3);
        StorageLive(_2);
        _2 = _1;
        _3 = get_bool(move _2) -> [return: bb2, unwind unreachable];
    }

    bb2: {
        switchInt(move _3) -> [0: bb3, otherwise: bb4];
    }

    bb3: {
        StorageDead(_2);
        StorageLive(_9);
        _0 = const ();
        StorageDead(_9);
        goto -> bb8;
    }

    bb4: {
        StorageDead(_2);
        StorageLive(_5);
        StorageLive(_4);
        _4 = _1;
        _5 = get_bool(move _4) -> [return: bb5, unwind unreachable];
    }

    bb5: {
        switchInt(move _5) -> [0: bb6, otherwise: bb7];
    }

    bb6: {
        StorageDead(_4);
        _6 = const ();
        StorageDead(_5);
        StorageDead(_3);
        goto -> bb1;
    }

    bb7: {
        StorageDead(_4);
        _0 = const ();
        StorageDead(_5);
        goto -> bb8;
    }

    bb8: {
        StorageDead(_3);
        return;
    }
}