@@ -7,22 +7,19 @@ fn test_complex() -> () {
77 let mut _3 : isize;
88 let mut _4 : bool;
99 let mut _5 : bool;
10- let mut _6 : bool;
11- let mut _7 : bool;
12- let mut _8 : u8;
13- let mut _9 : Droppy;
14- let mut _10 : bool;
15- let mut _11 : u8;
16- let mut _12 : Droppy;
17- let mut _13 : bool;
18- let mut _14 : bool;
19- let mut _15 : E;
20- let mut _16 : isize;
10+ let mut _6 : u8;
11+ let mut _7 : Droppy;
12+ let mut _8 : bool;
13+ let mut _9 : u8;
14+ let mut _10 : Droppy;
15+ let mut _11 : bool;
16+ let mut _12 : E;
17+ let mut _13 : isize;
2118
2219 bb0 : {
2320 StorageLive(_1);
2421 StorageLive(_2);
25- _2 = E::f() -> [return : bb1, unwind: bb27 ];
22+ _2 = E::f() -> [return : bb1, unwind: bb31 ];
2623 }
2724
2825 bb1 : {
@@ -36,145 +33,154 @@ fn test_complex() -> () {
3633 }
3734
3835 bb3 : {
39- goto -> bb16 ;
36+ goto -> bb19 ;
4037 }
4138
4239 bb4 : {
4340 StorageLive(_4);
44- StorageLive(_5);
45- StorageLive(_6);
46- _6 = always_true() -> [return : bb11, unwind: bb27];
41+ _4 = always_true() -> [return : bb5, unwind: bb31];
4742 }
4843
4944 bb5 : {
50- _4 = const true;
51- goto -> bb7;
45+ switchInt(move _4) -> [0 : bb7, otherwise: bb6];
5246 }
5347
5448 bb6 : {
55- StorageLive(_10 );
56- StorageLive(_11 );
57- StorageLive(_12 );
58- _12 = Droppy(const 1_u8 );
59- _11 = (_12 .0 : u8);
60- _10 = Gt(move _11 , const 1_u8 );
61- drop(_12 ) -> [return : bb13, unwind: bb27 ];
49+ StorageLive(_5 );
50+ StorageLive(_6 );
51+ StorageLive(_7 );
52+ _7 = Droppy(const 0_u8 );
53+ _6 = (_7 .0 : u8);
54+ _5 = Gt(move _6 , const 0_u8 );
55+ switchInt(move _5 ) -> [0 : bb9, otherwise: bb8 ];
6256 }
6357
6458 bb7 : {
65- StorageDead(_10);
66- StorageDead(_5);
67- switchInt(move _4) -> [0 : bb15, otherwise: bb14];
59+ goto -> bb13;
6860 }
6961
7062 bb8 : {
71- _5 = const false;
72- goto -> bb10;
63+ drop(_7) -> [return : bb10, unwind: bb31];
7364 }
7465
7566 bb9 : {
76- StorageLive(_7);
77- StorageLive(_8);
78- StorageLive(_9);
79- _9 = Droppy(const 0_u8);
80- _8 = (_9.0 : u8);
81- _7 = Gt(move _8, const 0_u8);
82- drop(_9) -> [return : bb12, unwind: bb27];
67+ goto -> bb11;
8368 }
8469
8570 bb10 : {
8671 StorageDead(_7);
8772 StorageDead(_6);
88- switchInt(move _5) -> [0 : bb6, otherwise: bb5] ;
73+ goto -> bb16 ;
8974 }
9075
9176 bb11 : {
92- switchInt(move _6 ) -> [0 : bb8, otherwise: bb9 ];
77+ drop(_7 ) -> [return : bb12, unwind: bb31 ];
9378 }
9479
9580 bb12 : {
96- StorageDead(_9);
97- StorageDead(_8);
98- _5 = move _7;
99- goto -> bb10;
81+ StorageDead(_7);
82+ StorageDead(_6);
83+ goto -> bb13;
10084 }
10185
10286 bb13 : {
103- StorageDead(_12);
104- StorageDead(_11);
105- _4 = move _10;
106- goto -> bb7;
87+ StorageLive(_8);
88+ StorageLive(_9);
89+ StorageLive(_10);
90+ _10 = Droppy(const 1_u8);
91+ _9 = (_10.0 : u8);
92+ _8 = Gt(move _9, const 1_u8);
93+ switchInt(move _8) -> [0 : bb15, otherwise: bb14];
10794 }
10895
10996 bb14 : {
110- _1 = const ();
111- goto -> bb17;
97+ drop(_10) -> [return : bb16, unwind: bb31];
11298 }
11399
114100 bb15 : {
115- goto -> bb16 ;
101+ goto -> bb17 ;
116102 }
117103
118104 bb16 : {
105+ StorageDead(_10);
106+ StorageDead(_9);
119107 _1 = const ();
120- goto -> bb17 ;
108+ goto -> bb20 ;
121109 }
122110
123111 bb17 : {
124- StorageDead(_4);
125- StorageDead(_2);
126- StorageDead(_1);
127- StorageLive(_13);
128- StorageLive(_14);
129- _14 = always_true() -> [return : bb18, unwind: bb27];
112+ drop(_10) -> [return : bb18, unwind: bb31];
130113 }
131114
132115 bb18 : {
133- _13 = Not(move _14 );
134- StorageDead(_14 );
135- switchInt(move _13) -> [0 : bb20, otherwise: bb19] ;
116+ StorageDead(_10 );
117+ StorageDead(_9 );
118+ goto -> bb19;
136119 }
137120
138121 bb19 : {
139- StorageLive(_15 );
140- _15 = E::f() -> [return : bb21, unwind: bb27] ;
122+ _1 = const ( );
123+ goto -> bb20 ;
141124 }
142125
143126 bb20 : {
144- goto -> bb25;
127+ StorageDead(_8);
128+ StorageDead(_5);
129+ StorageDead(_4);
130+ StorageDead(_2);
131+ StorageDead(_1);
132+ StorageLive(_11);
133+ _11 = always_true() -> [return : bb21, unwind: bb31];
145134 }
146135
147136 bb21 : {
148- FakeRead(ForMatchedPlace(None), _15);
149- _16 = discriminant(_15);
150- switchInt(move _16) -> [1 : bb23, otherwise: bb22];
137+ switchInt(move _11) -> [0 : bb23, otherwise: bb22];
151138 }
152139
153140 bb22 : {
154- goto -> bb25 ;
141+ goto -> bb29 ;
155142 }
156143
157144 bb23 : {
158- falseEdge -> [real : bb24, imaginary: bb22] ;
145+ goto -> bb24;
159146 }
160147
161148 bb24 : {
162- _0 = const ( );
163- goto -> bb26 ;
149+ StorageLive(_12 );
150+ _12 = E::f() -> [return : bb25, unwind: bb31] ;
164151 }
165152
166153 bb25 : {
167- _0 = const ();
168- goto -> bb26;
154+ FakeRead(ForMatchedPlace(None), _12);
155+ _13 = discriminant(_12);
156+ switchInt(move _13) -> [1 : bb27, otherwise: bb26];
169157 }
170158
171159 bb26 : {
172- StorageDead(_13);
173- StorageDead(_15);
160+ goto -> bb29;
161+ }
162+
163+ bb27 : {
164+ falseEdge -> [real : bb28, imaginary: bb26];
165+ }
166+
167+ bb28 : {
168+ _0 = const ();
169+ goto -> bb30;
170+ }
171+
172+ bb29 : {
173+ _0 = const ();
174+ goto -> bb30;
175+ }
176+
177+ bb30 : {
178+ StorageDead(_11);
179+ StorageDead(_12);
174180 return;
175181 }
176182
177- bb27 (cleanup) : {
183+ bb31 (cleanup) : {
178184 resume;
179185 }
180186}
0 commit comments