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