rust/tests/mir-opt/jump_threading.mutate_discriminant.JumpThreading.panic-abort.diff

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

27 lines
620 B
Diff
Raw Normal View History

2023-01-16 16:12:36 -06:00
- // MIR for `mutate_discriminant` before JumpThreading
+ // MIR for `mutate_discriminant` after JumpThreading
fn mutate_discriminant() -> u8 {
let mut _0: u8;
let mut _1: std::option::Option<NonZeroUsize>;
let mut _2: isize;
bb0: {
discriminant(_1) = 1;
(((_1 as variant#1).0: NonZeroUsize).0: usize) = const 0_usize;
_2 = discriminant(_1);
switchInt(copy _2) -> [0: bb1, otherwise: bb2];
}
bb1: {
_0 = const 1_u8;
return;
}
bb2: {
_0 = const 2_u8;
unreachable;
}
}