]> git.proxmox.com Git - rustc.git/blob - src/test/mir-opt/dest-prop/simple.nrvo.DestinationPropagation.diff
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / mir-opt / dest-prop / simple.nrvo.DestinationPropagation.diff
1 - // MIR for `nrvo` before DestinationPropagation
2 + // MIR for `nrvo` after DestinationPropagation
3
4 fn nrvo(_1: for<'r> fn(&'r mut [u8; 1024])) -> [u8; 1024] {
5 debug init => _1; // in scope 0 at $DIR/simple.rs:4:9: 4:13
6 let mut _0: [u8; 1024]; // return place in scope 0 at $DIR/simple.rs:4:39: 4:49
7 let mut _2: [u8; 1024]; // in scope 0 at $DIR/simple.rs:5:9: 5:16
8 let _3: (); // in scope 0 at $DIR/simple.rs:6:5: 6:19
9 let mut _4: for<'r> fn(&'r mut [u8; 1024]); // in scope 0 at $DIR/simple.rs:6:5: 6:9
10 let mut _5: &mut [u8; 1024]; // in scope 0 at $DIR/simple.rs:6:10: 6:18
11 let mut _6: &mut [u8; 1024]; // in scope 0 at $DIR/simple.rs:6:10: 6:18
12 scope 1 {
13 debug buf => _2; // in scope 1 at $DIR/simple.rs:5:9: 5:16
14 }
15
16 bb0: {
17 StorageLive(_2); // scope 0 at $DIR/simple.rs:5:9: 5:16
18 _2 = [const 0_u8; 1024]; // scope 0 at $DIR/simple.rs:5:19: 5:28
19 StorageLive(_3); // scope 1 at $DIR/simple.rs:6:5: 6:19
20 StorageLive(_4); // scope 1 at $DIR/simple.rs:6:5: 6:9
21 _4 = _1; // scope 1 at $DIR/simple.rs:6:5: 6:9
22 StorageLive(_5); // scope 1 at $DIR/simple.rs:6:10: 6:18
23 StorageLive(_6); // scope 1 at $DIR/simple.rs:6:10: 6:18
24 _6 = &mut _2; // scope 1 at $DIR/simple.rs:6:10: 6:18
25 _5 = &mut (*_6); // scope 1 at $DIR/simple.rs:6:10: 6:18
26 _3 = move _4(move _5) -> bb1; // scope 1 at $DIR/simple.rs:6:5: 6:19
27 }
28
29 bb1: {
30 StorageDead(_5); // scope 1 at $DIR/simple.rs:6:18: 6:19
31 StorageDead(_4); // scope 1 at $DIR/simple.rs:6:18: 6:19
32 StorageDead(_6); // scope 1 at $DIR/simple.rs:6:19: 6:20
33 StorageDead(_3); // scope 1 at $DIR/simple.rs:6:19: 6:20
34 _0 = _2; // scope 1 at $DIR/simple.rs:7:5: 7:8
35 StorageDead(_2); // scope 0 at $DIR/simple.rs:8:1: 8:2
36 return; // scope 0 at $DIR/simple.rs:8:2: 8:2
37 }
38 }
39