rust/tests/mir-opt/simplify_cfg.main.SimplifyCfg-early-opt.diff

49 lines
913 B
Diff
Raw Normal View History

2020-04-02 16:09:01 -05:00
- // MIR for `main` before SimplifyCfg-early-opt
+ // MIR for `main` after SimplifyCfg-early-opt
fn main() -> () {
2023-06-06 08:47:00 -05:00
let mut _0: ();
let mut _1: ();
let mut _2: bool;
let mut _3: !;
2020-04-02 16:09:01 -05:00
bb0: {
2023-06-06 08:47:00 -05:00
goto -> bb1;
2021-09-17 19:00:00 -05:00
}
bb1: {
2023-06-06 08:47:00 -05:00
- goto -> bb2;
+ StorageLive(_2);
+ _2 = bar() -> [return: bb2, unwind: bb5];
2020-04-02 16:09:01 -05:00
}
2023-06-06 08:47:00 -05:00
bb2: {
- StorageLive(_2);
- _2 = bar() -> [return: bb3, unwind: bb6];
+ switchInt(move _2) -> [0: bb4, otherwise: bb3];
2021-09-17 19:00:00 -05:00
}
2023-06-06 08:47:00 -05:00
bb3: {
- switchInt(move _2) -> [0: bb5, otherwise: bb4];
- }
-
2021-09-17 19:00:00 -05:00
- bb4: {
2023-06-06 08:47:00 -05:00
_0 = const ();
StorageDead(_2);
return;
2020-04-09 05:58:36 -05:00
}
2021-09-17 19:00:00 -05:00
- bb5: {
+ bb4: {
2023-06-06 08:47:00 -05:00
_1 = const ();
StorageDead(_2);
goto -> bb1;
}
2021-09-17 19:00:00 -05:00
- bb6 (cleanup): {
+ bb5 (cleanup): {
2023-06-06 08:47:00 -05:00
resume;
2020-04-02 16:09:01 -05:00
}
}