Rollup merge of #127164 - Nadrieril:clean-lowering-loop, r=matthewjasper · rust-lang/rust@58fe37f
@@ -38,65 +38,61 @@ fn main() -> () {
3838StorageLive(_2);
3939_2 = Option::<i32>::Some(const 1_i32);
4040PlaceMention(_2);
41-_5 = discriminant(_2);
42-switchInt(move _5) -> [1: bb8, otherwise: bb2];
41+_4 = discriminant(_2);
42+switchInt(move _4) -> [1: bb2, otherwise: bb1];
4343}
44444545bb1: {
46-FakeRead(ForMatchedPlace(None), _2);
47-unreachable;
46+falseEdge -> [real: bb14, imaginary: bb4];
4847}
49485049bb2: {
51-falseEdge -> [real: bb15, imaginary: bb3];
50+falseEdge -> [real: bb9, imaginary: bb1];
5251}
53525453bb3: {
55-_4 = discriminant(_2);
56-switchInt(move _4) -> [1: bb6, otherwise: bb4];
54+goto -> bb1;
5755}
58565957bb4: {
58+_5 = discriminant(_2);
59+switchInt(move _5) -> [1: bb6, otherwise: bb5];
60+}
61+62+bb5: {
6063StorageLive(_14);
6164_14 = _2;
6265_1 = const 4_i32;
6366StorageDead(_14);
64-goto -> bb21;
65-}
66-67-bb5: {
68-goto -> bb1;
67+goto -> bb20;
6968}
70697170bb6: {
72-falseEdge -> [real: bb16, imaginary: bb4];
71+falseEdge -> [real: bb15, imaginary: bb5];
7372}
74737574bb7: {
76-goto -> bb4;
75+goto -> bb5;
7776}
78777978bb8: {
80-falseEdge -> [real: bb10, imaginary: bb2];
79+FakeRead(ForMatchedPlace(None), _2);
80+unreachable;
8181}
82828383bb9: {
84-goto -> bb2;
85-}
86-87-bb10: {
8884StorageLive(_7);
8985_7 = &((_2 as Some).0: i32);
9086_3 = &fake shallow _2;
9187StorageLive(_8);
92-_8 = guard() -> [return: bb11, unwind: bb24];
88+_8 = guard() -> [return: bb10, unwind: bb22];
9389}
949095-bb11: {
96-switchInt(move _8) -> [0: bb13, otherwise: bb12];
91+bb10: {
92+switchInt(move _8) -> [0: bb12, otherwise: bb11];
9793}
989499-bb12: {
95+bb11: {
10096StorageDead(_8);
10197FakeRead(ForMatchGuard, _3);
10298FakeRead(ForGuardBinding, _7);
@@ -105,42 +101,42 @@ fn main() -> () {
105101_1 = const 1_i32;
106102StorageDead(_6);
107103StorageDead(_7);
108-goto -> bb21;
104+goto -> bb20;
109105}
110106111-bb13: {
112-goto -> bb14;
107+bb12: {
108+goto -> bb13;
113109}
114110115-bb14: {
111+bb13: {
116112StorageDead(_8);
117113StorageDead(_7);
118-falseEdge -> [real: bb9, imaginary: bb2];
114+falseEdge -> [real: bb3, imaginary: bb1];
119115}
120116121-bb15: {
117+bb14: {
122118StorageLive(_9);
123119_9 = _2;
124120_1 = const 2_i32;
125121StorageDead(_9);
126-goto -> bb21;
122+goto -> bb20;
127123}
128124129-bb16: {
125+bb15: {
130126StorageLive(_11);
131127_11 = &((_2 as Some).0: i32);
132128_3 = &fake shallow _2;
133129StorageLive(_12);
134130StorageLive(_13);
135131_13 = (*_11);
136-_12 = guard2(move _13) -> [return: bb17, unwind: bb24];
132+_12 = guard2(move _13) -> [return: bb16, unwind: bb22];
137133}
138134139-bb17: {
140-switchInt(move _12) -> [0: bb19, otherwise: bb18];
135+bb16: {
136+switchInt(move _12) -> [0: bb18, otherwise: bb17];
141137}
142138143-bb18: {
139+bb17: {
144140StorageDead(_13);
145141StorageDead(_12);
146142FakeRead(ForMatchGuard, _3);
@@ -150,38 +146,34 @@ fn main() -> () {
150146_1 = const 3_i32;
151147StorageDead(_10);
152148StorageDead(_11);
153-goto -> bb21;
149+goto -> bb20;
154150}
155151156-bb19: {
157-goto -> bb20;
152+bb18: {
153+goto -> bb19;
158154}
159155160-bb20: {
156+bb19: {
161157StorageDead(_13);
162158StorageDead(_12);
163159StorageDead(_11);
164-falseEdge -> [real: bb7, imaginary: bb4];
160+falseEdge -> [real: bb7, imaginary: bb5];
165161}
166162167-bb21: {
163+bb20: {
168164PlaceMention(_1);
169165StorageDead(_2);
170166StorageDead(_1);
171167_0 = const ();
172168return;
173169}
174170175-bb22: {
171+bb21: {
176172FakeRead(ForMatchedPlace(None), _1);
177173unreachable;
178174}
179175180-bb23: {
181-goto -> bb22;
182-}
183-184-bb24 (cleanup): {
176+bb22 (cleanup): {
185177resume;
186178}
187179}