1- // MIR for `wrapping` before LowerIntrinsics 2+ // MIR for `wrapping` after LowerIntrinsics 3 4 fn wrapping(_1: T, _2: T) -> () { 5 debug a => _1; // in scope 0 at $DIR/lower_intrinsics.rs:6:26: 6:27 6 debug b => _2; // in scope 0 at $DIR/lower_intrinsics.rs:6:32: 6:33 7 let mut _0: (); // return place in scope 0 at $DIR/lower_intrinsics.rs:6:38: 6:38 8 let _3: T; // in scope 0 at $DIR/lower_intrinsics.rs:7:9: 7:11 9 let mut _4: T; // in scope 0 at $DIR/lower_intrinsics.rs:7:45: 7:46 10 let mut _5: T; // in scope 0 at $DIR/lower_intrinsics.rs:7:48: 7:49 11 let mut _7: T; // in scope 0 at $DIR/lower_intrinsics.rs:8:45: 8:46 12 let mut _8: T; // in scope 0 at $DIR/lower_intrinsics.rs:8:48: 8:49 13 let mut _10: T; // in scope 0 at $DIR/lower_intrinsics.rs:9:45: 9:46 14 let mut _11: T; // in scope 0 at $DIR/lower_intrinsics.rs:9:48: 9:49 15 scope 1 { 16 debug _x => _3; // in scope 1 at $DIR/lower_intrinsics.rs:7:9: 7:11 17 let _6: T; // in scope 1 at $DIR/lower_intrinsics.rs:8:9: 8:11 18 scope 2 { 19 debug _y => _6; // in scope 2 at $DIR/lower_intrinsics.rs:8:9: 8:11 20 let _9: T; // in scope 2 at $DIR/lower_intrinsics.rs:9:9: 9:11 21 scope 3 { 22 debug _z => _9; // in scope 3 at $DIR/lower_intrinsics.rs:9:9: 9:11 23 } 24 } 25 } 26 27 bb0: { 28 StorageLive(_3); // scope 0 at $DIR/lower_intrinsics.rs:7:9: 7:11 29 StorageLive(_4); // scope 0 at $DIR/lower_intrinsics.rs:7:45: 7:46 30 _4 = _1; // scope 0 at $DIR/lower_intrinsics.rs:7:45: 7:46 31 StorageLive(_5); // scope 0 at $DIR/lower_intrinsics.rs:7:48: 7:49 32 _5 = _2; // scope 0 at $DIR/lower_intrinsics.rs:7:48: 7:49 33- _3 = wrapping_add::<T>(move _4, move _5) -> bb1; // scope 0 at $DIR/lower_intrinsics.rs:7:14: 7:50 34- // mir::Constant 35- // + span: $DIR/lower_intrinsics.rs:7:14: 7:44 36- // + literal: Const { ty: extern "rust-intrinsic" fn(T, T) -> T {std::intrinsics::wrapping_add::<T>}, val: Value(Scalar(<ZST>)) } 37+ _3 = Add(move _4, move _5); // scope 0 at $DIR/lower_intrinsics.rs:7:14: 7:50 38+ goto -> bb1; // scope 0 at $DIR/lower_intrinsics.rs:7:14: 7:50 39 } 40 41 bb1: { 42 StorageDead(_5); // scope 0 at $DIR/lower_intrinsics.rs:7:49: 7:50 43 StorageDead(_4); // scope 0 at $DIR/lower_intrinsics.rs:7:49: 7:50 44 StorageLive(_6); // scope 1 at $DIR/lower_intrinsics.rs:8:9: 8:11 45 StorageLive(_7); // scope 1 at $DIR/lower_intrinsics.rs:8:45: 8:46 46 _7 = _1; // scope 1 at $DIR/lower_intrinsics.rs:8:45: 8:46 47 StorageLive(_8); // scope 1 at $DIR/lower_intrinsics.rs:8:48: 8:49 48 _8 = _2; // scope 1 at $DIR/lower_intrinsics.rs:8:48: 8:49 49- _6 = wrapping_sub::<T>(move _7, move _8) -> bb2; // scope 1 at $DIR/lower_intrinsics.rs:8:14: 8:50 50- // mir::Constant 51- // + span: $DIR/lower_intrinsics.rs:8:14: 8:44 52- // + literal: Const { ty: extern "rust-intrinsic" fn(T, T) -> T {std::intrinsics::wrapping_sub::<T>}, val: Value(Scalar(<ZST>)) } 53+ _6 = Sub(move _7, move _8); // scope 1 at $DIR/lower_intrinsics.rs:8:14: 8:50 54+ goto -> bb2; // scope 1 at $DIR/lower_intrinsics.rs:8:14: 8:50 55 } 56 57 bb2: { 58 StorageDead(_8); // scope 1 at $DIR/lower_intrinsics.rs:8:49: 8:50 59 StorageDead(_7); // scope 1 at $DIR/lower_intrinsics.rs:8:49: 8:50 60 StorageLive(_9); // scope 2 at $DIR/lower_intrinsics.rs:9:9: 9:11 61 StorageLive(_10); // scope 2 at $DIR/lower_intrinsics.rs:9:45: 9:46 62 _10 = _1; // scope 2 at $DIR/lower_intrinsics.rs:9:45: 9:46 63 StorageLive(_11); // scope 2 at $DIR/lower_intrinsics.rs:9:48: 9:49 64 _11 = _2; // scope 2 at $DIR/lower_intrinsics.rs:9:48: 9:49 65- _9 = wrapping_mul::<T>(move _10, move _11) -> bb3; // scope 2 at $DIR/lower_intrinsics.rs:9:14: 9:50 66- // mir::Constant 67- // + span: $DIR/lower_intrinsics.rs:9:14: 9:44 68- // + literal: Const { ty: extern "rust-intrinsic" fn(T, T) -> T {std::intrinsics::wrapping_mul::<T>}, val: Value(Scalar(<ZST>)) } 69+ _9 = Mul(move _10, move _11); // scope 2 at $DIR/lower_intrinsics.rs:9:14: 9:50 70+ goto -> bb3; // scope 2 at $DIR/lower_intrinsics.rs:9:14: 9:50 71 } 72 73 bb3: { 74 StorageDead(_11); // scope 2 at $DIR/lower_intrinsics.rs:9:49: 9:50 75 StorageDead(_10); // scope 2 at $DIR/lower_intrinsics.rs:9:49: 9:50 76 _0 = const (); // scope 0 at $DIR/lower_intrinsics.rs:6:38: 10:2 77 StorageDead(_9); // scope 2 at $DIR/lower_intrinsics.rs:10:1: 10:2 78 StorageDead(_6); // scope 1 at $DIR/lower_intrinsics.rs:10:1: 10:2 79 StorageDead(_3); // scope 0 at $DIR/lower_intrinsics.rs:10:1: 10:2 80 return; // scope 0 at $DIR/lower_intrinsics.rs:10:2: 10:2 81 } 82 83 bb4 (cleanup): { 84 resume; // scope 0 at $DIR/lower_intrinsics.rs:6:1: 10:2 85 } 86 } 87 88