2021-12-01 02:54:37 +00:00
|
|
|
- // MIR for `main` before SimplifyConstCondition-after-const-prop
|
|
|
|
+ // MIR for `main` after SimplifyConstCondition-after-const-prop
|
2020-04-02 21:09:01 +00:00
|
|
|
|
|
|
|
fn main() -> () {
|
2022-07-27 18:47:42 +00:00
|
|
|
let mut _0: (); // return place in scope 0 at $DIR/simplify_if.rs:+0:11: +0:11
|
|
|
|
let mut _1: bool; // in scope 0 at $DIR/simplify_if.rs:+1:8: +1:13
|
|
|
|
let _2: (); // in scope 0 at $DIR/simplify_if.rs:+2:9: +2:15
|
2020-04-02 21:09:01 +00:00
|
|
|
|
|
|
|
bb0: {
|
2022-07-27 18:47:42 +00:00
|
|
|
StorageLive(_1); // scope 0 at $DIR/simplify_if.rs:+1:8: +1:13
|
|
|
|
_1 = const false; // scope 0 at $DIR/simplify_if.rs:+1:8: +1:13
|
2022-12-04 00:03:27 +00:00
|
|
|
- switchInt(const false) -> [0: bb3, otherwise: bb1]; // scope 0 at $DIR/simplify_if.rs:+1:8: +1:13
|
2022-07-27 18:47:42 +00:00
|
|
|
+ goto -> bb3; // scope 0 at $DIR/simplify_if.rs:+1:8: +1:13
|
2020-04-02 21:09:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2023-06-08 07:34:53 +00:00
|
|
|
_2 = noop() -> [return: bb2, unwind unreachable]; // scope 0 at $DIR/simplify_if.rs:+2:9: +2:15
|
2020-04-02 21:09:01 +00:00
|
|
|
// mir::Constant
|
2023-04-05 08:44:20 +00:00
|
|
|
// + span: $DIR/simplify_if.rs:8:9: 8:13
|
2022-07-06 14:14:46 +00:00
|
|
|
// + literal: Const { ty: fn() {noop}, val: Value(<ZST>) }
|
2020-04-02 21:09:01 +00:00
|
|
|
}
|
|
|
|
|
2021-01-01 18:38:11 +00:00
|
|
|
bb2: {
|
2022-07-27 18:47:42 +00:00
|
|
|
goto -> bb4; // scope 0 at $DIR/simplify_if.rs:+1:5: +3:6
|
2021-01-01 18:38:11 +00:00
|
|
|
}
|
|
|
|
|
2020-04-02 21:09:01 +00:00
|
|
|
bb3: {
|
2022-07-27 18:47:42 +00:00
|
|
|
goto -> bb4; // scope 0 at $DIR/simplify_if.rs:+1:5: +3:6
|
2020-04-02 21:09:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb4: {
|
2022-07-27 18:47:42 +00:00
|
|
|
StorageDead(_1); // scope 0 at $DIR/simplify_if.rs:+3:5: +3:6
|
|
|
|
return; // scope 0 at $DIR/simplify_if.rs:+4:2: +4:2
|
2020-04-02 21:09:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|