rust/tests/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.diff

37 lines
1.6 KiB
Diff
Raw Normal View History

2021-11-30 20:54:37 -06:00
- // MIR for `main` before SimplifyConstCondition-after-const-prop
+ // MIR for `main` after SimplifyConstCondition-after-const-prop
2020-04-02 16:09:01 -05:00
fn main() -> () {
2022-07-27 13:47:42 -05: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 16:09:01 -05:00
bb0: {
2022-07-27 13:47:42 -05: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
- switchInt(const false) -> [0: bb3, otherwise: bb1]; // scope 0 at $DIR/simplify_if.rs:+1:8: +1:13
2022-07-27 13:47:42 -05:00
+ goto -> bb3; // scope 0 at $DIR/simplify_if.rs:+1:8: +1:13
2020-04-02 16:09:01 -05:00
}
bb1: {
2022-07-27 13:47:42 -05:00
_2 = noop() -> bb2; // scope 0 at $DIR/simplify_if.rs:+2:9: +2:15
2020-04-02 16:09:01 -05:00
// mir::Constant
2023-04-05 03:44:20 -05:00
// + span: $DIR/simplify_if.rs:8:9: 8:13
2022-07-06 09:14:46 -05:00
// + literal: Const { ty: fn() {noop}, val: Value(<ZST>) }
2020-04-02 16:09:01 -05:00
}
2021-01-01 12:38:11 -06:00
bb2: {
2022-07-27 13:47:42 -05:00
goto -> bb4; // scope 0 at $DIR/simplify_if.rs:+1:5: +3:6
2021-01-01 12:38:11 -06:00
}
2020-04-02 16:09:01 -05:00
bb3: {
2022-07-27 13:47:42 -05:00
goto -> bb4; // scope 0 at $DIR/simplify_if.rs:+1:5: +3:6
2020-04-02 16:09:01 -05:00
}
bb4: {
2022-07-27 13:47:42 -05: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 16:09:01 -05:00
}
}