Skip to content

Commit 8092b90

Browse files
committed
bless tests
1 parent c612ef8 commit 8092b90

9 files changed

+8
-179
lines changed

src/test/mir-opt/const_allocation.main.ConstProp.after.64bit.mir

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -9,61 +9,13 @@ fn main() -> () {
99
StorageLive(_1); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
1010
StorageLive(_2); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
1111
_2 = const {alloc1: &&[(Option<i32>, &[&str])]}; // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
12-
// ty::Const
13-
// + ty: &&[(std::option::Option<i32>, &[&str])]
14-
// + val: Value(Scalar(alloc1))
1512
// mir::Constant
1613
// + span: $DIR/const_allocation.rs:8:5: 8:8
17-
// + literal: Const { ty: &&[(std::option::Option<i32>, &[&str])], val: Value(Scalar(alloc1)) }
14+
// + literal: Const { ty: &&[(Option<i32>, &[&str])], val: Value(Scalar(alloc1)) }
1815
_1 = (*_2); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
1916
StorageDead(_2); // scope 0 at $DIR/const_allocation.rs:8:8: 8:9
2017
StorageDead(_1); // scope 0 at $DIR/const_allocation.rs:8:8: 8:9
2118
nop; // scope 0 at $DIR/const_allocation.rs:7:11: 9:2
2219
return; // scope 0 at $DIR/const_allocation.rs:9:2: 9:2
2320
}
2421
}
25-
26-
alloc1 (static: FOO, size: 16, align: 8) {
27-
╾───────alloc18───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
28-
}
29-
30-
alloc18 (size: 72, align: 8) {
31-
0x00 │ 00 00 00 00 __ __ __ __ ╾───────alloc5────────╼ │ ....░░░░╾──────╼
32-
0x10 │ 00 00 00 00 00 00 00 00 00 00 00 00 __ __ __ __ │ ............░░░░
33-
0x20 │ ╾───────alloc9────────╼ 02 00 00 00 00 00 00 00 │ ╾──────╼........
34-
0x30 │ 01 00 00 00 2a 00 00 00 ╾───────alloc14───────╼ │ ....*...╾──────╼
35-
0x40 │ 03 00 00 00 00 00 00 00 │ ........
36-
}
37-
38-
alloc5 (size: 0, align: 8) {}
39-
40-
alloc9 (size: 32, align: 8) {
41-
0x00 │ ╾───────alloc8────────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
42-
0x10 │ ╾───────alloc10───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
43-
}
44-
45-
alloc8 (size: 3, align: 1) {
46-
66 6f 6f │ foo
47-
}
48-
49-
alloc10 (size: 3, align: 1) {
50-
62 61 72 │ bar
51-
}
52-
53-
alloc14 (size: 48, align: 8) {
54-
0x00 │ ╾───────alloc13───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
55-
0x10 │ ╾───────alloc15───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
56-
0x20 │ ╾───────alloc16───────╼ 04 00 00 00 00 00 00 00 │ ╾──────╼........
57-
}
58-
59-
alloc13 (size: 3, align: 1) {
60-
6d 65 68 │ meh
61-
}
62-
63-
alloc15 (size: 3, align: 1) {
64-
6d 6f 70 │ mop
65-
}
66-
67-
alloc16 (size: 4, align: 1) {
68-
6d c3 b6 70 │ m..p
69-
}

