rust/tests/mir-opt/simplify_dead_blocks.assert_nonzero_nonmax.SimplifyCfg-after-unreachable-enum-branching.diff

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

34 lines
705 B
Diff
Raw Permalink Normal View History

- // MIR for `assert_nonzero_nonmax` before SimplifyCfg-after-unreachable-enum-branching
+ // MIR for `assert_nonzero_nonmax` after SimplifyCfg-after-unreachable-enum-branching
2023-02-24 15:32:10 -06:00
fn assert_nonzero_nonmax(_1: u8) -> u8 {
2023-06-06 08:47:00 -05:00
let mut _0: u8;
2023-02-24 15:32:10 -06:00
bb0: {
- switchInt(copy _1) -> [0: bb3, 1: bb2, 255: bb3, otherwise: bb4];
+ switchInt(copy _1) -> [0: bb2, 1: bb1, 255: bb2, otherwise: bb3];
2023-02-24 15:32:10 -06:00
}
bb1: {
- _0 = const 1_u8;
- return;
2023-02-24 15:32:10 -06:00
- }
-
- bb2: {
_0 = const 2_u8;
return;
}
2023-02-24 15:32:10 -06:00
- bb3: {
+ bb2: {
unreachable;
}
- bb4: {
+ bb3: {
2023-06-06 08:47:00 -05:00
_0 = copy _1;
return;
2023-02-24 15:32:10 -06:00
}
}