2023-02-24 15:33:22 -06:00
|
|
|
// MIR for `unchecked_shr_signed_smaller` after PreCodegen
|
|
|
|
|
|
|
|
fn unchecked_shr_signed_smaller(_1: i16, _2: u32) -> i16 {
|
|
|
|
debug a => _1; // in scope 0 at $DIR/unchecked_shifts.rs:+0:44: +0:45
|
|
|
|
debug b => _2; // in scope 0 at $DIR/unchecked_shifts.rs:+0:52: +0:53
|
|
|
|
let mut _0: i16; // return place in scope 0 at $DIR/unchecked_shifts.rs:+0:63: +0:66
|
2023-04-05 03:44:20 -05:00
|
|
|
scope 1 (inlined core::num::<impl i16>::unchecked_shr) { // at $DIR/unchecked_shifts.rs:17:7: 17:23
|
2023-02-24 15:33:22 -06:00
|
|
|
debug self => _1; // in scope 1 at $SRC_DIR/core/src/num/int_macros.rs:LL:COL
|
|
|
|
debug rhs => _2; // in scope 1 at $SRC_DIR/core/src/num/int_macros.rs:LL:COL
|
2023-05-26 13:53:34 -05:00
|
|
|
let mut _11: i16; // in scope 1 at $SRC_DIR/core/src/num/mod.rs:LL:COL
|
2023-02-24 15:33:22 -06:00
|
|
|
scope 2 {
|
2023-05-14 06:25:47 -05:00
|
|
|
scope 3 (inlined core::num::<impl i16>::unchecked_shr::conv) { // at $SRC_DIR/core/src/num/mod.rs:LL:COL
|
2023-05-26 13:53:34 -05:00
|
|
|
debug x => _2; // in scope 3 at $SRC_DIR/core/src/num/mod.rs:LL:COL
|
|
|
|
let mut _6: std::result::Result<i16, std::num::TryFromIntError>; // in scope 3 at $SRC_DIR/core/src/num/mod.rs:LL:COL
|
|
|
|
let mut _9: std::option::Option<i16>; // in scope 3 at $SRC_DIR/core/src/num/mod.rs:LL:COL
|
2023-05-14 06:25:47 -05:00
|
|
|
scope 4 {
|
|
|
|
scope 5 (inlined <u32 as TryInto<i16>>::try_into) { // at $SRC_DIR/core/src/num/mod.rs:LL:COL
|
2023-05-26 13:53:34 -05:00
|
|
|
debug self => _2; // in scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
2023-05-14 06:25:47 -05:00
|
|
|
scope 6 (inlined convert::num::<impl TryFrom<u32> for i16>::try_from) { // at $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
2023-05-26 13:53:34 -05:00
|
|
|
debug u => _2; // in scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
|
|
|
|
let mut _3: u32; // in scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
|
|
|
|
let mut _4: bool; // in scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
|
|
|
|
let mut _5: i16; // in scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
|
2023-05-14 06:25:47 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
scope 7 (inlined Result::<i16, TryFromIntError>::ok) { // at $SRC_DIR/core/src/num/mod.rs:LL:COL
|
2023-05-26 13:53:34 -05:00
|
|
|
debug self => _6; // in scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
|
|
|
|
let mut _7: isize; // in scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
|
|
|
|
let _8: i16; // in scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
|
2023-05-14 06:25:47 -05:00
|
|
|
scope 8 {
|
2023-05-26 13:53:34 -05:00
|
|
|
debug x => _8; // in scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
|
2023-05-14 06:25:47 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
scope 9 (inlined #[track_caller] Option::<i16>::unwrap_unchecked) { // at $SRC_DIR/core/src/num/mod.rs:LL:COL
|
2023-05-26 13:53:34 -05:00
|
|
|
debug self => _9; // in scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
|
|
|
|
let mut _10: isize; // in scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
|
|
|
|
let mut _12: &std::option::Option<i16>; // in scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
|
2023-05-14 06:25:47 -05:00
|
|
|
scope 10 {
|
2023-05-26 13:53:34 -05:00
|
|
|
debug val => _11; // in scope 10 at $SRC_DIR/core/src/option.rs:LL:COL
|
2023-05-14 06:25:47 -05:00
|
|
|
}
|
|
|
|
scope 11 {
|
|
|
|
scope 13 (inlined unreachable_unchecked) { // at $SRC_DIR/core/src/option.rs:LL:COL
|
|
|
|
scope 14 {
|
|
|
|
scope 15 (inlined unreachable_unchecked::runtime) { // at $SRC_DIR/core/src/intrinsics.rs:LL:COL
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
scope 12 (inlined Option::<i16>::is_some) { // at $SRC_DIR/core/src/option.rs:LL:COL
|
2023-05-26 13:53:34 -05:00
|
|
|
debug self => _12; // in scope 12 at $SRC_DIR/core/src/option.rs:LL:COL
|
2023-05-14 06:25:47 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-02-24 15:33:22 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2023-05-26 13:53:34 -05:00
|
|
|
StorageLive(_11); // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
|
|
|
|
StorageLive(_9); // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
|
|
|
|
StorageLive(_6); // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
|
|
|
|
StorageLive(_4); // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
|
|
|
|
StorageLive(_3); // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
|
|
|
|
_3 = const 32767_u32; // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
|
|
|
|
_4 = Gt(_2, move _3); // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
|
|
|
|
StorageDead(_3); // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
|
|
|
|
switchInt(move _4) -> [0: bb1, otherwise: bb2]; // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
|
2023-04-22 18:15:39 -05:00
|
|
|
}
|
|
|
|
|
2023-04-29 21:02:45 -05:00
|
|
|
bb1: {
|
2023-05-26 13:53:34 -05:00
|
|
|
StorageLive(_5); // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
|
|
|
|
_5 = _2 as i16 (IntToInt); // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
|
|
|
|
_6 = Result::<i16, TryFromIntError>::Ok(move _5); // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
|
|
|
|
StorageDead(_5); // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
|
2023-05-21 13:44:37 -05:00
|
|
|
goto -> bb3; // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
|
2023-05-14 06:25:47 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2023-05-26 13:53:34 -05:00
|
|
|
_6 = Result::<i16, TryFromIntError>::Err(const TryFromIntError(())); // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
|
2023-05-14 06:25:47 -05:00
|
|
|
// mir::Constant
|
|
|
|
// + span: no-location
|
|
|
|
// + literal: Const { ty: TryFromIntError, val: Value(<ZST>) }
|
2023-05-21 13:44:37 -05:00
|
|
|
goto -> bb3; // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
|
2023-05-14 06:25:47 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb3: {
|
2023-05-26 13:53:34 -05:00
|
|
|
StorageDead(_4); // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
|
|
|
|
StorageLive(_8); // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
|
|
|
|
_7 = discriminant(_6); // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
|
|
|
|
switchInt(move _7) -> [0: bb4, 1: bb5, otherwise: bb9]; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
|
2023-05-14 06:25:47 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb4: {
|
2023-05-26 13:53:34 -05:00
|
|
|
_8 = move ((_6 as Ok).0: i16); // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
|
|
|
|
_9 = Option::<i16>::Some(move _8); // scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
|
2023-05-21 13:44:37 -05:00
|
|
|
goto -> bb6; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
|
2023-05-14 06:25:47 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb5: {
|
2023-05-26 13:53:34 -05:00
|
|
|
_9 = Option::<i16>::None; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
|
2023-05-21 13:44:37 -05:00
|
|
|
goto -> bb6; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
|
2023-05-14 06:25:47 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb6: {
|
2023-05-21 13:44:37 -05:00
|
|
|
StorageDead(_8); // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
|
2023-05-26 13:53:34 -05:00
|
|
|
StorageDead(_6); // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
|
|
|
|
StorageLive(_12); // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
|
|
|
|
_10 = discriminant(_9); // scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
|
|
|
|
switchInt(move _10) -> [1: bb7, otherwise: bb9]; // scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
|
2023-05-14 06:25:47 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb7: {
|
2023-05-26 13:53:34 -05:00
|
|
|
_11 = move ((_9 as Some).0: i16); // scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
|
|
|
|
StorageDead(_12); // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
|
|
|
|
StorageDead(_9); // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
|
|
|
|
_0 = unchecked_shr::<i16>(_1, move _11) -> [return: bb8, unwind unreachable]; // scope 2 at $SRC_DIR/core/src/num/int_macros.rs:LL:COL
|
2023-05-21 13:44:37 -05:00
|
|
|
// mir::Constant
|
|
|
|
// + span: $SRC_DIR/core/src/num/int_macros.rs:LL:COL
|
|
|
|
// + literal: Const { ty: unsafe extern "rust-intrinsic" fn(i16, i16) -> i16 {unchecked_shr::<i16>}, val: Value(<ZST>) }
|
2023-05-14 06:25:47 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb8: {
|
2023-05-26 13:53:34 -05:00
|
|
|
StorageDead(_11); // scope 2 at $SRC_DIR/core/src/num/int_macros.rs:LL:COL
|
2023-05-21 13:44:37 -05:00
|
|
|
return; // scope 0 at $DIR/unchecked_shifts.rs:+2:2: +2:2
|
2023-05-14 06:25:47 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb9: {
|
2023-05-21 13:44:37 -05:00
|
|
|
unreachable; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
|
2023-02-24 15:33:22 -06:00
|
|
|
}
|
|
|
|
}
|