src/test/mir-opt/const_allocation2.main.ConstProp.after.64bit.mir

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -9,59 +9,13 @@ fn main() -> () {
99
StorageLive(_1); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
1010
StorageLive(_2); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
1111
_2 = const {alloc1: &&[(Option<i32>, &[&u8])]}; // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
12-
// ty::Const
13-
// + ty: &&[(std::option::Option<i32>, &[&u8])]
14-
// + val: Value(Scalar(alloc1))
1512
// mir::Constant
1613
// + span: $DIR/const_allocation2.rs:5:5: 5:8
17-
// + literal: Const { ty: &&[(std::option::Option<i32>, &[&u8])], val: Value(Scalar(alloc1)) }
14+
// + literal: Const { ty: &&[(Option<i32>, &[&u8])], val: Value(Scalar(alloc1)) }
1815
_1 = (*_2); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
1916
StorageDead(_2); // scope 0 at $DIR/const_allocation2.rs:5:8: 5:9
2017
StorageDead(_1); // scope 0 at $DIR/const_allocation2.rs:5:8: 5:9
2118
nop; // scope 0 at $DIR/const_allocation2.rs:4:11: 6:2
2219
return; // scope 0 at $DIR/const_allocation2.rs:6:2: 6:2
2320
}
2421
}
25-
26-
alloc1 (static: FOO, size: 16, align: 8) {
27-
╾───────alloc28───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
28-
}
29-
30-
alloc28 (size: 72, align: 8) {
31-
0x00 │ 00 00 00 00 __ __ __ __ ╾───────alloc13───────╼ │ ....░░░░╾──────╼
32-
0x10 │ 00 00 00 00 00 00 00 00 00 00 00 00 __ __ __ __ │ ............░░░░
33-
0x20 │ ╾───────alloc18───────╼ 02 00 00 00 00 00 00 00 │ ╾──────╼........
34-
0x30 │ 01 00 00 00 2a 00 00 00 ╾───────alloc26───────╼ │ ....*...╾──────╼
35-
0x40 │ 03 00 00 00 00 00 00 00 │ ........
36-
}
37-
38-
alloc13 (size: 0, align: 8) {}
39-
40-
alloc18 (size: 16, align: 8) {
41-
╾───────alloc16───────╼ ╾───────alloc17───────╼ │ ╾──────╼╾──────╼
42-
}
43-
44-
alloc16 (size: 1, align: 1) {
45-
05 │ .
46-
}
47-
48-
alloc17 (size: 1, align: 1) {
49-
06 │ .
50-
}
51-
52-
alloc26 (size: 24, align: 8) {
53-
0x00 │ ╾─────alloc22+0x3─────╼ ╾───────alloc23───────╼ │ ╾──────╼╾──────╼
54-
0x10 │ ╾─────alloc25+0x2─────╼ │ ╾──────╼
55-
}
56-
57-
alloc22 (size: 4, align: 1) {
58-
2a 45 15 6f │ *E.o
59-
}
60-
61-
alloc23 (size: 1, align: 1) {
62-
2a │ *
63-
}
64-
65-
alloc25 (size: 4, align: 1) {
66-
2a 45 15 6f │ *E.o
67-
}

src/test/mir-opt/const_allocation3.main.ConstProp.after.64bit.mir

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ fn main() -> () {
99
StorageLive(_1); // scope 0 at $DIR/const_allocation3.rs:5:5: 5:8
1010
StorageLive(_2); // scope 0 at $DIR/const_allocation3.rs:5:5: 5:8
1111
_2 = const {alloc1: &&Packed}; // scope 0 at $DIR/const_allocation3.rs:5:5: 5:8
12-
// ty::Const
13-
// + ty: &&Packed
14-
// + val: Value(Scalar(alloc1))
1512
// mir::Constant
1613
// + span: $DIR/const_allocation3.rs:5:5: 5:8
1714
// + literal: Const { ty: &&Packed, val: Value(Scalar(alloc1)) }
@@ -22,38 +19,3 @@ fn main() -> () {
2219
return; // scope 0 at $DIR/const_allocation3.rs:6:2: 6:2
2320
}
2421
}
25-
26-
alloc1 (static: FOO, size: 8, align: 8) {
27-
╾───────alloc11───────╼ │ ╾──────╼
28-
}
29-
30-
alloc11 (size: 180, align: 1) {
31-
0x00 │ ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab │ ................
32-
0x10 │ ab ab ab ab ab ab ab ab ab ab ab ab ╾──alloc6── │ ............╾───
33-
0x20 │ ──────────╼ 01 ef cd ab 00 00 00 00 00 00 00 00 │ ───╼............
34-
0x30 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
35-
0x40 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
36-
0x50 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
37-
0x60 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
38-
0x70 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
39-
0x80 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ╾──── │ ..............╾─
40-
0x90 │ ─────alloc8─────╼ 00 00 ╾─────alloc9+0x63─────╼ │ ─────╼..╾──────╼
41-
0xa0 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
42-
0xb0 │ 00 00 00 00 │ ....
43-
}
44-
45-
alloc6 (size: 4, align: 4) {
46-
2a 00 00 00 │ *...
47-
}
48-
49-
alloc8 (fn: main)
50-
51-
alloc9 (size: 100, align: 1) {
52-
0x00 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
53-
0x10 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
54-
0x20 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
55-
0x30 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
56-
0x40 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
57-
0x50 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
58-
0x60 │ 00 00 00 00 │ ....
59-
}

