rust/tests/mir-opt/const_prop/control_flow_simplification.hello.GVN.panic-unwind.diff

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

26 lines
553 B
Diff
Raw Normal View History

2023-09-20 16:43:33 -05:00
- // MIR for `hello` before GVN
+ // MIR for `hello` after GVN
2020-04-04 12:15:01 -05:00
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);
_1 = const <bool as NeedsDrop>::NEEDS;
2023-06-06 08:47:00 -05:00
- switchInt(move _1) -> [0: bb2, otherwise: bb1];
+ switchInt(const false) -> [0: bb2, otherwise: bb1];
2020-04-04 12:15:01 -05:00
}
bb1: {
2023-06-23 11:53:09 -05:00
_2 = begin_panic::<&str>(const "explicit panic") -> unwind continue;
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
}