]> git.proxmox.com Git - rustc.git/blob - src/test/mir-opt/match_arm_scopes.complicated_match.SimplifyCfg-initial.after-ElaborateDrops.after.diff
New upstream version 1.53.0+dfsg1
[rustc.git] / src / test / mir-opt / match_arm_scopes.complicated_match.SimplifyCfg-initial.after-ElaborateDrops.after.diff
1 - // MIR for `complicated_match` after SimplifyCfg-initial
2 + // MIR for `complicated_match` after ElaborateDrops
3
4 fn complicated_match(_1: bool, _2: (bool, bool, String)) -> i32 {
5 debug cond => _1; // in scope 0 at $DIR/match-arm-scopes.rs:13:22: 13:26
6 debug items => _2; // in scope 0 at $DIR/match-arm-scopes.rs:13:34: 13:39
7 let mut _0: i32; // return place in scope 0 at $DIR/match-arm-scopes.rs:13:66: 13:69
8 let mut _3: &bool; // in scope 0 at $DIR/match-arm-scopes.rs:14:11: 14:16
9 let mut _4: &bool; // in scope 0 at $DIR/match-arm-scopes.rs:14:11: 14:16
10 let _5: bool; // in scope 0 at $DIR/match-arm-scopes.rs:15:17: 15:18
11 let _6: &bool; // in scope 0 at $DIR/match-arm-scopes.rs:15:17: 15:18
12 let _7: std::string::String; // in scope 0 at $DIR/match-arm-scopes.rs:15:20: 15:21
13 let _8: &std::string::String; // in scope 0 at $DIR/match-arm-scopes.rs:15:20: 15:21
14 let mut _9: bool; // in scope 0 at $DIR/match-arm-scopes.rs:15:42: 15:73
15 let mut _10: bool; // in scope 0 at $DIR/match-arm-scopes.rs:15:45: 15:49
16 let mut _11: !; // in scope 0 at $DIR/match-arm-scopes.rs:15:52: 15:60
17 let mut _12: bool; // in scope 0 at $DIR/match-arm-scopes.rs:15:42: 15:73
18 let mut _13: bool; // in scope 0 at $DIR/match-arm-scopes.rs:15:45: 15:49
19 let mut _14: !; // in scope 0 at $DIR/match-arm-scopes.rs:15:52: 15:60
20 let _15: bool; // in scope 0 at $DIR/match-arm-scopes.rs:16:16: 16:17
21 let _16: std::string::String; // in scope 0 at $DIR/match-arm-scopes.rs:16:19: 16:20
22 scope 1 {
23 debug a => _5; // in scope 1 at $DIR/match-arm-scopes.rs:15:17: 15:18
24 debug a => _6; // in scope 1 at $DIR/match-arm-scopes.rs:15:17: 15:18
25 debug s => _7; // in scope 1 at $DIR/match-arm-scopes.rs:15:20: 15:21
26 debug s => _8; // in scope 1 at $DIR/match-arm-scopes.rs:15:20: 15:21
27 }
28 scope 2 {
29 debug b => _15; // in scope 2 at $DIR/match-arm-scopes.rs:16:16: 16:17
30 debug t => _16; // in scope 2 at $DIR/match-arm-scopes.rs:16:19: 16:20
31 }
32
33 bb0: {
34 - FakeRead(ForMatchedPlace(None), _2); // scope 0 at $DIR/match-arm-scopes.rs:14:11: 14:16
35 - switchInt((_2.0: bool)) -> [false: bb1, otherwise: bb2]; // scope 0 at $DIR/match-arm-scopes.rs:15:10: 15:15
36 + switchInt((_2.0: bool)) -> [false: bb5, otherwise: bb1]; // scope 0 at $DIR/match-arm-scopes.rs:15:10: 15:15
37 }
38
39 bb1: {
40 - falseEdge -> [real: bb8, imaginary: bb3]; // scope 0 at $DIR/match-arm-scopes.rs:15:9: 15:22
41 + switchInt((_2.1: bool)) -> [false: bb10, otherwise: bb2]; // scope 0 at $DIR/match-arm-scopes.rs:15:29: 15:34
42 }
43
44 bb2: {
45 - switchInt((_2.1: bool)) -> [false: bb3, otherwise: bb4]; // scope 0 at $DIR/match-arm-scopes.rs:15:29: 15:34
46 + switchInt((_2.0: bool)) -> [false: bb3, otherwise: bb17]; // scope 0 at $DIR/match-arm-scopes.rs:16:10: 16:14
47 }
48
49 bb3: {
50 - falseEdge -> [real: bb13, imaginary: bb5]; // scope 0 at $DIR/match-arm-scopes.rs:15:25: 15:38
51 - }
52 -
53 - bb4: {
54 - switchInt((_2.0: bool)) -> [false: bb6, otherwise: bb5]; // scope 0 at $DIR/match-arm-scopes.rs:16:10: 16:14
55 - }
56 -
57 - bb5: {
58 - falseEdge -> [real: bb20, imaginary: bb6]; // scope 0 at $DIR/match-arm-scopes.rs:16:9: 16:21
59 - }
60 -
61 - bb6: {
62 StorageLive(_15); // scope 0 at $DIR/match-arm-scopes.rs:16:32: 16:33
63 _15 = (_2.1: bool); // scope 0 at $DIR/match-arm-scopes.rs:16:32: 16:33
64 StorageLive(_16); // scope 0 at $DIR/match-arm-scopes.rs:16:35: 16:36
65 _16 = move (_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:16:35: 16:36
66 - goto -> bb19; // scope 0 at $DIR/match-arm-scopes.rs:14:5: 17:6
67 + goto -> bb16; // scope 0 at $DIR/match-arm-scopes.rs:14:5: 17:6
68 }
69
70 - bb7: {
71 + bb4: {
72 _0 = const 1_i32; // scope 1 at $DIR/match-arm-scopes.rs:15:77: 15:78
73 - drop(_7) -> [return: bb18, unwind: bb25]; // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78
74 + drop(_7) -> [return: bb15, unwind: bb22]; // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78
75 }
76
77 - bb8: {
78 + bb5: {
79 StorageLive(_6); // scope 0 at $DIR/match-arm-scopes.rs:15:17: 15:18
80 _6 = &(_2.1: bool); // scope 0 at $DIR/match-arm-scopes.rs:15:17: 15:18
81 StorageLive(_8); // scope 0 at $DIR/match-arm-scopes.rs:15:20: 15:21
82 _8 = &(_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:15:20: 15:21
83 - _3 = &shallow (_2.0: bool); // scope 0 at $DIR/match-arm-scopes.rs:14:11: 14:16
84 - _4 = &shallow (_2.1: bool); // scope 0 at $DIR/match-arm-scopes.rs:14:11: 14:16
85 StorageLive(_9); // scope 0 at $DIR/match-arm-scopes.rs:15:42: 15:73
86 StorageLive(_10); // scope 0 at $DIR/match-arm-scopes.rs:15:45: 15:49
87 _10 = _1; // scope 0 at $DIR/match-arm-scopes.rs:15:45: 15:49
88 - switchInt(move _10) -> [false: bb10, otherwise: bb9]; // scope 0 at $DIR/match-arm-scopes.rs:15:42: 15:73
89 + switchInt(move _10) -> [false: bb7, otherwise: bb6]; // scope 0 at $DIR/match-arm-scopes.rs:15:42: 15:73
90 }
91
92 - bb9: {
93 + bb6: {
94 _0 = const 3_i32; // scope 0 at $DIR/match-arm-scopes.rs:15:59: 15:60
95 StorageDead(_10); // scope 0 at $DIR/match-arm-scopes.rs:15:72: 15:73
96 StorageDead(_9); // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78
97 - goto -> bb23; // scope 0 at $DIR/match-arm-scopes.rs:1:1: 1:1
98 + goto -> bb20; // scope 0 at $DIR/match-arm-scopes.rs:1:1: 1:1
99 }
100
101 - bb10: {
102 + bb7: {
103 _9 = (*_6); // scope 0 at $DIR/match-arm-scopes.rs:15:70: 15:71
104 StorageDead(_10); // scope 0 at $DIR/match-arm-scopes.rs:15:72: 15:73
105 - switchInt(move _9) -> [false: bb12, otherwise: bb11]; // scope 0 at $DIR/match-arm-scopes.rs:15:42: 15:73
106 + switchInt(move _9) -> [false: bb9, otherwise: bb8]; // scope 0 at $DIR/match-arm-scopes.rs:15:42: 15:73
107 }
108
109 - bb11: {
110 + bb8: {
111 StorageDead(_9); // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78
112 - FakeRead(ForMatchGuard, _3); // scope 0 at $DIR/match-arm-scopes.rs:15:72: 15:73
113 - FakeRead(ForMatchGuard, _4); // scope 0 at $DIR/match-arm-scopes.rs:15:72: 15:73
114 - FakeRead(ForGuardBinding, _6); // scope 0 at $DIR/match-arm-scopes.rs:15:72: 15:73
115 - FakeRead(ForGuardBinding, _8); // scope 0 at $DIR/match-arm-scopes.rs:15:72: 15:73
116 StorageLive(_5); // scope 0 at $DIR/match-arm-scopes.rs:15:17: 15:18
117 _5 = (_2.1: bool); // scope 0 at $DIR/match-arm-scopes.rs:15:17: 15:18
118 StorageLive(_7); // scope 0 at $DIR/match-arm-scopes.rs:15:20: 15:21
119 _7 = move (_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:15:20: 15:21
120 - goto -> bb7; // scope 0 at $DIR/match-arm-scopes.rs:14:5: 17:6
121 + goto -> bb4; // scope 0 at $DIR/match-arm-scopes.rs:14:5: 17:6
122 }
123
124 - bb12: {
125 + bb9: {
126 StorageDead(_9); // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78
127 StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78
128 StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78
129 - falseEdge -> [real: bb2, imaginary: bb3]; // scope 0 at $DIR/match-arm-scopes.rs:15:42: 15:73
130 + goto -> bb1; // scope 0 at $DIR/match-arm-scopes.rs:15:42: 15:73
131 }
132
133 - bb13: {
134 + bb10: {
135 StorageLive(_6); // scope 0 at $DIR/match-arm-scopes.rs:15:26: 15:27
136 _6 = &(_2.0: bool); // scope 0 at $DIR/match-arm-scopes.rs:15:26: 15:27
137 StorageLive(_8); // scope 0 at $DIR/match-arm-scopes.rs:15:36: 15:37
138 _8 = &(_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:15:36: 15:37
139 - _3 = &shallow (_2.0: bool); // scope 0 at $DIR/match-arm-scopes.rs:14:11: 14:16
140 - _4 = &shallow (_2.1: bool); // scope 0 at $DIR/match-arm-scopes.rs:14:11: 14:16
141 StorageLive(_12); // scope 0 at $DIR/match-arm-scopes.rs:15:42: 15:73
142 StorageLive(_13); // scope 0 at $DIR/match-arm-scopes.rs:15:45: 15:49
143 _13 = _1; // scope 0 at $DIR/match-arm-scopes.rs:15:45: 15:49
144 - switchInt(move _13) -> [false: bb15, otherwise: bb14]; // scope 0 at $DIR/match-arm-scopes.rs:15:42: 15:73
145 + switchInt(move _13) -> [false: bb12, otherwise: bb11]; // scope 0 at $DIR/match-arm-scopes.rs:15:42: 15:73
146 }
147
148 - bb14: {
149 + bb11: {
150 _0 = const 3_i32; // scope 0 at $DIR/match-arm-scopes.rs:15:59: 15:60
151 StorageDead(_13); // scope 0 at $DIR/match-arm-scopes.rs:15:72: 15:73
152 StorageDead(_12); // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78
153 - goto -> bb23; // scope 0 at $DIR/match-arm-scopes.rs:1:1: 1:1
154 + goto -> bb20; // scope 0 at $DIR/match-arm-scopes.rs:1:1: 1:1
155 }
156
157 - bb15: {
158 + bb12: {
159 _12 = (*_6); // scope 0 at $DIR/match-arm-scopes.rs:15:70: 15:71
160 StorageDead(_13); // scope 0 at $DIR/match-arm-scopes.rs:15:72: 15:73
161 - switchInt(move _12) -> [false: bb17, otherwise: bb16]; // scope 0 at $DIR/match-arm-scopes.rs:15:42: 15:73
162 + switchInt(move _12) -> [false: bb14, otherwise: bb13]; // scope 0 at $DIR/match-arm-scopes.rs:15:42: 15:73
163 }
164
165 - bb16: {
166 + bb13: {
167 StorageDead(_12); // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78
168 - FakeRead(ForMatchGuard, _3); // scope 0 at $DIR/match-arm-scopes.rs:15:72: 15:73
169 - FakeRead(ForMatchGuard, _4); // scope 0 at $DIR/match-arm-scopes.rs:15:72: 15:73
170 - FakeRead(ForGuardBinding, _6); // scope 0 at $DIR/match-arm-scopes.rs:15:72: 15:73
171 - FakeRead(ForGuardBinding, _8); // scope 0 at $DIR/match-arm-scopes.rs:15:72: 15:73
172 StorageLive(_5); // scope 0 at $DIR/match-arm-scopes.rs:15:26: 15:27
173 _5 = (_2.0: bool); // scope 0 at $DIR/match-arm-scopes.rs:15:26: 15:27
174 StorageLive(_7); // scope 0 at $DIR/match-arm-scopes.rs:15:36: 15:37
175 _7 = move (_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:15:36: 15:37
176 - goto -> bb7; // scope 0 at $DIR/match-arm-scopes.rs:14:5: 17:6
177 + goto -> bb4; // scope 0 at $DIR/match-arm-scopes.rs:14:5: 17:6
178 }
179
180 - bb17: {
181 + bb14: {
182 StorageDead(_12); // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78
183 StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78
184 StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78
185 - falseEdge -> [real: bb4, imaginary: bb5]; // scope 0 at $DIR/match-arm-scopes.rs:15:42: 15:73
186 + goto -> bb2; // scope 0 at $DIR/match-arm-scopes.rs:15:42: 15:73
187 }
188
189 - bb18: {
190 + bb15: {
191 StorageDead(_7); // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78
192 StorageDead(_5); // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78
193 StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78
194 StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78
195 - goto -> bb22; // scope 0 at $DIR/match-arm-scopes.rs:14:5: 17:6
196 + goto -> bb19; // scope 0 at $DIR/match-arm-scopes.rs:14:5: 17:6
197 }
198
199 - bb19: {
200 + bb16: {
201 _0 = const 2_i32; // scope 2 at $DIR/match-arm-scopes.rs:16:41: 16:42
202 - drop(_16) -> [return: bb21, unwind: bb25]; // scope 0 at $DIR/match-arm-scopes.rs:16:41: 16:42
203 + drop(_16) -> [return: bb18, unwind: bb22]; // scope 0 at $DIR/match-arm-scopes.rs:16:41: 16:42
204 }
205
206 - bb20: {
207 + bb17: {
208 StorageLive(_15); // scope 0 at $DIR/match-arm-scopes.rs:16:16: 16:17
209 _15 = (_2.1: bool); // scope 0 at $DIR/match-arm-scopes.rs:16:16: 16:17
210 StorageLive(_16); // scope 0 at $DIR/match-arm-scopes.rs:16:19: 16:20
211 _16 = move (_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:16:19: 16:20
212 - goto -> bb19; // scope 0 at $DIR/match-arm-scopes.rs:14:5: 17:6
213 + goto -> bb16; // scope 0 at $DIR/match-arm-scopes.rs:14:5: 17:6
214 }
215
216 - bb21: {
217 + bb18: {
218 StorageDead(_16); // scope 0 at $DIR/match-arm-scopes.rs:16:41: 16:42
219 StorageDead(_15); // scope 0 at $DIR/match-arm-scopes.rs:16:41: 16:42
220 - goto -> bb22; // scope 0 at $DIR/match-arm-scopes.rs:14:5: 17:6
221 + goto -> bb19; // scope 0 at $DIR/match-arm-scopes.rs:14:5: 17:6
222 }
223
224 - bb22: {
225 - drop(_2) -> [return: bb24, unwind: bb26]; // scope 0 at $DIR/match-arm-scopes.rs:18:1: 18:2
226 + bb19: {
227 + goto -> bb26; // scope 0 at $DIR/match-arm-scopes.rs:18:1: 18:2
228 }
229
230 - bb23: {
231 + bb20: {
232 StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78
233 StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78
234 - drop(_2) -> [return: bb24, unwind: bb26]; // scope 0 at $DIR/match-arm-scopes.rs:18:1: 18:2
235 + drop(_2) -> [return: bb21, unwind: bb23]; // scope 0 at $DIR/match-arm-scopes.rs:18:1: 18:2
236 }
237
238 - bb24: {
239 + bb21: {
240 return; // scope 0 at $DIR/match-arm-scopes.rs:18:2: 18:2
241 }
242
243 - bb25 (cleanup): {
244 - drop(_2) -> bb26; // scope 0 at $DIR/match-arm-scopes.rs:18:1: 18:2
245 + bb22 (cleanup): {
246 + goto -> bb27; // scope 0 at $DIR/match-arm-scopes.rs:18:1: 18:2
247 }
248
249 - bb26 (cleanup): {
250 + bb23 (cleanup): {
251 resume; // scope 0 at $DIR/match-arm-scopes.rs:13:1: 18:2
252 + }
253 +
254 + bb24: {
255 + goto -> bb21; // scope 0 at $DIR/match-arm-scopes.rs:18:1: 18:2
256 + }
257 +
258 + bb25 (cleanup): {
259 + goto -> bb23; // scope 0 at $DIR/match-arm-scopes.rs:18:1: 18:2
260 + }
261 +
262 + bb26: {
263 + goto -> bb24; // scope 0 at $DIR/match-arm-scopes.rs:18:1: 18:2
264 + }
265 +
266 + bb27 (cleanup): {
267 + goto -> bb23; // scope 0 at $DIR/match-arm-scopes.rs:18:1: 18:2
268 }
269 }
270