src/test/mir-opt/const_promotion_extern_static.BAR-promoted[0].SimplifyCfg-elaborate-drops.after.mir

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ promoted[0] in BAR: &[&i32; 1] = {
88

99
bb0: {
1010
_3 = const {alloc1: &i32}; // scope 0 at $DIR/const-promotion-extern-static.rs:9:33: 9:34
11-
// ty::Const
12-
// + ty: &i32
13-
// + val: Value(Scalar(alloc1))
1411
// mir::Constant
1512
// + span: $DIR/const-promotion-extern-static.rs:9:33: 9:34
1613
// + literal: Const { ty: &i32, val: Value(Scalar(alloc1)) }
@@ -20,7 +17,3 @@ promoted[0] in BAR: &[&i32; 1] = {
2017
return; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:44
2118
}
2219
}
23-
24-
alloc1 (static: Y, size: 4, align: 4) {
25-
2a 00 00 00 │ *...
26-
}

src/test/mir-opt/const_promotion_extern_static.BAR.PromoteTemps.diff

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
- StorageLive(_5); // scope 0 at $DIR/const-promotion-extern-static.rs:9:33: 9:34
1919
- _5 = const {alloc1: &i32}; // scope 0 at $DIR/const-promotion-extern-static.rs:9:33: 9:34
2020
+ _6 = const BAR::promoted[0]; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:44
21-
// ty::Const
22-
- // + ty: &i32
23-
- // + val: Value(Scalar(alloc1))
21+
+ // ty::Const
2422
+ // + ty: &[&i32; 1]
2523
+ // + val: Unevaluated(BAR, [], Some(promoted[0]))
2624
// mir::Constant
@@ -51,9 +49,5 @@
5149
bb2 (cleanup): {
5250
resume; // scope 0 at $DIR/const-promotion-extern-static.rs:9:1: 9:45
5351
}
54-
- }
55-
-
56-
- alloc1 (static: Y, size: 4, align: 4) {
57-
- 2a 00 00 00 │ *...
5852
}
5953

src/test/mir-opt/const_promotion_extern_static.FOO-promoted[0].SimplifyCfg-elaborate-drops.after.mir

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,13 @@ promoted[0] in FOO: &[&i32; 1] = {
77
let mut _3: *const i32; // in scope 0 at $DIR/const-promotion-extern-static.rs:13:42: 13:43
88

99
bb0: {
10-
_3 = const {alloc3: *const i32}; // scope 0 at $DIR/const-promotion-extern-static.rs:13:42: 13:43
11-
// ty::Const
12-
// + ty: *const i32
13-
// + val: Value(Scalar(alloc3))
10+
_3 = const {alloc2: *const i32}; // scope 0 at $DIR/const-promotion-extern-static.rs:13:42: 13:43
1411
// mir::Constant
1512
// + span: $DIR/const-promotion-extern-static.rs:13:42: 13:43
16-
// + literal: Const { ty: *const i32, val: Value(Scalar(alloc3)) }
13+
// + literal: Const { ty: *const i32, val: Value(Scalar(alloc2)) }
1714
_2 = &(*_3); // scope 0 at $DIR/const-promotion-extern-static.rs:13:41: 13:43
1815
_1 = [move _2]; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46
1916
_0 = &_1; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:55
2017
return; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:55
2118
}
2219
}
23-
24-
alloc3 (extern static: X)

