]> git.proxmox.com Git - rustc.git/blob - src/test/mir-opt/nll/region-subtyping-basic/64bit/rustc.main.nll.0.mir
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / mir-opt / nll / region-subtyping-basic / 64bit / rustc.main.nll.0.mir
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 | {bb2[0..=8], bb3[0], bb5[0..=2]}
11 | '_#3r | U0 | {bb2[1..=8], bb3[0], bb5[0..=2]}
12 | '_#4r | U0 | {bb2[4..=8], bb3[0], bb5[0..=2]}
13 |
14 | Inference Constraints
15 | '_#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]}
16 | '_#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]}
17 | '_#2r live at {bb2[0]}
18 | '_#3r live at {bb2[1..=3]}
19 | '_#4r live at {bb2[4..=8], bb3[0], bb5[0..=2]}
20 | '_#2r: '_#3r due to Assignment at Single(bb2[0])
21 | '_#3r: '_#4r due to Assignment at Single(bb2[3])
22 |
23 fn main() -> () {
24 let mut _0: (); // return place in scope 0 at $DIR/region-subtyping-basic.rs:14:11: 14:11
25 let mut _1: [usize; Const { ty: usize, val: Value(Scalar(0x0000000000000003)) }]; // in scope 0 at $DIR/region-subtyping-basic.rs:15:9: 15:14
26 let _3: usize; // in scope 0 at $DIR/region-subtyping-basic.rs:16:16: 16:17
27 let mut _4: usize; // in scope 0 at $DIR/region-subtyping-basic.rs:16:14: 16:18
28 let mut _5: bool; // in scope 0 at $DIR/region-subtyping-basic.rs:16:14: 16:18
29 let mut _7: bool; // in scope 0 at $DIR/region-subtyping-basic.rs:18:8: 18:12
30 let _8: bool; // in scope 0 at $DIR/region-subtyping-basic.rs:19:9: 19:18
31 let mut _9: usize; // in scope 0 at $DIR/region-subtyping-basic.rs:19:15: 19:17
32 let _10: bool; // in scope 0 at $DIR/region-subtyping-basic.rs:21:9: 21:18
33 scope 1 {
34 debug v => _1; // in scope 1 at $DIR/region-subtyping-basic.rs:15:9: 15:14
35 let _2: &'_#3r usize; // in scope 1 at $DIR/region-subtyping-basic.rs:16:9: 16:10
36 scope 2 {
37 debug p => _2; // in scope 2 at $DIR/region-subtyping-basic.rs:16:9: 16:10
38 let _6: &'_#4r usize; // in scope 2 at $DIR/region-subtyping-basic.rs:17:9: 17:10
39 scope 3 {
40 debug q => _6; // in scope 3 at $DIR/region-subtyping-basic.rs:17:9: 17:10
41 }
42 }
43 }
44
45 bb0: {
46 StorageLive(_1); // bb0[0]: scope 0 at $DIR/region-subtyping-basic.rs:15:9: 15:14
47 _1 = [const Const(Value(Scalar(0x0000000000000001)): usize), const Const(Value(Scalar(0x0000000000000002)): usize), const Const(Value(Scalar(0x0000000000000003)): usize)]; // bb0[1]: scope 0 at $DIR/region-subtyping-basic.rs:15:17: 15:26
48 // ty::Const
49 // + ty: usize
50 // + val: Value(Scalar(0x0000000000000001))
51 // mir::Constant
52 // + span: $DIR/region-subtyping-basic.rs:15:18: 15:19
53 // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) }
54 // ty::Const
55 // + ty: usize
56 // + val: Value(Scalar(0x0000000000000002))
57 // mir::Constant
58 // + span: $DIR/region-subtyping-basic.rs:15:21: 15:22
59 // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000002)) }
60 // ty::Const
61 // + ty: usize
62 // + val: Value(Scalar(0x0000000000000003))
63 // mir::Constant
64 // + span: $DIR/region-subtyping-basic.rs:15:24: 15:25
65 // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000003)) }
66 FakeRead(ForLet, _1); // bb0[2]: scope 0 at $DIR/region-subtyping-basic.rs:15:9: 15:14
67 StorageLive(_2); // bb0[3]: scope 1 at $DIR/region-subtyping-basic.rs:16:9: 16:10
68 StorageLive(_3); // bb0[4]: scope 1 at $DIR/region-subtyping-basic.rs:16:16: 16:17
69 _3 = const Const(Value(Scalar(0x0000000000000000)): usize); // bb0[5]: scope 1 at $DIR/region-subtyping-basic.rs:16:16: 16:17
70 // ty::Const
71 // + ty: usize
72 // + val: Value(Scalar(0x0000000000000000))
73 // mir::Constant
74 // + span: $DIR/region-subtyping-basic.rs:16:16: 16:17
75 // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000000)) }
76 _4 = Len(_1); // bb0[6]: scope 1 at $DIR/region-subtyping-basic.rs:16:14: 16:18
77 _5 = Lt(_3, _4); // bb0[7]: scope 1 at $DIR/region-subtyping-basic.rs:16:14: 16:18
78 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:16:14: 16:18
79 }
80
81 bb1 (cleanup): {
82 resume; // bb1[0]: scope 0 at $DIR/region-subtyping-basic.rs:14:1: 23:2
83 }
84
85 bb2: {
86 _2 = &'_#2r _1[_3]; // bb2[0]: scope 1 at $DIR/region-subtyping-basic.rs:16:13: 16:18
87 FakeRead(ForLet, _2); // bb2[1]: scope 1 at $DIR/region-subtyping-basic.rs:16:9: 16:10
88 StorageLive(_6); // bb2[2]: scope 2 at $DIR/region-subtyping-basic.rs:17:9: 17:10
89 _6 = _2; // bb2[3]: scope 2 at $DIR/region-subtyping-basic.rs:17:13: 17:14
90 FakeRead(ForLet, _6); // bb2[4]: scope 2 at $DIR/region-subtyping-basic.rs:17:9: 17:10
91 StorageLive(_7); // bb2[5]: scope 3 at $DIR/region-subtyping-basic.rs:18:8: 18:12
92 _7 = const Const(Value(Scalar(0x01)): bool); // bb2[6]: scope 3 at $DIR/region-subtyping-basic.rs:18:8: 18:12
93 // ty::Const
94 // + ty: bool
95 // + val: Value(Scalar(0x01))
96 // mir::Constant
97 // + span: $DIR/region-subtyping-basic.rs:18:8: 18:12
98 // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
99 FakeRead(ForMatchedPlace, _7); // bb2[7]: scope 3 at $DIR/region-subtyping-basic.rs:18:8: 18:12
100 switchInt(_7) -> [Const(Value(Scalar(0x00)): bool): bb4, otherwise: bb3]; // bb2[8]: scope 3 at $DIR/region-subtyping-basic.rs:18:5: 22:6
101 }
102
103 bb3: {
104 falseEdges -> [real: bb5, imaginary: bb4]; // bb3[0]: scope 3 at $DIR/region-subtyping-basic.rs:18:5: 22:6
105 }
106
107 bb4: {
108 StorageLive(_10); // bb4[0]: scope 3 at $DIR/region-subtyping-basic.rs:21:9: 21:18
109 _10 = const Const(Value(Scalar(<ZST>)): fn(usize) -> bool {use_x})(const Const(Value(Scalar(0x0000000000000016)): usize)) -> [return: bb7, unwind: bb1]; // bb4[1]: scope 3 at $DIR/region-subtyping-basic.rs:21:9: 21:18
110 // ty::Const
111 // + ty: fn(usize) -> bool {use_x}
112 // + val: Value(Scalar(<ZST>))
113 // mir::Constant
114 // + span: $DIR/region-subtyping-basic.rs:21:9: 21:14
115 // + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value(Scalar(<ZST>)) }
116 // ty::Const
117 // + ty: usize
118 // + val: Value(Scalar(0x0000000000000016))
119 // mir::Constant
120 // + span: $DIR/region-subtyping-basic.rs:21:15: 21:17
121 // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000016)) }
122 }
123
124 bb5: {
125 StorageLive(_8); // bb5[0]: scope 3 at $DIR/region-subtyping-basic.rs:19:9: 19:18
126 StorageLive(_9); // bb5[1]: scope 3 at $DIR/region-subtyping-basic.rs:19:15: 19:17
127 _9 = (*_6); // bb5[2]: scope 3 at $DIR/region-subtyping-basic.rs:19:15: 19:17
128 _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:19:9: 19:18
129 // ty::Const
130 // + ty: fn(usize) -> bool {use_x}
131 // + val: Value(Scalar(<ZST>))
132 // mir::Constant
133 // + span: $DIR/region-subtyping-basic.rs:19:9: 19:14
134 // + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value(Scalar(<ZST>)) }
135 }
136
137 bb6: {
138 StorageDead(_9); // bb6[0]: scope 3 at $DIR/region-subtyping-basic.rs:19:17: 19:18
139 StorageDead(_8); // bb6[1]: scope 3 at $DIR/region-subtyping-basic.rs:19:18: 19:19
140 _0 = const Const(Value(Scalar(<ZST>)): ()); // bb6[2]: scope 3 at $DIR/region-subtyping-basic.rs:18:13: 20:6
141 // ty::Const
142 // + ty: ()
143 // + val: Value(Scalar(<ZST>))
144 // mir::Constant
145 // + span: $DIR/region-subtyping-basic.rs:18:13: 20:6
146 // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
147 goto -> bb8; // bb6[3]: scope 3 at $DIR/region-subtyping-basic.rs:18:5: 22:6
148 }
149
150 bb7: {
151 StorageDead(_10); // bb7[0]: scope 3 at $DIR/region-subtyping-basic.rs:21:18: 21:19
152 _0 = const Const(Value(Scalar(<ZST>)): ()); // bb7[1]: scope 3 at $DIR/region-subtyping-basic.rs:20:12: 22:6
153 // ty::Const
154 // + ty: ()
155 // + val: Value(Scalar(<ZST>))
156 // mir::Constant
157 // + span: $DIR/region-subtyping-basic.rs:20:12: 22:6
158 // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
159 goto -> bb8; // bb7[2]: scope 3 at $DIR/region-subtyping-basic.rs:18:5: 22:6
160 }
161
162 bb8: {
163 StorageDead(_6); // bb8[0]: scope 2 at $DIR/region-subtyping-basic.rs:23:1: 23:2
164 StorageDead(_3); // bb8[1]: scope 1 at $DIR/region-subtyping-basic.rs:23:1: 23:2
165 StorageDead(_2); // bb8[2]: scope 1 at $DIR/region-subtyping-basic.rs:23:1: 23:2
166 StorageDead(_1); // bb8[3]: scope 0 at $DIR/region-subtyping-basic.rs:23:1: 23:2
167 StorageDead(_7); // bb8[4]: scope 0 at $DIR/region-subtyping-basic.rs:23:1: 23:2
168 return; // bb8[5]: scope 0 at $DIR/region-subtyping-basic.rs:23:2: 23:2
169 }
170 }