rust/tests/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
1.7 KiB
Diff
Raw Normal View History

2020-04-04 12:15:01 -05:00
- // MIR for `hello` before ConstProp
+ // MIR for `hello` after ConstProp
fn hello() -> () {
2022-11-02 16:54:49 -05:00
let mut _0: (); // return place in scope 0 at $DIR/control_flow_simplification.rs:+0:14: +0:14
let mut _1: bool; // in scope 0 at $DIR/control_flow_simplification.rs:+1:8: +1:21
let mut _2: !; // in scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL
2020-04-04 12:15:01 -05:00
bb0: {
2022-11-02 16:54:49 -05:00
StorageLive(_1); // scope 0 at $DIR/control_flow_simplification.rs:+1:8: +1:21
_1 = const _; // scope 0 at $DIR/control_flow_simplification.rs:+1:8: +1:21
- switchInt(move _1) -> [0: bb2, otherwise: bb1]; // scope 0 at $DIR/control_flow_simplification.rs:+1:8: +1:21
+ switchInt(const false) -> [0: bb2, otherwise: bb1]; // scope 0 at $DIR/control_flow_simplification.rs:+1:8: +1:21
2020-04-04 12:15:01 -05:00
}
bb1: {
_2 = begin_panic::<&str>(const "explicit panic"); // scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL
2020-04-04 12:15:01 -05:00
// mir::Constant
// + span: $SRC_DIR/std/src/panic.rs:LL:COL
2022-07-06 09:14:46 -05:00
// + literal: Const { ty: fn(&str) -> ! {begin_panic::<&str>}, val: Value(<ZST>) }
2020-04-04 12:15:01 -05:00
// mir::Constant
// + span: $SRC_DIR/std/src/panic.rs:LL:COL
2022-05-06 03:58:54 -05:00
// + literal: Const { ty: &str, val: Value(Slice(..)) }
2020-04-04 12:15:01 -05:00
}
2021-01-01 12:38:11 -06:00
bb2: {
2022-11-02 16:54:49 -05:00
StorageDead(_1); // scope 0 at $DIR/control_flow_simplification.rs:+3:5: +3:6
return; // scope 0 at $DIR/control_flow_simplification.rs:+4:2: +4:2
2021-01-01 12:38:11 -06:00
}
2020-04-04 12:15:01 -05:00
}