src/test/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,14 @@
1818
- StorageLive(_3); // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46
1919
- StorageLive(_4); // scope 0 at $DIR/const-promotion-extern-static.rs:13:32: 13:45
2020
- StorageLive(_5); // scope 1 at $DIR/const-promotion-extern-static.rs:13:42: 13:43
21-
- _5 = const {alloc3: *const i32}; // scope 1 at $DIR/const-promotion-extern-static.rs:13:42: 13:43
21+
- _5 = const {alloc2: *const i32}; // scope 1 at $DIR/const-promotion-extern-static.rs:13:42: 13:43
2222
+ _6 = const FOO::promoted[0]; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:55
23-
// ty::Const
24-
- // + ty: *const i32
25-
- // + val: Value(Scalar(alloc3))
23+
+ // ty::Const
2624
+ // + ty: &[&i32; 1]
2725
+ // + val: Unevaluated(FOO, [], Some(promoted[0]))
2826
// mir::Constant
2927
- // + span: $DIR/const-promotion-extern-static.rs:13:42: 13:43
30-
- // + literal: Const { ty: *const i32, val: Value(Scalar(alloc3)) }
28+
- // + literal: Const { ty: *const i32, val: Value(Scalar(alloc2)) }
3129
- _4 = &(*_5); // scope 1 at $DIR/const-promotion-extern-static.rs:13:41: 13:43
3230
- _3 = [move _4]; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46
3331
- _2 = &_3; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:55
@@ -54,6 +52,4 @@
5452
resume; // scope 0 at $DIR/const-promotion-extern-static.rs:13:1: 13:56
5553
}
5654
}
57-
-
58-
- alloc3 (extern static: X)
5955

src/test/mir-opt/const_prop/mutable_variable_no_prop.main.ConstProp.diff

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424
StorageLive(_3); // scope 2 at $DIR/mutable_variable_no_prop.rs:9:13: 9:19
2525
StorageLive(_4); // scope 2 at $DIR/mutable_variable_no_prop.rs:9:13: 9:19
2626
_4 = const {alloc1: *mut u32}; // scope 2 at $DIR/mutable_variable_no_prop.rs:9:13: 9:19
27-
// ty::Const
28-
// + ty: *mut u32
29-
// + val: Value(Scalar(alloc1))
3027
// mir::Constant
3128
// + span: $DIR/mutable_variable_no_prop.rs:9:13: 9:19
3229
// + literal: Const { ty: *mut u32, val: Value(Scalar(alloc1)) }
@@ -45,7 +42,3 @@
4542
}
4643
}
4744

48-
alloc1 (static: STATIC, size: 4, align: 4) {
49-
2a 00 00 00 │ *...
50-
}
51-

src/test/mir-opt/const_prop/read_immutable_static.main.ConstProp.diff

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
StorageLive(_2); // scope 0 at $DIR/read_immutable_static.rs:7:13: 7:16
1818
StorageLive(_3); // scope 0 at $DIR/read_immutable_static.rs:7:13: 7:16
1919
_3 = const {alloc1: &u8}; // scope 0 at $DIR/read_immutable_static.rs:7:13: 7:16
20-
// ty::Const
21-
// + ty: &u8
22-
// + val: Value(Scalar(alloc1))
2320
// mir::Constant
2421
// + span: $DIR/read_immutable_static.rs:7:13: 7:16
2522
// + literal: Const { ty: &u8, val: Value(Scalar(alloc1)) }
@@ -28,9 +25,6 @@
2825
StorageLive(_4); // scope 0 at $DIR/read_immutable_static.rs:7:19: 7:22
2926
StorageLive(_5); // scope 0 at $DIR/read_immutable_static.rs:7:19: 7:22
3027
_5 = const {alloc1: &u8}; // scope 0 at $DIR/read_immutable_static.rs:7:19: 7:22
31-
// ty::Const
32-
// + ty: &u8
33-
// + val: Value(Scalar(alloc1))
3428
// mir::Constant
3529
// + span: $DIR/read_immutable_static.rs:7:19: 7:22
3630
// + literal: Const { ty: &u8, val: Value(Scalar(alloc1)) }
@@ -48,7 +42,3 @@
4842
}
4943
}
5044

51-
alloc1 (static: FOO, size: 1, align: 1) {
52-
02 │ .
53-
}
54-

0 commit comments

Comments
 (0)