2022-04-06 02:17:41 -05:00
|
|
|
- // MIR for `match_nested_if` before ConstGoto
|
|
|
|
+ // MIR for `match_nested_if` after ConstGoto
|
|
|
|
|
|
|
|
fn match_nested_if() -> bool {
|
2023-06-06 08:47:00 -05:00
|
|
|
let mut _0: bool;
|
|
|
|
let _1: bool;
|
|
|
|
- let mut _2: ();
|
|
|
|
- let mut _3: bool;
|
|
|
|
- let mut _4: bool;
|
|
|
|
- let mut _5: bool;
|
|
|
|
- let mut _6: bool;
|
|
|
|
+ let mut _2: bool;
|
2022-04-06 02:17:41 -05:00
|
|
|
scope 1 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug val => _1;
|
2022-04-06 02:17:41 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_1);
|
|
|
|
StorageLive(_2);
|
|
|
|
- _2 = ();
|
|
|
|
- StorageLive(_3);
|
|
|
|
- StorageLive(_4);
|
|
|
|
- StorageLive(_5);
|
|
|
|
- StorageLive(_6);
|
|
|
|
- _6 = const true;
|
|
|
|
- switchInt(move _6) -> [0: bb2, otherwise: bb1];
|
|
|
|
+ _2 = const true;
|
|
|
|
+ switchInt(move _2) -> [0: bb2, otherwise: bb1];
|
2022-04-06 02:17:41 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2023-06-06 08:47:00 -05:00
|
|
|
- _5 = const true;
|
|
|
|
+ StorageDead(_2);
|
|
|
|
+ _1 = const true;
|
|
|
|
goto -> bb3;
|
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
|
|
|
- _5 = const false;
|
|
|
|
+ StorageDead(_2);
|
|
|
|
+ _1 = const false;
|
|
|
|
goto -> bb3;
|
|
|
|
}
|
|
|
|
|
|
|
|
bb3: {
|
|
|
|
- StorageDead(_6);
|
|
|
|
- switchInt(move _5) -> [0: bb5, otherwise: bb4];
|
2022-04-06 02:17:41 -05:00
|
|
|
- }
|
|
|
|
-
|
|
|
|
- bb4: {
|
2023-06-06 08:47:00 -05:00
|
|
|
- _4 = const true;
|
|
|
|
- goto -> bb6;
|
2022-04-06 02:17:41 -05:00
|
|
|
- }
|
|
|
|
-
|
|
|
|
- bb5: {
|
2023-06-06 08:47:00 -05:00
|
|
|
- _4 = const false;
|
|
|
|
- goto -> bb6;
|
2022-04-06 02:17:41 -05:00
|
|
|
- }
|
|
|
|
-
|
|
|
|
- bb6: {
|
2023-06-06 08:47:00 -05:00
|
|
|
- StorageDead(_5);
|
|
|
|
- switchInt(move _4) -> [0: bb8, otherwise: bb7];
|
2022-04-06 02:17:41 -05:00
|
|
|
- }
|
|
|
|
-
|
|
|
|
- bb7: {
|
2023-06-06 08:47:00 -05:00
|
|
|
- _3 = const true;
|
|
|
|
- goto -> bb9;
|
2022-04-06 02:17:41 -05:00
|
|
|
- }
|
|
|
|
-
|
|
|
|
- bb8: {
|
2023-06-06 08:47:00 -05:00
|
|
|
- _3 = const false;
|
|
|
|
- goto -> bb9;
|
2022-04-06 02:17:41 -05:00
|
|
|
- }
|
|
|
|
-
|
|
|
|
- bb9: {
|
2023-06-06 08:47:00 -05:00
|
|
|
- switchInt(move _3) -> [0: bb11, otherwise: bb10];
|
2022-04-06 02:17:41 -05:00
|
|
|
- }
|
|
|
|
-
|
|
|
|
- bb10: {
|
2023-06-06 08:47:00 -05:00
|
|
|
- StorageDead(_4);
|
|
|
|
- StorageDead(_3);
|
|
|
|
- _1 = const true;
|
|
|
|
- goto -> bb12;
|
|
|
|
- }
|
|
|
|
-
|
2022-04-06 02:17:41 -05:00
|
|
|
- bb11: {
|
2023-06-06 08:47:00 -05:00
|
|
|
- StorageDead(_4);
|
|
|
|
- StorageDead(_3);
|
|
|
|
- _1 = const false;
|
|
|
|
- goto -> bb12;
|
|
|
|
- }
|
|
|
|
-
|
2022-04-06 02:17:41 -05:00
|
|
|
- bb12: {
|
2023-06-06 08:47:00 -05:00
|
|
|
- StorageDead(_2);
|
|
|
|
_0 = _1;
|
|
|
|
StorageDead(_1);
|
|
|
|
return;
|
2022-04-06 02:17:41 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|