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

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

26 lines
531 B
Diff
Raw Normal View History

2023-09-20 21:43:33 +00:00
- // MIR for `hello` before GVN
+ // MIR for `hello` after GVN
2020-04-04 17:15:01 +00:00
fn hello() -> () {
2023-06-06 09:47:00 -04:00
let mut _0: ();
let mut _1: bool;
let mut _2: !;
2020-04-04 17:15:01 +00:00
bb0: {
2023-06-06 09:47:00 -04:00
StorageLive(_1);
2023-09-20 21:43:33 +00:00
_1 = const _;
2023-06-06 09:47:00 -04:00
- switchInt(move _1) -> [0: bb2, otherwise: bb1];
+ switchInt(const false) -> [0: bb2, otherwise: bb1];
2020-04-04 17:15:01 +00:00
}
bb1: {
2023-06-06 09:47:00 -04:00
_2 = begin_panic::<&str>(const "explicit panic") -> unwind unreachable;
2020-04-04 17:15:01 +00:00
}
2021-01-01 15:38:11 -03:00
bb2: {
2023-06-06 09:47:00 -04:00
StorageDead(_1);
return;
2021-01-01 15:38:11 -03:00
}
2020-04-04 17:15:01 +00:00
}