• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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;
6      debug b => _2;
7      let mut _0: u16;
8      let mut _3: u16;
9      let mut _4: u32;
10+     scope 1 (inlined core::num::<impl u16>::unchecked_shl) {
11+         debug self => _3;
12+         debug rhs => _4;
13+         let mut _5: u16;
14+         let mut _6: bool;
15+         let mut _7: u32;
16+         scope 2 {
17+         }
18+     }
19
20      bb0: {
21          StorageLive(_3);
22          _3 = _1;
23          StorageLive(_4);
24          _4 = _2;
25-         _0 = core::num::<impl u16>::unchecked_shl(move _3, move _4) -> [return: bb1, unwind continue];
26-     }
27-
28-     bb1: {
29+         StorageLive(_5);
30+         StorageLive(_6);
31+         StorageLive(_7);
32+         _7 = const 65535_u32;
33+         _6 = Le(_4, move _7);
34+         StorageDead(_7);
35+         assume(move _6);
36+         StorageDead(_6);
37+         _5 = _4 as u16 (IntToInt);
38+         _0 = ShlUnchecked(_3, move _5);
39+         StorageDead(_5);
40          StorageDead(_4);
41          StorageDead(_3);
42          return;
43      }
44  }
45
46