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