rust/tests/mir-opt/const_prop/switch_int.main.SimplifyConstCondition-after-const-prop.panic-unwind.diff

29 lines
624 B
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-04 12:15:01 -05:00
fn main() -> () {
2023-06-06 08:47:00 -05:00
let mut _0: ();
let mut _1: i32;
2020-04-04 12:15:01 -05:00
bb0: {
2023-06-06 08:47:00 -05:00
StorageLive(_1);
_1 = const 1_i32;
- switchInt(const 1_i32) -> [1: bb2, otherwise: bb1];
+ goto -> bb2;
2020-04-04 12:15:01 -05:00
}
bb1: {
2023-06-23 11:53:09 -05:00
_0 = foo(const -1_i32) -> [return: bb3, unwind continue];
2020-04-04 12:15:01 -05:00
}
bb2: {
2023-06-23 11:53:09 -05:00
_0 = foo(const 0_i32) -> [return: bb3, unwind continue];
2020-04-04 12:15:01 -05:00
}
bb3: {
2023-06-06 08:47:00 -05:00
StorageDead(_1);
return;
2020-04-04 12:15:01 -05:00
}
}