forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathref_of_deref.references.InstSimplify-after-simplifycfg.diff
58 lines (55 loc) · 1.53 KB
/
ref_of_deref.references.InstSimplify-after-simplifycfg.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
- // MIR for `references` before InstSimplify-after-simplifycfg
+ // MIR for `references` after InstSimplify-after-simplifycfg
fn references(_1: &i32, _2: &mut [i32]) -> () {
debug const_ref => _1;
debug mut_ref => _2;
let mut _0: ();
let _3: &i32;
scope 1 {
debug _a => _3;
let _4: &[i32];
scope 2 {
debug _b => _4;
let _5: &mut [i32];
scope 3 {
debug _c => _5;
let _6: *const i32;
scope 4 {
debug _d => _6;
let _7: *const [i32];
scope 5 {
debug _e => _7;
let _8: *mut [i32];
scope 6 {
debug _f => _8;
}
}
}
}
}
}
bb0: {
StorageLive(_3);
- _3 = &(*_1);
+ _3 = copy _1;
StorageLive(_4);
_4 = &(*_2);
StorageLive(_5);
- _5 = &mut (*_2);
+ _5 = copy _2;
StorageLive(_6);
_6 = &raw const (*_1);
StorageLive(_7);
_7 = &raw const (*_2);
StorageLive(_8);
_8 = &raw mut (*_2);
_0 = const ();
StorageDead(_8);
StorageDead(_7);
StorageDead(_6);
StorageDead(_5);
StorageDead(_4);
StorageDead(_3);
return;
}
}