|
| 1 | +- // MIR for `unchecked_shl_unsigned_smaller` before Inline |
| 2 | ++ // MIR for `unchecked_shl_unsigned_smaller` after Inline |
| 3 | + |
| 4 | + fn unchecked_shl_unsigned_smaller(_1: u16, _2: u32) -> u16 { |
| 5 | + debug a => _1; // in scope 0 at $DIR/unchecked_shifts.rs:+0:46: +0:47 |
| 6 | + debug b => _2; // in scope 0 at $DIR/unchecked_shifts.rs:+0:54: +0:55 |
| 7 | + let mut _0: u16; // return place in scope 0 at $DIR/unchecked_shifts.rs:+0:65: +0:68 |
| 8 | + let mut _3: u16; // in scope 0 at $DIR/unchecked_shifts.rs:+1:5: +1:6 |
| 9 | + let mut _4: u32; // in scope 0 at $DIR/unchecked_shifts.rs:+1:21: +1:22 |
| 10 | ++ scope 1 (inlined core::num::<impl u16>::unchecked_shl) { // at $DIR/unchecked_shifts.rs:10:7: 10:23 |
| 11 | ++ debug self => _3; // in scope 1 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 12 | ++ debug rhs => _4; // in scope 1 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 13 | ++ let mut _5: u16; // in scope 1 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 14 | ++ let mut _6: std::option::Option<u16>; // in scope 1 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 15 | ++ let mut _7: std::result::Result<u16, std::num::TryFromIntError>; // in scope 1 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 16 | ++ scope 2 { |
| 17 | ++ scope 3 (inlined Result::<u16, TryFromIntError>::ok) { // at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 18 | ++ debug self => _7; // in scope 3 at $SRC_DIR/core/src/result.rs:LL:COL |
| 19 | ++ let mut _8: isize; // in scope 3 at $SRC_DIR/core/src/result.rs:LL:COL |
| 20 | ++ let _9: u16; // in scope 3 at $SRC_DIR/core/src/result.rs:LL:COL |
| 21 | ++ scope 4 { |
| 22 | ++ debug x => _9; // in scope 4 at $SRC_DIR/core/src/result.rs:LL:COL |
| 23 | ++ } |
| 24 | ++ scope 5 { |
| 25 | ++ scope 6 { |
| 26 | ++ debug x => const TryFromIntError(()); // in scope 6 at $SRC_DIR/core/src/result.rs:LL:COL |
| 27 | ++ } |
| 28 | ++ } |
| 29 | ++ } |
| 30 | ++ scope 7 (inlined #[track_caller] Option::<u16>::unwrap_unchecked) { // at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 31 | ++ debug self => _6; // in scope 7 at $SRC_DIR/core/src/option.rs:LL:COL |
| 32 | ++ let mut _10: &std::option::Option<u16>; // in scope 7 at $SRC_DIR/core/src/option.rs:LL:COL |
| 33 | ++ let mut _11: isize; // in scope 7 at $SRC_DIR/core/src/option.rs:LL:COL |
| 34 | ++ scope 8 { |
| 35 | ++ debug val => _5; // in scope 8 at $SRC_DIR/core/src/option.rs:LL:COL |
| 36 | ++ } |
| 37 | ++ scope 9 { |
| 38 | ++ scope 11 (inlined unreachable_unchecked) { // at $SRC_DIR/core/src/option.rs:LL:COL |
| 39 | ++ scope 12 { |
| 40 | ++ scope 13 (inlined unreachable_unchecked::runtime) { // at $SRC_DIR/core/src/intrinsics.rs:LL:COL |
| 41 | ++ } |
| 42 | ++ } |
| 43 | ++ } |
| 44 | ++ } |
| 45 | ++ scope 10 (inlined Option::<u16>::is_some) { // at $SRC_DIR/core/src/option.rs:LL:COL |
| 46 | ++ debug self => _10; // in scope 10 at $SRC_DIR/core/src/option.rs:LL:COL |
| 47 | ++ } |
| 48 | ++ } |
| 49 | ++ } |
| 50 | ++ } |
| 51 | + |
| 52 | + bb0: { |
| 53 | + StorageLive(_3); // scope 0 at $DIR/unchecked_shifts.rs:+1:5: +1:6 |
| 54 | + _3 = _1; // scope 0 at $DIR/unchecked_shifts.rs:+1:5: +1:6 |
| 55 | + StorageLive(_4); // scope 0 at $DIR/unchecked_shifts.rs:+1:21: +1:22 |
| 56 | + _4 = _2; // scope 0 at $DIR/unchecked_shifts.rs:+1:21: +1:22 |
| 57 | +- _0 = core::num::<impl u16>::unchecked_shl(move _3, move _4) -> bb1; // scope 0 at $DIR/unchecked_shifts.rs:+1:5: +1:23 |
| 58 | ++ StorageLive(_5); // scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 59 | ++ StorageLive(_6); // scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 60 | ++ StorageLive(_7); // scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 61 | ++ _7 = <u32 as TryInto<u16>>::try_into(_4) -> bb1; // scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 62 | + // mir::Constant |
| 63 | +- // + span: $DIR/unchecked_shifts.rs:10:7: 10:20 |
| 64 | +- // + literal: Const { ty: unsafe fn(u16, u32) -> u16 {core::num::<impl u16>::unchecked_shl}, val: Value(<ZST>) } |
| 65 | ++ // + span: $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 66 | ++ // + literal: Const { ty: fn(u32) -> Result<u16, <u32 as TryInto<u16>>::Error> {<u32 as TryInto<u16>>::try_into}, val: Value(<ZST>) } |
| 67 | + } |
| 68 | + |
| 69 | + bb1: { |
| 70 | ++ StorageLive(_9); // scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 71 | ++ _8 = discriminant(_7); // scope 3 at $SRC_DIR/core/src/result.rs:LL:COL |
| 72 | ++ switchInt(move _8) -> [0: bb6, 1: bb4, otherwise: bb5]; // scope 3 at $SRC_DIR/core/src/result.rs:LL:COL |
| 73 | ++ } |
| 74 | ++ |
| 75 | ++ bb2: { |
| 76 | ++ StorageDead(_9); // scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 77 | ++ StorageDead(_7); // scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 78 | ++ StorageLive(_10); // scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 79 | ++ _11 = discriminant(_6); // scope 7 at $SRC_DIR/core/src/option.rs:LL:COL |
| 80 | ++ switchInt(move _11) -> [1: bb7, otherwise: bb5]; // scope 7 at $SRC_DIR/core/src/option.rs:LL:COL |
| 81 | ++ } |
| 82 | ++ |
| 83 | ++ bb3: { |
| 84 | ++ StorageDead(_5); // scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 85 | + StorageDead(_4); // scope 0 at $DIR/unchecked_shifts.rs:+1:22: +1:23 |
| 86 | + StorageDead(_3); // scope 0 at $DIR/unchecked_shifts.rs:+1:22: +1:23 |
| 87 | + return; // scope 0 at $DIR/unchecked_shifts.rs:+2:2: +2:2 |
| 88 | ++ } |
| 89 | ++ |
| 90 | ++ bb4: { |
| 91 | ++ _6 = Option::<u16>::None; // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL |
| 92 | ++ goto -> bb2; // scope 5 at $SRC_DIR/core/src/result.rs:LL:COL |
| 93 | ++ } |
| 94 | ++ |
| 95 | ++ bb5: { |
| 96 | ++ unreachable; // scope 3 at $SRC_DIR/core/src/result.rs:LL:COL |
| 97 | ++ } |
| 98 | ++ |
| 99 | ++ bb6: { |
| 100 | ++ _9 = move ((_7 as Ok).0: u16); // scope 3 at $SRC_DIR/core/src/result.rs:LL:COL |
| 101 | ++ _6 = Option::<u16>::Some(move _9); // scope 4 at $SRC_DIR/core/src/result.rs:LL:COL |
| 102 | ++ goto -> bb2; // scope 3 at $SRC_DIR/core/src/result.rs:LL:COL |
| 103 | ++ } |
| 104 | ++ |
| 105 | ++ bb7: { |
| 106 | ++ _5 = move ((_6 as Some).0: u16); // scope 7 at $SRC_DIR/core/src/option.rs:LL:COL |
| 107 | ++ StorageDead(_10); // scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 108 | ++ StorageDead(_6); // scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 109 | ++ _0 = unchecked_shl::<u16>(_3, move _5) -> bb3; // scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 110 | ++ // mir::Constant |
| 111 | ++ // + span: $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 112 | ++ // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(u16, u16) -> u16 {unchecked_shl::<u16>}, val: Value(<ZST>) } |
| 113 | + } |
| 114 | + } |
| 115 | + |
0 commit comments