2023-02-24 15:33:22 -06:00
|
|
|
// MIR for `unchecked_shl_unsigned_smaller` after PreCodegen
|
|
|
|
|
|
|
|
fn unchecked_shl_unsigned_smaller(_1: u16, _2: u32) -> u16 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug a => _1;
|
|
|
|
debug b => _2;
|
|
|
|
let mut _0: u16;
|
|
|
|
scope 1 (inlined core::num::<impl u16>::unchecked_shl) {
|
|
|
|
debug self => _1;
|
|
|
|
debug rhs => _2;
|
|
|
|
let mut _11: u16;
|
2023-02-24 15:33:22 -06:00
|
|
|
scope 2 {
|
2023-06-06 08:47:00 -05:00
|
|
|
scope 3 (inlined core::num::<impl u16>::unchecked_shl::conv) {
|
|
|
|
debug x => _2;
|
|
|
|
let mut _6: std::result::Result<u16, std::num::TryFromIntError>;
|
|
|
|
let mut _9: std::option::Option<u16>;
|
2023-05-14 06:25:47 -05:00
|
|
|
scope 4 {
|
2023-06-06 08:47:00 -05:00
|
|
|
scope 5 (inlined <u32 as TryInto<u16>>::try_into) {
|
|
|
|
debug self => _2;
|
|
|
|
scope 6 (inlined convert::num::<impl TryFrom<u32> for u16>::try_from) {
|
|
|
|
debug u => _2;
|
|
|
|
let mut _3: u32;
|
|
|
|
let mut _4: bool;
|
|
|
|
let mut _5: u16;
|
2023-05-14 06:25:47 -05:00
|
|
|
}
|
|
|
|
}
|
2023-06-06 08:47:00 -05:00
|
|
|
scope 7 (inlined Result::<u16, TryFromIntError>::ok) {
|
|
|
|
debug self => _6;
|
|
|
|
let mut _7: isize;
|
|
|
|
let _8: u16;
|
2023-05-14 06:25:47 -05:00
|
|
|
scope 8 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug x => _8;
|
2023-05-14 06:25:47 -05:00
|
|
|
}
|
|
|
|
}
|
2023-06-06 08:47:00 -05:00
|
|
|
scope 9 (inlined #[track_caller] Option::<u16>::unwrap_unchecked) {
|
|
|
|
debug self => _9;
|
|
|
|
let mut _10: isize;
|
|
|
|
let mut _12: &std::option::Option<u16>;
|
2023-05-14 06:25:47 -05:00
|
|
|
scope 10 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug val => _11;
|
2023-05-14 06:25:47 -05:00
|
|
|
}
|
|
|
|
scope 11 {
|
2023-06-06 08:47:00 -05:00
|
|
|
scope 13 (inlined unreachable_unchecked) {
|
2023-05-14 06:25:47 -05:00
|
|
|
scope 14 {
|
2023-06-06 08:47:00 -05:00
|
|
|
scope 15 (inlined unreachable_unchecked::runtime) {
|
2023-05-14 06:25:47 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-06-06 08:47:00 -05:00
|
|
|
scope 12 (inlined Option::<u16>::is_some) {
|
|
|
|
debug self => _12;
|
2023-05-14 06:25:47 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-02-24 15:33:22 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_11);
|
|
|
|
StorageLive(_9);
|
|
|
|
StorageLive(_6);
|
|
|
|
StorageLive(_4);
|
|
|
|
StorageLive(_3);
|
|
|
|
_3 = const 65535_u32;
|
|
|
|
_4 = Gt(_2, move _3);
|
|
|
|
StorageDead(_3);
|
|
|
|
switchInt(move _4) -> [0: bb1, otherwise: bb2];
|
2023-04-22 18:15:39 -05:00
|
|
|
}
|
|
|
|
|
2023-04-29 21:02:45 -05:00
|
|
|
bb1: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_5);
|
|
|
|
_5 = _2 as u16 (IntToInt);
|
|
|
|
_6 = Result::<u16, TryFromIntError>::Ok(move _5);
|
|
|
|
StorageDead(_5);
|
|
|
|
goto -> bb3;
|
2023-05-14 06:25:47 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2023-06-06 08:47:00 -05:00
|
|
|
_6 = Result::<u16, TryFromIntError>::Err(const TryFromIntError(()));
|
|
|
|
goto -> bb3;
|
2023-05-14 06:25:47 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb3: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_4);
|
|
|
|
StorageLive(_8);
|
|
|
|
_7 = discriminant(_6);
|
|
|
|
switchInt(move _7) -> [0: bb4, 1: bb5, otherwise: bb9];
|
2023-05-14 06:25:47 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb4: {
|
2023-06-06 08:47:00 -05:00
|
|
|
_8 = move ((_6 as Ok).0: u16);
|
|
|
|
_9 = Option::<u16>::Some(move _8);
|
|
|
|
goto -> bb6;
|
2023-05-14 06:25:47 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb5: {
|
2023-06-06 08:47:00 -05:00
|
|
|
_9 = Option::<u16>::None;
|
|
|
|
goto -> bb6;
|
2023-05-14 06:25:47 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb6: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_8);
|
|
|
|
StorageDead(_6);
|
|
|
|
StorageLive(_12);
|
|
|
|
_10 = discriminant(_9);
|
|
|
|
switchInt(move _10) -> [1: bb7, otherwise: bb9];
|
2023-05-14 06:25:47 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb7: {
|
2023-06-06 08:47:00 -05:00
|
|
|
_11 = move ((_9 as Some).0: u16);
|
|
|
|
StorageDead(_12);
|
|
|
|
StorageDead(_9);
|
|
|
|
_0 = unchecked_shl::<u16>(_1, move _11) -> [return: bb8, unwind unreachable];
|
2023-05-14 06:25:47 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb8: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_11);
|
|
|
|
return;
|
2023-05-14 06:25:47 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb9: {
|
2023-06-06 08:47:00 -05:00
|
|
|
unreachable;
|
2023-02-24 15:33:22 -06:00
|
|
|
}
|
|
|
|
}
|