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

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

27 lines
571 B
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() -> () {
2023-06-06 08:47:00 -05:00
let mut _0: ();
let mut _1: bool;
let mut _2: !;
2020-04-04 12:15:01 -05:00
bb0: {
2023-06-06 08:47:00 -05:00
StorageLive(_1);
2023-02-08 12:54:34 -06:00
- _1 = const _;
2023-06-06 08:47:00 -05:00
- switchInt(move _1) -> [0: bb2, otherwise: bb1];
2023-02-08 12:54:34 -06:00
+ _1 = const false;
2023-06-06 08:47:00 -05:00
+ switchInt(const false) -> [0: bb2, otherwise: bb1];
2020-04-04 12:15:01 -05:00
}
bb1: {
2023-06-06 08:47:00 -05:00
_2 = begin_panic::<&str>(const "explicit panic") -> unwind unreachable;
2020-04-04 12:15:01 -05:00
}
2021-01-01 12:38:11 -06:00
bb2: {
2023-06-06 08:47:00 -05:00
StorageDead(_1);
return;
2021-01-01 12:38:11 -06:00
}
2020-04-04 12:15:01 -05:00
}