|
| 1 | +// MIR for `checked_shl` after PreCodegen |
| 2 | + |
| 3 | +fn checked_shl(_1: u32, _2: u32) -> Option<u32> { |
| 4 | + debug x => _1; // in scope 0 at $DIR/checked_ops.rs:+0:20: +0:21 |
| 5 | + debug rhs => _2; // in scope 0 at $DIR/checked_ops.rs:+0:28: +0:31 |
| 6 | + let mut _0: std::option::Option<u32>; // return place in scope 0 at $DIR/checked_ops.rs:+0:41: +0:52 |
| 7 | + scope 1 (inlined core::num::<impl u32>::checked_shl) { // at $DIR/checked_ops.rs:14:7: 14:23 |
| 8 | + debug self => _1; // in scope 1 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 9 | + debug rhs => _2; // in scope 1 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 10 | + let mut _13: (u32, bool); // in scope 1 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 11 | + let _14: u32; // in scope 1 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 12 | + let _15: bool; // in scope 1 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 13 | + let mut _16: bool; // in scope 1 at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 14 | + scope 2 { |
| 15 | + debug a => _14; // in scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 16 | + debug b => _15; // in scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 17 | + } |
| 18 | + scope 3 (inlined core::num::<impl u32>::overflowing_shl) { // at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 19 | + debug self => _1; // in scope 3 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 20 | + debug rhs => _2; // in scope 3 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 21 | + let mut _11: u32; // in scope 3 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 22 | + let mut _12: bool; // in scope 3 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 23 | + scope 4 (inlined core::num::<impl u32>::wrapping_shl) { // at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 24 | + debug self => _1; // in scope 4 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 25 | + debug rhs => _2; // in scope 4 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 26 | + let mut _3: u32; // in scope 4 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 27 | + let mut _4: u32; // in scope 4 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 28 | + scope 5 { |
| 29 | + scope 6 (inlined core::num::<impl u32>::unchecked_shl) { // at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 30 | + debug self => _1; // in scope 6 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 31 | + debug rhs => _4; // in scope 6 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 32 | + let mut _5: (u32,); // in scope 6 at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 33 | + let mut _6: u32; // in scope 6 at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 34 | + let mut _10: u32; // in scope 6 at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 35 | + scope 7 { |
| 36 | + scope 8 (inlined core::num::<impl u32>::unchecked_shl::conv) { // at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 37 | + debug x => _6; // in scope 8 at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 38 | + let mut _7: std::result::Result<u32, std::convert::Infallible>; // in scope 8 at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 39 | + let mut _9: std::option::Option<u32>; // in scope 8 at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 40 | + scope 9 { |
| 41 | + scope 10 (inlined <u32 as TryInto<u32>>::try_into) { // at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 42 | + debug self => _6; // in scope 10 at $SRC_DIR/core/src/convert/mod.rs:LL:COL |
| 43 | + scope 11 (inlined <u32 as TryFrom<u32>>::try_from) { // at $SRC_DIR/core/src/convert/mod.rs:LL:COL |
| 44 | + debug value => _6; // in scope 11 at $SRC_DIR/core/src/convert/mod.rs:LL:COL |
| 45 | + scope 21 (inlined <u32 as Into<u32>>::into) { // at $SRC_DIR/core/src/convert/mod.rs:LL:COL |
| 46 | + debug self => _6; // in scope 21 at $SRC_DIR/core/src/convert/mod.rs:LL:COL |
| 47 | + scope 22 (inlined <u32 as From<u32>>::from) { // at $SRC_DIR/core/src/convert/mod.rs:LL:COL |
| 48 | + debug t => _6; // in scope 22 at $SRC_DIR/core/src/convert/mod.rs:LL:COL |
| 49 | + } |
| 50 | + } |
| 51 | + } |
| 52 | + } |
| 53 | + scope 12 (inlined Result::<u32, Infallible>::ok) { // at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 54 | + debug self => _7; // in scope 12 at $SRC_DIR/core/src/result.rs:LL:COL |
| 55 | + let _8: u32; // in scope 12 at $SRC_DIR/core/src/result.rs:LL:COL |
| 56 | + scope 13 { |
| 57 | + debug x => _8; // in scope 13 at $SRC_DIR/core/src/result.rs:LL:COL |
| 58 | + } |
| 59 | + } |
| 60 | + scope 14 (inlined #[track_caller] Option::<u32>::unwrap_unchecked) { // at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 61 | + debug self => _9; // in scope 14 at $SRC_DIR/core/src/option.rs:LL:COL |
| 62 | + let mut _17: &std::option::Option<u32>; // in scope 14 at $SRC_DIR/core/src/option.rs:LL:COL |
| 63 | + scope 15 { |
| 64 | + debug val => _10; // in scope 15 at $SRC_DIR/core/src/option.rs:LL:COL |
| 65 | + } |
| 66 | + scope 16 { |
| 67 | + scope 18 (inlined unreachable_unchecked) { // at $SRC_DIR/core/src/option.rs:LL:COL |
| 68 | + scope 19 { |
| 69 | + scope 20 (inlined unreachable_unchecked::runtime) { // at $SRC_DIR/core/src/intrinsics.rs:LL:COL |
| 70 | + } |
| 71 | + } |
| 72 | + } |
| 73 | + } |
| 74 | + scope 17 (inlined Option::<u32>::is_some) { // at $SRC_DIR/core/src/option.rs:LL:COL |
| 75 | + debug self => _17; // in scope 17 at $SRC_DIR/core/src/option.rs:LL:COL |
| 76 | + } |
| 77 | + } |
| 78 | + } |
| 79 | + } |
| 80 | + } |
| 81 | + } |
| 82 | + } |
| 83 | + } |
| 84 | + } |
| 85 | + } |
| 86 | + |
| 87 | + bb0: { |
| 88 | + StorageLive(_14); // scope 0 at $DIR/checked_ops.rs:+1:7: +1:23 |
| 89 | + StorageLive(_15); // scope 0 at $DIR/checked_ops.rs:+1:7: +1:23 |
| 90 | + StorageLive(_13); // scope 1 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 91 | + StorageLive(_11); // scope 3 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 92 | + StorageLive(_6); // scope 3 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 93 | + StorageLive(_4); // scope 5 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 94 | + StorageLive(_3); // scope 5 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 95 | + _3 = const 31_u32; // scope 5 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 96 | + _4 = BitAnd(_2, move _3); // scope 5 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 97 | + StorageDead(_3); // scope 5 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 98 | + StorageLive(_10); // scope 7 at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 99 | + StorageLive(_5); // scope 7 at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 100 | + _5 = (_4,); // scope 7 at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 101 | + _6 = move (_5.0: u32); // scope 7 at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 102 | + StorageLive(_9); // scope 9 at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 103 | + StorageLive(_7); // scope 9 at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 104 | + _7 = Result::<u32, Infallible>::Ok(_6); // scope 11 at $SRC_DIR/core/src/convert/mod.rs:LL:COL |
| 105 | + StorageLive(_8); // scope 9 at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 106 | + _8 = move ((_7 as Ok).0: u32); // scope 12 at $SRC_DIR/core/src/result.rs:LL:COL |
| 107 | + _9 = Option::<u32>::Some(move _8); // scope 13 at $SRC_DIR/core/src/result.rs:LL:COL |
| 108 | + StorageDead(_8); // scope 9 at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 109 | + StorageDead(_7); // scope 9 at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 110 | + StorageLive(_17); // scope 9 at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 111 | + _10 = move ((_9 as Some).0: u32); // scope 14 at $SRC_DIR/core/src/option.rs:LL:COL |
| 112 | + StorageDead(_17); // scope 9 at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 113 | + StorageDead(_9); // scope 9 at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 114 | + StorageDead(_5); // scope 7 at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 115 | + _11 = unchecked_shl::<u32>(_1, move _10) -> [return: bb1, unwind unreachable]; // scope 7 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 116 | + // mir::Constant |
| 117 | + // + span: $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 118 | + // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(u32, u32) -> u32 {unchecked_shl::<u32>}, val: Value(<ZST>) } |
| 119 | + } |
| 120 | + |
| 121 | + bb1: { |
| 122 | + StorageDead(_10); // scope 7 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 123 | + StorageDead(_4); // scope 5 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 124 | + StorageDead(_6); // scope 3 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 125 | + StorageLive(_12); // scope 3 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 126 | + _12 = Ge(_2, const _); // scope 3 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 127 | + _13 = (move _11, move _12); // scope 3 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 128 | + StorageDead(_12); // scope 3 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 129 | + StorageDead(_11); // scope 3 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 130 | + _14 = (_13.0: u32); // scope 1 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 131 | + _15 = (_13.1: bool); // scope 1 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 132 | + StorageDead(_13); // scope 1 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 133 | + StorageLive(_16); // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 134 | + _16 = unlikely(_15) -> [return: bb2, unwind unreachable]; // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 135 | + // mir::Constant |
| 136 | + // + span: $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 137 | + // + literal: Const { ty: extern "rust-intrinsic" fn(bool) -> bool {unlikely}, val: Value(<ZST>) } |
| 138 | + } |
| 139 | + |
| 140 | + bb2: { |
| 141 | + switchInt(move _16) -> [0: bb3, otherwise: bb4]; // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL |
| 142 | + } |
| 143 | + |
| 144 | + bb3: { |
| 145 | + _0 = Option::<u32>::Some(_14); // scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 146 | + goto -> bb5; // scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 147 | + } |
| 148 | + |
| 149 | + bb4: { |
| 150 | + _0 = Option::<u32>::None; // scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 151 | + goto -> bb5; // scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 152 | + } |
| 153 | + |
| 154 | + bb5: { |
| 155 | + StorageDead(_16); // scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL |
| 156 | + StorageDead(_15); // scope 0 at $DIR/checked_ops.rs:+1:7: +1:23 |
| 157 | + StorageDead(_14); // scope 0 at $DIR/checked_ops.rs:+1:7: +1:23 |
| 158 | + return; // scope 0 at $DIR/checked_ops.rs:+2:2: +2:2 |
| 159 | + } |
| 160 | +} |
0 commit comments