2020-08-12 21:35:32 +00:00
|
|
|
- // MIR for `foo` before MatchBranchSimplification
|
|
|
|
+ // MIR for `foo` after MatchBranchSimplification
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
fn foo(_1: Option<()>) -> () {
|
2022-07-27 18:47:42 +00:00
|
|
|
debug bar => _1; // in scope 0 at $DIR/matches_reduce_branches.rs:+0:8: +0:11
|
|
|
|
let mut _0: (); // return place in scope 0 at $DIR/matches_reduce_branches.rs:+0:25: +0:25
|
2022-08-21 04:47:53 +00:00
|
|
|
let mut _2: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
|
|
|
let mut _3: isize; // in scope 0 at $DIR/matches_reduce_branches.rs:+1:22: +1:26
|
|
|
|
+ let mut _4: isize; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
2020-08-12 21:35:32 +00:00
|
|
|
|
|
|
|
bb0: {
|
2022-08-21 04:47:53 +00:00
|
|
|
StorageLive(_2); // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
|
|
|
_3 = discriminant(_1); // scope 0 at $DIR/matches_reduce_branches.rs:+1:17: +1:20
|
2022-12-04 00:03:27 +00:00
|
|
|
- switchInt(move _3) -> [0: bb2, otherwise: bb1]; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
2022-08-21 04:47:53 +00:00
|
|
|
+ StorageLive(_4); // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
|
|
|
+ _4 = move _3; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
|
|
|
+ _2 = Eq(_4, const 0_isize); // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
|
|
|
+ StorageDead(_4); // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
2022-12-04 00:03:27 +00:00
|
|
|
+ switchInt(move _2) -> [0: bb2, otherwise: bb1]; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
2022-08-21 04:47:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
|
|
|
- _2 = const false; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
2021-03-17 01:32:53 +00:00
|
|
|
- goto -> bb3; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- bb2: {
|
2022-08-21 04:47:53 +00:00
|
|
|
- _2 = const true; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
2021-03-17 01:32:53 +00:00
|
|
|
- goto -> bb3; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- bb3: {
|
2022-12-04 00:03:27 +00:00
|
|
|
- switchInt(move _2) -> [0: bb5, otherwise: bb4]; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
2022-08-21 04:47:53 +00:00
|
|
|
- }
|
|
|
|
-
|
|
|
|
- bb4: {
|
|
|
|
Deinit(_0); // scope 0 at $DIR/matches_reduce_branches.rs:+2:9: +2:11
|
|
|
|
- goto -> bb6; // scope 0 at $DIR/matches_reduce_branches.rs:+1:5: +3:6
|
|
|
|
+ goto -> bb3; // scope 0 at $DIR/matches_reduce_branches.rs:+1:5: +3:6
|
|
|
|
}
|
|
|
|
|
|
|
|
- bb5: {
|
|
|
|
+ bb2: {
|
|
|
|
_0 = const (); // scope 0 at $DIR/matches_reduce_branches.rs:+3:6: +3:6
|
|
|
|
- goto -> bb6; // scope 0 at $DIR/matches_reduce_branches.rs:+1:5: +3:6
|
|
|
|
+ goto -> bb3; // scope 0 at $DIR/matches_reduce_branches.rs:+1:5: +3:6
|
|
|
|
}
|
|
|
|
|
|
|
|
- bb6: {
|
|
|
|
+ bb3: {
|
|
|
|
StorageDead(_2); // scope 0 at $DIR/matches_reduce_branches.rs:+3:5: +3:6
|
2022-07-27 18:47:42 +00:00
|
|
|
return; // scope 0 at $DIR/matches_reduce_branches.rs:+4:2: +4:2
|
2020-08-12 21:35:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|