Skip to content

Commit 366b41a

Browse files
committed
bless
1 parent bf19ff6 commit 366b41a

File tree

1 file changed

+45
-26
lines changed

1 file changed

+45
-26
lines changed

tests/mir-opt/const_array_locals.main.PromoteArraysOpt.diff

+45-26
Original file line numberDiff line numberDiff line change
@@ -4,48 +4,67 @@
44
fn main() -> () {
55
let mut _0: ();
66
let _1: [i32; 32];
7-
let mut _3: &[i32; 32];
8-
let _4: [i32; 32];
9-
let _5: ();
10-
let mut _6: [u16; 32];
11-
+ let mut _9: &[i32; 32];
7+
let mut _3: [i32; 12];
8+
let mut _4: [i32; 12];
9+
let mut _6: &[i32; 32];
10+
let _7: [i32; 32];
11+
let _8: ();
12+
let mut _9: [u16; 32];
13+
+ let mut _13: &[i32; 32];
1214
scope 1 {
1315
debug _arr => _1;
14-
let _2: [i32; 32];
15-
let mut _7: &[i32; 32];
16+
let _2: [[i32; 12]; 2];
17+
+ let mut _12: &[[i32; 12]; 2];
1618
scope 2 {
17-
debug _darr => _2;
18-
+ let mut _8: &[u16; 32];
19+
debug _foo => _2;
20+
let _5: [i32; 32];
21+
let mut _10: &[i32; 32];
22+
scope 3 {
23+
debug _darr => _5;
24+
+ let mut _11: &[u16; 32];
25+
}
1926
}
2027
}
2128

2229
bb0: {
23-
StorageLive(_1);
30+
- StorageLive(_1);
2431
- _1 = [const 255_i32, const 105_i32, const 15_i32, const 39_i32, const 62_i32, const 251_i32, const 191_i32, const 178_i32, const 9_i32, const 4_i32, const 56_i32, const 221_i32, const 193_i32, const 164_i32, const 194_i32, const 197_i32, const 6_i32, const 243_i32, const 218_i32, const 171_i32, const 87_i32, const 247_i32, const 104_i32, const 159_i32, const 22_i32, const 157_i32, const 105_i32, const 31_i32, const 96_i32, const 173_i32, const 50_i32, const 1_i32];
25-
+ _9 = const main::promoted[2];
26-
+ _1 = (*_9);
32+
+ _13 = const main::promoted[3];
33+
+ _1 = (*_13);
2734
FakeRead(ForLet(None), _1);
28-
StorageLive(_2);
29-
StorageLive(_3);
30-
_7 = const main::promoted[0];
31-
_3 = &(*_7);
32-
_2 = (*_3);
35+
- StorageLive(_2);
36+
- StorageLive(_3);
37+
- _3 = [const 255_i32, const 105_i32, const 15_i32, const 39_i32, const 62_i32, const 251_i32, const 191_i32, const 178_i32, const 9_i32, const 4_i32, const 56_i32, const 221_i32];
38+
- StorageLive(_4);
39+
- _4 = [const 193_i32, const 164_i32, const 194_i32, const 197_i32, const 6_i32, const 243_i32, const 218_i32, const 171_i32, const 87_i32, const 247_i32, const 104_i32, const 42_i32];
40+
- _2 = [move _3, move _4];
41+
- StorageDead(_4);
42+
- StorageDead(_3);
43+
+ _12 = const main::promoted[2];
44+
+ _2 = (*_12);
3345
FakeRead(ForLet(None), _2);
34-
StorageDead(_3);
3546
StorageLive(_5);
3647
StorageLive(_6);
37-
- _6 = [const 255_u16, const 105_u16, const 15_u16, const 39_u16, const 62_u16, const 251_u16, const 191_u16, const 178_u16, const 9_u16, const 4_u16, const 56_u16, const 221_u16, const 193_u16, const 164_u16, const 194_u16, const 197_u16, const 6_u16, const 243_u16, const 218_u16, const 171_u16, const 87_u16, const 247_u16, const 104_u16, const 159_u16, const 22_u16, const 157_u16, const 105_u16, const 31_u16, const 96_u16, const 173_u16, const 50_u16, const 1_u16];
38-
+ _8 = const main::promoted[1];
39-
+ _6 = (*_8);
40-
_5 = consume(move _6) -> [return: bb1, unwind: bb2];
48+
_10 = const main::promoted[0];
49+
_6 = &(*_10);
50+
_5 = (*_6);
51+
FakeRead(ForLet(None), _5);
52+
StorageDead(_6);
53+
StorageLive(_8);
54+
- StorageLive(_9);
55+
- _9 = [const 255_u16, const 105_u16, const 15_u16, const 39_u16, const 62_u16, const 251_u16, const 191_u16, const 178_u16, const 9_u16, const 4_u16, const 56_u16, const 221_u16, const 193_u16, const 164_u16, const 194_u16, const 197_u16, const 6_u16, const 243_u16, const 218_u16, const 171_u16, const 87_u16, const 247_u16, const 104_u16, const 159_u16, const 22_u16, const 157_u16, const 105_u16, const 31_u16, const 96_u16, const 173_u16, const 50_u16, const 1_u16];
56+
+ _11 = const main::promoted[1];
57+
+ _9 = (*_11);
58+
_8 = consume(move _9) -> [return: bb1, unwind: bb2];
4159
}
4260

4361
bb1: {
44-
StorageDead(_6);
45-
StorageDead(_5);
62+
- StorageDead(_9);
63+
StorageDead(_8);
4664
_0 = const ();
47-
StorageDead(_2);
48-
StorageDead(_1);
65+
StorageDead(_5);
66+
- StorageDead(_2);
67+
- StorageDead(_1);
4968
return;
5069
}
5170

0 commit comments

Comments
 (0)