2020-04-04 12:15:01 -05:00
|
|
|
- // MIR for `main` before ConstProp
|
|
|
|
+ // MIR for `main` after ConstProp
|
|
|
|
|
|
|
|
fn main() -> () {
|
2022-07-27 13:47:42 -05:00
|
|
|
let mut _0: (); // return place in scope 0 at $DIR/discriminant.rs:+0:11: +0:11
|
|
|
|
let _1: i32; // in scope 0 at $DIR/discriminant.rs:+1:9: +1:10
|
|
|
|
let mut _2: i32; // in scope 0 at $DIR/discriminant.rs:+1:13: +1:64
|
|
|
|
let mut _3: std::option::Option<bool>; // in scope 0 at $DIR/discriminant.rs:+1:34: +1:44
|
|
|
|
let mut _4: isize; // in scope 0 at $DIR/discriminant.rs:+1:21: +1:31
|
2020-04-04 12:15:01 -05:00
|
|
|
scope 1 {
|
2022-07-27 13:47:42 -05:00
|
|
|
debug x => _1; // in scope 1 at $DIR/discriminant.rs:+1:9: +1:10
|
2020-04-04 12:15:01 -05:00
|
|
|
}
|
2022-06-10 01:09:04 -05:00
|
|
|
scope 2 {
|
|
|
|
}
|
2020-04-04 12:15:01 -05:00
|
|
|
|
|
|
|
bb0: {
|
2022-07-27 13:47:42 -05:00
|
|
|
StorageLive(_1); // scope 0 at $DIR/discriminant.rs:+1:9: +1:10
|
|
|
|
StorageLive(_2); // scope 0 at $DIR/discriminant.rs:+1:13: +1:64
|
|
|
|
StorageLive(_3); // scope 2 at $DIR/discriminant.rs:+1:34: +1:44
|
|
|
|
Deinit(_3); // scope 2 at $DIR/discriminant.rs:+1:34: +1:44
|
|
|
|
((_3 as Some).0: bool) = const true; // scope 2 at $DIR/discriminant.rs:+1:34: +1:44
|
|
|
|
discriminant(_3) = 1; // scope 2 at $DIR/discriminant.rs:+1:34: +1:44
|
|
|
|
- _4 = discriminant(_3); // scope 2 at $DIR/discriminant.rs:+1:21: +1:31
|
2022-12-03 18:03:27 -06:00
|
|
|
- switchInt(move _4) -> [1: bb1, otherwise: bb3]; // scope 2 at $DIR/discriminant.rs:+1:21: +1:31
|
2022-07-27 13:47:42 -05:00
|
|
|
+ _4 = const 1_isize; // scope 2 at $DIR/discriminant.rs:+1:21: +1:31
|
2022-12-03 18:03:27 -06:00
|
|
|
+ switchInt(const 1_isize) -> [1: bb1, otherwise: bb3]; // scope 2 at $DIR/discriminant.rs:+1:21: +1:31
|
2020-04-04 12:15:01 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2022-12-03 18:03:27 -06:00
|
|
|
switchInt(((_3 as Some).0: bool)) -> [0: bb3, otherwise: bb2]; // scope 2 at $DIR/discriminant.rs:+1:21: +1:31
|
2020-04-04 12:15:01 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2022-07-27 13:47:42 -05:00
|
|
|
_2 = const 42_i32; // scope 2 at $DIR/discriminant.rs:+1:47: +1:49
|
|
|
|
goto -> bb4; // scope 0 at $DIR/discriminant.rs:+1:13: +1:64
|
2020-04-04 12:15:01 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb3: {
|
2022-07-27 13:47:42 -05:00
|
|
|
_2 = const 10_i32; // scope 0 at $DIR/discriminant.rs:+1:59: +1:61
|
|
|
|
goto -> bb4; // scope 0 at $DIR/discriminant.rs:+1:13: +1:64
|
2020-04-04 12:15:01 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb4: {
|
2022-07-27 13:47:42 -05:00
|
|
|
_1 = Add(move _2, const 0_i32); // scope 0 at $DIR/discriminant.rs:+1:13: +1:68
|
|
|
|
StorageDead(_2); // scope 0 at $DIR/discriminant.rs:+1:67: +1:68
|
|
|
|
StorageDead(_3); // scope 0 at $DIR/discriminant.rs:+1:68: +1:69
|
2022-07-26 12:04:27 -05:00
|
|
|
_0 = const (); // scope 0 at $DIR/discriminant.rs:+0:11: +2:2
|
2022-07-27 13:47:42 -05:00
|
|
|
StorageDead(_1); // scope 0 at $DIR/discriminant.rs:+2:1: +2:2
|
|
|
|
return; // scope 0 at $DIR/discriminant.rs:+2:2: +2:2
|
2020-04-04 12:15:01 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|