]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.mir.32bit
Fix font color for help button in ayu and dark themes
[rust.git] / src / test / mir-opt / nll / region_subtyping_basic.main.nll.0.mir.32bit
1 // MIR for `main` 0 nll
2
3 | Free Region Mapping
4 | '_#0r | Global | ['_#0r, '_#1r]
5 | '_#1r | Local | ['_#1r]
6 |
7 | Inferred Region Values
8 | '_#0r | U0 | {bb0[0..=8], bb1[0], bb2[0..=8], bb3[0], bb4[0..=1], bb5[0..=3], bb6[0..=3], bb7[0..=2], bb8[0..=5], '_#0r, '_#1r}
9 | '_#1r | U0 | {bb0[0..=8], bb1[0], bb2[0..=8], bb3[0], bb4[0..=1], bb5[0..=3], bb6[0..=3], bb7[0..=2], bb8[0..=5], '_#1r}
10 | '_#2r | U0 | {}
11 | '_#3r | U0 | {bb2[0..=8], bb3[0], bb5[0..=2]}
12 | '_#4r | U0 | {bb2[1..=8], bb3[0], bb5[0..=2]}
13 | '_#5r | U0 | {bb2[4..=8], bb3[0], bb5[0..=2]}
14 |
15 | Inference Constraints
16 | '_#0r live at {bb0[0..=8], bb1[0], bb2[0..=8], bb3[0], bb4[0..=1], bb5[0..=3], bb6[0..=3], bb7[0..=2], bb8[0..=5]}
17 | '_#1r live at {bb0[0..=8], bb1[0], bb2[0..=8], bb3[0], bb4[0..=1], bb5[0..=3], bb6[0..=3], bb7[0..=2], bb8[0..=5]}
18 | '_#3r live at {bb2[0]}
19 | '_#4r live at {bb2[1..=3]}
20 | '_#5r live at {bb2[4..=8], bb3[0], bb5[0..=2]}
21 | '_#3r: '_#4r due to Assignment at Single(bb2[0])
22 | '_#4r: '_#5r due to Assignment at Single(bb2[3])
23 |
24 fn main() -> () {
25     let mut _0: ();                      // return place in scope 0 at $DIR/region-subtyping-basic.rs:16:11: 16:11
26     let mut _1: [usize; Const { ty: usize, val: Value(Scalar(0x00000003)) }]; // in scope 0 at $DIR/region-subtyping-basic.rs:17:9: 17:14
27     let _3: usize;                       // in scope 0 at $DIR/region-subtyping-basic.rs:18:16: 18:17
28     let mut _4: usize;                   // in scope 0 at $DIR/region-subtyping-basic.rs:18:14: 18:18
29     let mut _5: bool;                    // in scope 0 at $DIR/region-subtyping-basic.rs:18:14: 18:18
30     let mut _7: bool;                    // in scope 0 at $DIR/region-subtyping-basic.rs:20:8: 20:12
31     let _8: bool;                        // in scope 0 at $DIR/region-subtyping-basic.rs:21:9: 21:18
32     let mut _9: usize;                   // in scope 0 at $DIR/region-subtyping-basic.rs:21:15: 21:17
33     let _10: bool;                       // in scope 0 at $DIR/region-subtyping-basic.rs:23:9: 23:18
34     scope 1 {
35         debug v => _1;                   // in scope 1 at $DIR/region-subtyping-basic.rs:17:9: 17:14
36         let _2: &'_#4r usize;            // in scope 1 at $DIR/region-subtyping-basic.rs:18:9: 18:10
37         scope 2 {
38             debug p => _2;               // in scope 2 at $DIR/region-subtyping-basic.rs:18:9: 18:10
39             let _6: &'_#5r usize;        // in scope 2 at $DIR/region-subtyping-basic.rs:19:9: 19:10
40             scope 3 {
41                 debug q => _6;           // in scope 3 at $DIR/region-subtyping-basic.rs:19:9: 19:10
42             }
43         }
44     }
45
46     bb0: {
47         StorageLive(_1);                 // bb0[0]: scope 0 at $DIR/region-subtyping-basic.rs:17:9: 17:14
48         _1 = [const Const(Value(Scalar(0x00000001)): usize), const Const(Value(Scalar(0x00000002)): usize), const Const(Value(Scalar(0x00000003)): usize)]; // bb0[1]: scope 0 at $DIR/region-subtyping-basic.rs:17:17: 17:26
49         FakeRead(ForLet, _1);            // bb0[2]: scope 0 at $DIR/region-subtyping-basic.rs:17:9: 17:14
50         StorageLive(_2);                 // bb0[3]: scope 1 at $DIR/region-subtyping-basic.rs:18:9: 18:10
51         StorageLive(_3);                 // bb0[4]: scope 1 at $DIR/region-subtyping-basic.rs:18:16: 18:17
52         _3 = const Const(Value(Scalar(0x00000000)): usize); // bb0[5]: scope 1 at $DIR/region-subtyping-basic.rs:18:16: 18:17
53         _4 = Len(_1);                    // bb0[6]: scope 1 at $DIR/region-subtyping-basic.rs:18:14: 18:18
54         _5 = Lt(_3, _4);                 // bb0[7]: scope 1 at $DIR/region-subtyping-basic.rs:18:14: 18:18
55         assert(move _5, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> [success: bb2, unwind: bb1]; // bb0[8]: scope 1 at $DIR/region-subtyping-basic.rs:18:14: 18:18
56     }
57
58     bb1 (cleanup): {
59         resume;                          // bb1[0]: scope 0 at $DIR/region-subtyping-basic.rs:16:1: 25:2
60     }
61
62     bb2: {
63         _2 = &'_#3r _1[_3];              // bb2[0]: scope 1 at $DIR/region-subtyping-basic.rs:18:13: 18:18
64         FakeRead(ForLet, _2);            // bb2[1]: scope 1 at $DIR/region-subtyping-basic.rs:18:9: 18:10
65         StorageLive(_6);                 // bb2[2]: scope 2 at $DIR/region-subtyping-basic.rs:19:9: 19:10
66         _6 = _2;                         // bb2[3]: scope 2 at $DIR/region-subtyping-basic.rs:19:13: 19:14
67         FakeRead(ForLet, _6);            // bb2[4]: scope 2 at $DIR/region-subtyping-basic.rs:19:9: 19:10
68         StorageLive(_7);                 // bb2[5]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12
69         _7 = const Const(Value(Scalar(0x01)): bool); // bb2[6]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12
70         FakeRead(ForMatchedPlace, _7);   // bb2[7]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12
71         switchInt(_7) -> [Const(Value(Scalar(0x00)): bool): bb4, otherwise: bb3]; // bb2[8]: scope 3 at $DIR/region-subtyping-basic.rs:20:5: 24:6
72     }
73
74     bb3: {
75         falseEdge -> [real: bb5, imaginary: bb4]; // bb3[0]: scope 3 at $DIR/region-subtyping-basic.rs:20:5: 24:6
76     }
77
78     bb4: {
79         StorageLive(_10);                // bb4[0]: scope 3 at $DIR/region-subtyping-basic.rs:23:9: 23:18
80         _10 = const Const(Value(Scalar(<ZST>)): fn(usize) -> bool {use_x})(const Const(Value(Scalar(0x00000016)): usize)) -> [return: bb7, unwind: bb1]; // bb4[1]: scope 3 at $DIR/region-subtyping-basic.rs:23:9: 23:18
81                                          // ty::Const
82                                          // + ty: fn(usize) -> bool {use_x}
83                                          // + val: Value(Scalar(<ZST>))
84                                          // mir::Constant
85                                          // + span: $DIR/region-subtyping-basic.rs:23:9: 23:14
86                                          // + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value(Scalar(<ZST>)) }
87     }
88
89     bb5: {
90         StorageLive(_8);                 // bb5[0]: scope 3 at $DIR/region-subtyping-basic.rs:21:9: 21:18
91         StorageLive(_9);                 // bb5[1]: scope 3 at $DIR/region-subtyping-basic.rs:21:15: 21:17
92         _9 = (*_6);                      // bb5[2]: scope 3 at $DIR/region-subtyping-basic.rs:21:15: 21:17
93         _8 = const Const(Value(Scalar(<ZST>)): fn(usize) -> bool {use_x})(move _9) -> [return: bb6, unwind: bb1]; // bb5[3]: scope 3 at $DIR/region-subtyping-basic.rs:21:9: 21:18
94                                          // ty::Const
95                                          // + ty: fn(usize) -> bool {use_x}
96                                          // + val: Value(Scalar(<ZST>))
97                                          // mir::Constant
98                                          // + span: $DIR/region-subtyping-basic.rs:21:9: 21:14
99                                          // + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value(Scalar(<ZST>)) }
100     }
101
102     bb6: {
103         StorageDead(_9);                 // bb6[0]: scope 3 at $DIR/region-subtyping-basic.rs:21:17: 21:18
104         StorageDead(_8);                 // bb6[1]: scope 3 at $DIR/region-subtyping-basic.rs:21:18: 21:19
105         _0 = const Const(Value(Scalar(<ZST>)): ()); // bb6[2]: scope 3 at $DIR/region-subtyping-basic.rs:20:13: 22:6
106                                          // ty::Const
107                                          // + ty: ()
108                                          // + val: Value(Scalar(<ZST>))
109                                          // mir::Constant
110                                          // + span: $DIR/region-subtyping-basic.rs:20:13: 22:6
111                                          // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
112         goto -> bb8;                     // bb6[3]: scope 3 at $DIR/region-subtyping-basic.rs:20:5: 24:6
113     }
114
115     bb7: {
116         StorageDead(_10);                // bb7[0]: scope 3 at $DIR/region-subtyping-basic.rs:23:18: 23:19
117         _0 = const Const(Value(Scalar(<ZST>)): ()); // bb7[1]: scope 3 at $DIR/region-subtyping-basic.rs:22:12: 24:6
118                                          // ty::Const
119                                          // + ty: ()
120                                          // + val: Value(Scalar(<ZST>))
121                                          // mir::Constant
122                                          // + span: $DIR/region-subtyping-basic.rs:22:12: 24:6
123                                          // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
124         goto -> bb8;                     // bb7[2]: scope 3 at $DIR/region-subtyping-basic.rs:20:5: 24:6
125     }
126
127     bb8: {
128         StorageDead(_6);                 // bb8[0]: scope 2 at $DIR/region-subtyping-basic.rs:25:1: 25:2
129         StorageDead(_3);                 // bb8[1]: scope 1 at $DIR/region-subtyping-basic.rs:25:1: 25:2
130         StorageDead(_2);                 // bb8[2]: scope 1 at $DIR/region-subtyping-basic.rs:25:1: 25:2
131         StorageDead(_1);                 // bb8[3]: scope 0 at $DIR/region-subtyping-basic.rs:25:1: 25:2
132         StorageDead(_7);                 // bb8[4]: scope 0 at $DIR/region-subtyping-basic.rs:25:1: 25:2
133         return;                          // bb8[5]: scope 0 at $DIR/region-subtyping-basic.rs:25:2: 25:2
134     }
135 }