2023-04-30 09:53:24 -05:00
|
|
|
// MIR for `step_forward` after PreCodegen
|
|
|
|
|
2024-04-16 13:11:30 -05:00
|
|
|
fn step_forward(_1: u16, _2: usize) -> u16 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug x => _1;
|
|
|
|
debug n => _2;
|
2024-04-16 13:11:30 -05:00
|
|
|
let mut _0: u16;
|
2024-06-17 02:36:21 -05:00
|
|
|
scope 1 (inlined <u16 as Step>::forward) {
|
|
|
|
let mut _8: u16;
|
|
|
|
scope 2 {
|
|
|
|
}
|
|
|
|
scope 3 (inlined <u16 as Step>::forward_checked) {
|
|
|
|
scope 4 {
|
|
|
|
scope 6 (inlined core::num::<impl u16>::checked_add) {
|
2024-06-23 01:00:44 -05:00
|
|
|
let mut _5: (u16, bool);
|
|
|
|
let mut _6: bool;
|
2024-06-17 02:36:21 -05:00
|
|
|
let mut _7: bool;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
scope 5 (inlined convert::num::ptr_try_from_impls::<impl TryFrom<usize> for u16>::try_from) {
|
|
|
|
let mut _3: bool;
|
|
|
|
let mut _4: u16;
|
|
|
|
}
|
|
|
|
}
|
2024-06-23 01:00:44 -05:00
|
|
|
scope 7 (inlined Option::<u16>::is_none) {
|
|
|
|
scope 8 (inlined Option::<u16>::is_some) {
|
2024-06-17 02:36:21 -05:00
|
|
|
}
|
|
|
|
}
|
2024-06-23 01:00:44 -05:00
|
|
|
scope 9 (inlined core::num::<impl u16>::wrapping_add) {
|
2024-06-17 02:36:21 -05:00
|
|
|
}
|
|
|
|
}
|
2023-04-30 09:53:24 -05:00
|
|
|
|
|
|
|
bb0: {
|
2024-06-17 02:36:21 -05:00
|
|
|
StorageLive(_4);
|
|
|
|
StorageLive(_3);
|
|
|
|
_3 = Gt(copy _2, const 65535_usize);
|
|
|
|
switchInt(move _3) -> [0: bb1, otherwise: bb5];
|
2023-04-30 09:53:24 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2024-06-17 02:36:21 -05:00
|
|
|
_4 = copy _2 as u16 (IntToInt);
|
|
|
|
StorageDead(_3);
|
2024-06-23 01:00:44 -05:00
|
|
|
StorageLive(_7);
|
2024-06-17 02:36:21 -05:00
|
|
|
StorageLive(_6);
|
|
|
|
StorageLive(_5);
|
|
|
|
_5 = AddWithOverflow(copy _1, copy _4);
|
|
|
|
_6 = copy (_5.1: bool);
|
|
|
|
_7 = unlikely(move _6) -> [return: bb2, unwind unreachable];
|
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
|
|
|
switchInt(move _7) -> [0: bb3, otherwise: bb4];
|
|
|
|
}
|
|
|
|
|
|
|
|
bb3: {
|
2024-06-23 01:00:44 -05:00
|
|
|
StorageDead(_5);
|
2024-06-17 02:36:21 -05:00
|
|
|
StorageDead(_6);
|
2024-06-23 01:00:44 -05:00
|
|
|
StorageDead(_7);
|
2024-06-17 02:36:21 -05:00
|
|
|
goto -> bb7;
|
|
|
|
}
|
|
|
|
|
|
|
|
bb4: {
|
2024-06-23 01:00:44 -05:00
|
|
|
StorageDead(_5);
|
2024-06-17 02:36:21 -05:00
|
|
|
StorageDead(_6);
|
2024-06-23 01:00:44 -05:00
|
|
|
StorageDead(_7);
|
2024-06-17 02:36:21 -05:00
|
|
|
goto -> bb6;
|
|
|
|
}
|
|
|
|
|
|
|
|
bb5: {
|
|
|
|
StorageDead(_3);
|
|
|
|
goto -> bb6;
|
|
|
|
}
|
|
|
|
|
|
|
|
bb6: {
|
|
|
|
assert(!const true, "attempt to compute `{} + {}`, which would overflow", const core::num::<impl u16>::MAX, const 1_u16) -> [success: bb7, unwind continue];
|
|
|
|
}
|
|
|
|
|
|
|
|
bb7: {
|
|
|
|
StorageLive(_8);
|
|
|
|
_8 = copy _2 as u16 (IntToInt);
|
|
|
|
_0 = Add(copy _1, copy _8);
|
|
|
|
StorageDead(_8);
|
|
|
|
StorageDead(_4);
|
2023-06-06 08:47:00 -05:00
|
|
|
return;
|
2023-04-30 09:53:24 -05:00
|
|
|
}
|
|
|
|
}
|