rust/tests/mir-opt/simplify_duplicate_unreachable_blocks.assert_nonzero_nonmax.SimplifyCfg-after-uninhabited-enum-branching.diff
2023-06-15 15:19:11 -04:00

26 lines
557 B
Diff

- // MIR for `assert_nonzero_nonmax` before SimplifyCfg-after-uninhabited-enum-branching
+ // MIR for `assert_nonzero_nonmax` after SimplifyCfg-after-uninhabited-enum-branching
fn assert_nonzero_nonmax(_1: u8) -> u8 {
let mut _0: u8;
bb0: {
- switchInt(_1) -> [0: bb1, 255: bb2, otherwise: bb3];
+ switchInt(_1) -> [0: bb1, 255: bb1, otherwise: bb2];
}
bb1: {
unreachable;
}
bb2: {
- unreachable;
- }
-
- bb3: {
_0 = _1;
return;
}
}