summary refs log tree commit diff
path: root/src/test/mir-opt/while-storage/rustc.while_loop.PreCodegen.after.mir
blob: 0ac7989166ee04d7d6cac2e60e9f441d64ed91aa (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
71
72
73
74
75
76
77
78
79
80
// MIR for `while_loop` after PreCodegen

fn while_loop(_1: bool) -> () {
    debug c => _1;                       // in scope 0 at $DIR/while-storage.rs:9:15: 9:16
    let mut _0: ();                      // return place in scope 0 at $DIR/while-storage.rs:9:24: 9:24
    let mut _2: bool;                    // in scope 0 at $DIR/while-storage.rs:10:11: 10:22
    let mut _3: bool;                    // in scope 0 at $DIR/while-storage.rs:10:20: 10:21
    let mut _4: bool;                    // in scope 0 at $DIR/while-storage.rs:11:12: 11:23
    let mut _5: bool;                    // in scope 0 at $DIR/while-storage.rs:11:21: 11:22

    bb0: {
        StorageLive(_2);                 // bb0[0]: scope 0 at $DIR/while-storage.rs:10:11: 10:22
        StorageLive(_3);                 // bb0[1]: scope 0 at $DIR/while-storage.rs:10:20: 10:21
        _3 = _1;                         // bb0[2]: scope 0 at $DIR/while-storage.rs:10:20: 10:21
        _2 = const get_bool(move _3) -> bb1; // bb0[3]: scope 0 at $DIR/while-storage.rs:10:11: 10:22
                                         // ty::Const
                                         // + ty: fn(bool) -> bool {get_bool}
                                         // + val: Value(Scalar(<ZST>))
                                         // mir::Constant
                                         // + span: $DIR/while-storage.rs:10:11: 10:19
                                         // + literal: Const { ty: fn(bool) -> bool {get_bool}, val: Value(Scalar(<ZST>)) }
    }

    bb1: {
        StorageDead(_3);                 // bb1[0]: scope 0 at $DIR/while-storage.rs:10:21: 10:22
        switchInt(_2) -> [false: bb2, otherwise: bb3]; // bb1[1]: scope 0 at $DIR/while-storage.rs:10:5: 14:6
    }

    bb2: {
        _0 = const ();                   // bb2[0]: scope 0 at $DIR/while-storage.rs:10:5: 14:6
                                         // ty::Const
                                         // + ty: ()
                                         // + val: Value(Scalar(<ZST>))
                                         // mir::Constant
                                         // + span: $DIR/while-storage.rs:10:5: 14:6
                                         // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
        goto -> bb7;                     // bb2[1]: scope 0 at $DIR/while-storage.rs:10:5: 14:6
    }

    bb3: {
        StorageLive(_4);                 // bb3[0]: scope 0 at $DIR/while-storage.rs:11:12: 11:23
        StorageLive(_5);                 // bb3[1]: scope 0 at $DIR/while-storage.rs:11:21: 11:22
        _5 = _1;                         // bb3[2]: scope 0 at $DIR/while-storage.rs:11:21: 11:22
        _4 = const get_bool(move _5) -> bb4; // bb3[3]: scope 0 at $DIR/while-storage.rs:11:12: 11:23
                                         // ty::Const
                                         // + ty: fn(bool) -> bool {get_bool}
                                         // + val: Value(Scalar(<ZST>))
                                         // mir::Constant
                                         // + span: $DIR/while-storage.rs:11:12: 11:20
                                         // + literal: Const { ty: fn(bool) -> bool {get_bool}, val: Value(Scalar(<ZST>)) }
    }

    bb4: {
        StorageDead(_5);                 // bb4[0]: scope 0 at $DIR/while-storage.rs:11:22: 11:23
        switchInt(_4) -> [false: bb5, otherwise: bb6]; // bb4[1]: scope 0 at $DIR/while-storage.rs:11:9: 13:10
    }

    bb5: {
        StorageDead(_4);                 // bb5[0]: scope 0 at $DIR/while-storage.rs:14:5: 14:6
        StorageDead(_2);                 // bb5[1]: scope 0 at $DIR/while-storage.rs:10:21: 10:22
        goto -> bb0;                     // bb5[2]: scope 0 at $DIR/while-storage.rs:10:5: 14:6
    }

    bb6: {
        _0 = const ();                   // bb6[0]: scope 0 at $DIR/while-storage.rs:12:13: 12:18
                                         // ty::Const
                                         // + ty: ()
                                         // + val: Value(Scalar(<ZST>))
                                         // mir::Constant
                                         // + span: $DIR/while-storage.rs:12:13: 12:18
                                         // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
        StorageDead(_4);                 // bb6[1]: scope 0 at $DIR/while-storage.rs:14:5: 14:6
        goto -> bb7;                     // bb6[2]: scope 0 at $DIR/while-storage.rs:12:13: 12:18
    }

    bb7: {
        StorageDead(_2);                 // bb7[0]: scope 0 at $DIR/while-storage.rs:10:21: 10:22
        return;                          // bb7[1]: scope 0 at $DIR/while-storage.rs:15:2: 15:2
    }
}