Skip to content

Commit 4714e20

Browse files
committed
bless mir opt tests
1 parent db83fdc commit 4714e20

File tree

70 files changed

+730
-157
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+730
-157
lines changed

src/test/mir-opt/address-of/rustc.address_of_reborrow.SimplifyCfg-initial.after.mir

+7-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,13 @@ fn address_of_reborrow() -> () {
298298
StorageDead(_48); // bb0[157]: scope 13 at $DIR/address-of.rs:36:25: 36:26
299299
FakeRead(ForLet, _47); // bb0[158]: scope 13 at $DIR/address-of.rs:36:9: 36:10
300300
AscribeUserType(_47, o, UserTypeProjection { base: UserType(29), projs: [] }); // bb0[159]: scope 13 at $DIR/address-of.rs:36:12: 36:22
301-
_0 = (); // bb0[160]: scope 0 at $DIR/address-of.rs:3:26: 37:2
301+
_0 = const (); // bb0[160]: scope 0 at $DIR/address-of.rs:3:26: 37:2
302+
// ty::Const
303+
// + ty: ()
304+
// + val: Value(Scalar(<ZST>))
305+
// mir::Constant
306+
// + span: $DIR/address-of.rs:3:26: 37:2
307+
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
302308
StorageDead(_47); // bb0[161]: scope 13 at $DIR/address-of.rs:37:1: 37:2
303309
StorageDead(_45); // bb0[162]: scope 12 at $DIR/address-of.rs:37:1: 37:2
304310
StorageDead(_44); // bb0[163]: scope 11 at $DIR/address-of.rs:37:1: 37:2

src/test/mir-opt/address-of/rustc.borrow_and_cast.SimplifyCfg-initial.after.mir

+7-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,13 @@ fn borrow_and_cast(_1: i32) -> () {
3838
_6 = &raw mut (*_7); // bb0[15]: scope 2 at $DIR/address-of.rs:44:13: 44:19
3939
FakeRead(ForLet, _6); // bb0[16]: scope 2 at $DIR/address-of.rs:44:9: 44:10
4040
StorageDead(_7); // bb0[17]: scope 2 at $DIR/address-of.rs:44:31: 44:32
41-
_0 = (); // bb0[18]: scope 0 at $DIR/address-of.rs:41:32: 45:2
41+
_0 = const (); // bb0[18]: scope 0 at $DIR/address-of.rs:41:32: 45:2
42+
// ty::Const
43+
// + ty: ()
44+
// + val: Value(Scalar(<ZST>))
45+
// mir::Constant
46+
// + span: $DIR/address-of.rs:41:32: 45:2
47+
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
4248
StorageDead(_6); // bb0[19]: scope 2 at $DIR/address-of.rs:45:1: 45:2
4349
StorageDead(_4); // bb0[20]: scope 1 at $DIR/address-of.rs:45:1: 45:2
4450
StorageDead(_2); // bb0[21]: scope 0 at $DIR/address-of.rs:45:1: 45:2

src/test/mir-opt/array-index-is-temporary/64bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir

+7-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,13 @@ fn main() -> () {
8282
_1[_7] = move _5; // bb2[0]: scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:29
8383
StorageDead(_5); // bb2[1]: scope 3 at $DIR/array-index-is-temporary.rs:16:28: 16:29
8484
StorageDead(_7); // bb2[2]: scope 3 at $DIR/array-index-is-temporary.rs:16:29: 16:30
85-
_0 = (); // bb2[3]: scope 0 at $DIR/array-index-is-temporary.rs:12:11: 17:2
85+
_0 = const (); // bb2[3]: scope 0 at $DIR/array-index-is-temporary.rs:12:11: 17:2
86+
// ty::Const
87+
// + ty: ()
88+
// + val: Value(Scalar(<ZST>))
89+
// mir::Constant
90+
// + span: $DIR/array-index-is-temporary.rs:12:11: 17:2
91+
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
8692
StorageDead(_3); // bb2[4]: scope 2 at $DIR/array-index-is-temporary.rs:17:1: 17:2
8793
StorageDead(_2); // bb2[5]: scope 1 at $DIR/array-index-is-temporary.rs:17:1: 17:2
8894
StorageDead(_1); // bb2[6]: scope 0 at $DIR/array-index-is-temporary.rs:17:1: 17:2

src/test/mir-opt/basic_assignment/rustc.main.SimplifyCfg-initial.after.mir

+7-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,13 @@ fn main() -> () {
7272

7373
bb6: {
7474
StorageDead(_6); // bb6[0]: scope 4 at $DIR/basic_assignment.rs:23:19: 23:20
75-
_0 = (); // bb6[1]: scope 0 at $DIR/basic_assignment.rs:10:11: 24:2
75+
_0 = const (); // bb6[1]: scope 0 at $DIR/basic_assignment.rs:10:11: 24:2
76+
// ty::Const
77+
// + ty: ()
78+
// + val: Value(Scalar(<ZST>))
79+
// mir::Constant
80+
// + span: $DIR/basic_assignment.rs:10:11: 24:2
81+
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
7682
drop(_5) -> [return: bb7, unwind: bb3]; // bb6[2]: scope 3 at $DIR/basic_assignment.rs:24:1: 24:2
7783
}
7884

src/test/mir-opt/box_expr/rustc.main.ElaborateDrops.before.mir

+7-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,13 @@ fn main() -> () {
5353
bb5: {
5454
StorageDead(_4); // bb5[0]: scope 1 at $DIR/box_expr.rs:8:11: 8:12
5555
StorageDead(_3); // bb5[1]: scope 1 at $DIR/box_expr.rs:8:12: 8:13
56-
_0 = (); // bb5[2]: scope 0 at $DIR/box_expr.rs:6:11: 9:2
56+
_0 = const (); // bb5[2]: scope 0 at $DIR/box_expr.rs:6:11: 9:2
57+
// ty::Const
58+
// + ty: ()
59+
// + val: Value(Scalar(<ZST>))
60+
// mir::Constant
61+
// + span: $DIR/box_expr.rs:6:11: 9:2
62+
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
5763
drop(_1) -> bb8; // bb5[3]: scope 0 at $DIR/box_expr.rs:9:1: 9:2
5864
}
5965

src/test/mir-opt/byte_slice/rustc.main.SimplifyCfg-elaborate-drops.after.mir

+7-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ fn main() -> () {
3434
// mir::Constant
3535
// + span: $DIR/byte_slice.rs:6:19: 6:23
3636
// + literal: Const { ty: u8, val: Value(Scalar(0x78)) }
37-
_0 = (); // bb0[4]: scope 0 at $DIR/byte_slice.rs:4:11: 7:2
37+
_0 = const (); // bb0[4]: scope 0 at $DIR/byte_slice.rs:4:11: 7:2
38+
// ty::Const
39+
// + ty: ()
40+
// + val: Value(Scalar(<ZST>))
41+
// mir::Constant
42+
// + span: $DIR/byte_slice.rs:4:11: 7:2
43+
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
3844
StorageDead(_2); // bb0[5]: scope 1 at $DIR/byte_slice.rs:7:1: 7:2
3945
StorageDead(_1); // bb0[6]: scope 0 at $DIR/byte_slice.rs:7:1: 7:2
4046
return; // bb0[7]: scope 0 at $DIR/byte_slice.rs:7:2: 7:2

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

+7-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ fn main() -> () {
1818
_1 = (*_2); // bb0[3]: scope 0 at $DIR/const_allocation.rs:8:5: 8:8
1919
StorageDead(_2); // bb0[4]: scope 0 at $DIR/const_allocation.rs:8:8: 8:9
2020
StorageDead(_1); // bb0[5]: scope 0 at $DIR/const_allocation.rs:8:8: 8:9
21-
_0 = (); // bb0[6]: scope 0 at $DIR/const_allocation.rs:7:11: 9:2
21+
_0 = const (); // bb0[6]: scope 0 at $DIR/const_allocation.rs:7:11: 9:2
22+
// ty::Const
23+
// + ty: ()
24+
// + val: Value(Scalar(<ZST>))
25+
// mir::Constant
26+
// + span: $DIR/const_allocation.rs:7:11: 9:2
27+
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
2228
return; // bb0[7]: scope 0 at $DIR/const_allocation.rs:9:2: 9:2
2329
}
2430
}

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

+7-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ fn main() -> () {
1818
_1 = (*_2); // bb0[3]: scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
1919
StorageDead(_2); // bb0[4]: scope 0 at $DIR/const_allocation2.rs:5:8: 5:9
2020
StorageDead(_1); // bb0[5]: scope 0 at $DIR/const_allocation2.rs:5:8: 5:9
21-
_0 = (); // bb0[6]: scope 0 at $DIR/const_allocation2.rs:4:11: 6:2
21+
_0 = const (); // bb0[6]: scope 0 at $DIR/const_allocation2.rs:4:11: 6:2
22+
// ty::Const
23+
// + ty: ()
24+
// + val: Value(Scalar(<ZST>))
25+
// mir::Constant
26+
// + span: $DIR/const_allocation2.rs:4:11: 6:2
27+
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
2228
return; // bb0[7]: scope 0 at $DIR/const_allocation2.rs:6:2: 6:2
2329
}
2430
}

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

+7-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ fn main() -> () {
1818
_1 = (*_2); // bb0[3]: scope 0 at $DIR/const_allocation3.rs:5:5: 5:8
1919
StorageDead(_2); // bb0[4]: scope 0 at $DIR/const_allocation3.rs:5:8: 5:9
2020
StorageDead(_1); // bb0[5]: scope 0 at $DIR/const_allocation3.rs:5:8: 5:9
21-
_0 = (); // bb0[6]: scope 0 at $DIR/const_allocation3.rs:4:11: 6:2
21+
_0 = const (); // bb0[6]: scope 0 at $DIR/const_allocation3.rs:4:11: 6:2
22+
// ty::Const
23+
// + ty: ()
24+
// + val: Value(Scalar(<ZST>))
25+
// mir::Constant
26+
// + span: $DIR/const_allocation3.rs:4:11: 6:2
27+
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
2228
return; // bb0[7]: scope 0 at $DIR/const_allocation3.rs:6:2: 6:2
2329
}
2430
}

src/test/mir-opt/const_prop/aggregate/rustc.main.ConstProp.diff

+7-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,13 @@
5454
+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
5555
StorageDead(_2); // bb0[6]: scope 0 at $DIR/aggregate.rs:5:27: 5:28
5656
StorageDead(_3); // bb0[7]: scope 0 at $DIR/aggregate.rs:5:28: 5:29
57-
_0 = (); // bb0[8]: scope 0 at $DIR/aggregate.rs:4:11: 6:2
57+
_0 = const (); // bb0[8]: scope 0 at $DIR/aggregate.rs:4:11: 6:2
58+
// ty::Const
59+
// + ty: ()
60+
// + val: Value(Scalar(<ZST>))
61+
// mir::Constant
62+
// + span: $DIR/aggregate.rs:4:11: 6:2
63+
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
5864
StorageDead(_1); // bb0[9]: scope 0 at $DIR/aggregate.rs:6:1: 6:2
5965
return; // bb0[10]: scope 0 at $DIR/aggregate.rs:6:2: 6:2
6066
}

src/test/mir-opt/const_prop/array_index/64bit/rustc.main.ConstProp.diff

+7-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,13 @@
8484
+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) }
8585
StorageDead(_3); // bb1[1]: scope 0 at $DIR/array_index.rs:5:33: 5:34
8686
StorageDead(_2); // bb1[2]: scope 0 at $DIR/array_index.rs:5:33: 5:34
87-
_0 = (); // bb1[3]: scope 0 at $DIR/array_index.rs:4:11: 6:2
87+
_0 = const (); // bb1[3]: scope 0 at $DIR/array_index.rs:4:11: 6:2
88+
// ty::Const
89+
// + ty: ()
90+
// + val: Value(Scalar(<ZST>))
91+
// mir::Constant
92+
// + span: $DIR/array_index.rs:4:11: 6:2
93+
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
8894
StorageDead(_1); // bb1[4]: scope 0 at $DIR/array_index.rs:6:1: 6:2
8995
return; // bb1[5]: scope 0 at $DIR/array_index.rs:6:2: 6:2
9096
}

src/test/mir-opt/const_prop/boxes/rustc.main.ConstProp.diff

+7-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,13 @@
4444

4545
bb2: {
4646
StorageDead(_3); // bb2[0]: scope 0 at $DIR/boxes.rs:12:26: 12:27
47-
_0 = (); // bb2[1]: scope 0 at $DIR/boxes.rs:11:11: 13:2
47+
_0 = const (); // bb2[1]: scope 0 at $DIR/boxes.rs:11:11: 13:2
48+
// ty::Const
49+
// + ty: ()
50+
// + val: Value(Scalar(<ZST>))
51+
// mir::Constant
52+
// + span: $DIR/boxes.rs:11:11: 13:2
53+
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
4854
StorageDead(_1); // bb2[2]: scope 0 at $DIR/boxes.rs:13:1: 13:2
4955
return; // bb2[3]: scope 0 at $DIR/boxes.rs:13:2: 13:2
5056
}

src/test/mir-opt/const_prop/cast/rustc.main.ConstProp.diff

+7-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,13 @@
3939
+ // mir::Constant
4040
+ // + span: $DIR/cast.rs:6:13: 6:24
4141
+ // + literal: Const { ty: u8, val: Value(Scalar(0x2a)) }
42-
_0 = (); // bb0[4]: scope 0 at $DIR/cast.rs:3:11: 7:2
42+
_0 = const (); // bb0[4]: scope 0 at $DIR/cast.rs:3:11: 7:2
43+
// ty::Const
44+
// + ty: ()
45+
// + val: Value(Scalar(<ZST>))
46+
// mir::Constant
47+
// + span: $DIR/cast.rs:3:11: 7:2
48+
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
4349
StorageDead(_2); // bb0[5]: scope 1 at $DIR/cast.rs:7:1: 7:2
4450
StorageDead(_1); // bb0[6]: scope 0 at $DIR/cast.rs:7:1: 7:2
4551
return; // bb0[7]: scope 0 at $DIR/cast.rs:7:2: 7:2

src/test/mir-opt/const_prop/checked_add/rustc.main.ConstProp.diff

+7-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,13 @@
5151
+ // mir::Constant
5252
+ // + span: $DIR/checked_add.rs:5:18: 5:23
5353
+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) }
54-
_0 = (); // bb1[1]: scope 0 at $DIR/checked_add.rs:4:11: 6:2
54+
_0 = const (); // bb1[1]: scope 0 at $DIR/checked_add.rs:4:11: 6:2
55+
// ty::Const
56+
// + ty: ()
57+
// + val: Value(Scalar(<ZST>))
58+
// mir::Constant
59+
// + span: $DIR/checked_add.rs:4:11: 6:2
60+
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
5561
StorageDead(_1); // bb1[2]: scope 0 at $DIR/checked_add.rs:6:1: 6:2
5662
return; // bb1[3]: scope 0 at $DIR/checked_add.rs:6:2: 6:2
5763
}

src/test/mir-opt/const_prop/const_prop_fails_gracefully/rustc.main.ConstProp.diff

+7-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,13 @@
4242
bb1: {
4343
StorageDead(_5); // bb1[0]: scope 1 at $DIR/const_prop_fails_gracefully.rs:8:11: 8:12
4444
StorageDead(_4); // bb1[1]: scope 1 at $DIR/const_prop_fails_gracefully.rs:8:12: 8:13
45-
_0 = (); // bb1[2]: scope 0 at $DIR/const_prop_fails_gracefully.rs:5:11: 9:2
45+
_0 = const (); // bb1[2]: scope 0 at $DIR/const_prop_fails_gracefully.rs:5:11: 9:2
46+
// ty::Const
47+
// + ty: ()
48+
// + val: Value(Scalar(<ZST>))
49+
// mir::Constant
50+
// + span: $DIR/const_prop_fails_gracefully.rs:5:11: 9:2
51+
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
4652
StorageDead(_1); // bb1[3]: scope 0 at $DIR/const_prop_fails_gracefully.rs:9:1: 9:2
4753
return; // bb1[4]: scope 0 at $DIR/const_prop_fails_gracefully.rs:9:2: 9:2
4854
}

src/test/mir-opt/const_prop/control-flow-simplification/rustc.hello.ConstProp.diff

+7-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,13 @@
2929
}
3030

3131
bb1: {
32-
_0 = (); // bb1[0]: scope 0 at $DIR/control-flow-simplification.rs:12:5: 14:6
32+
_0 = const (); // bb1[0]: scope 0 at $DIR/control-flow-simplification.rs:12:5: 14:6
33+
// ty::Const
34+
// + ty: ()
35+
// + val: Value(Scalar(<ZST>))
36+
// mir::Constant
37+
// + span: $DIR/control-flow-simplification.rs:12:5: 14:6
38+
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
3339
StorageDead(_1); // bb1[1]: scope 0 at $DIR/control-flow-simplification.rs:15:1: 15:2
3440
return; // bb1[2]: scope 0 at $DIR/control-flow-simplification.rs:15:2: 15:2
3541
}

src/test/mir-opt/const_prop/control-flow-simplification/rustc.hello.PreCodegen.before.mir

+8-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ fn hello() -> () {
44
let mut _0: (); // return place in scope 0 at $DIR/control-flow-simplification.rs:11:14: 11:14
55

66
bb0: {
7-
return; // bb0[0]: scope 0 at $DIR/control-flow-simplification.rs:15:2: 15:2
7+
_0 = const (); // bb0[0]: scope 0 at $DIR/control-flow-simplification.rs:12:5: 14:6
8+
// ty::Const
9+
// + ty: ()
10+
// + val: Value(Scalar(<ZST>))
11+
// mir::Constant
12+
// + span: $DIR/control-flow-simplification.rs:12:5: 14:6
13+
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
14+
return; // bb0[1]: scope 0 at $DIR/control-flow-simplification.rs:15:2: 15:2
815
}
916
}

src/test/mir-opt/const_prop/discriminant/64bit/rustc.main.ConstProp.diff

+7-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,13 @@
8787
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
8888
StorageDead(_2); // bb4[1]: scope 0 at $DIR/discriminant.rs:6:67: 6:68
8989
StorageDead(_3); // bb4[2]: scope 0 at $DIR/discriminant.rs:6:68: 6:69
90-
_0 = (); // bb4[3]: scope 0 at $DIR/discriminant.rs:5:11: 7:2
90+
_0 = const (); // bb4[3]: scope 0 at $DIR/discriminant.rs:5:11: 7:2
91+
// ty::Const
92+
// + ty: ()
93+
// + val: Value(Scalar(<ZST>))
94+
// mir::Constant
95+
// + span: $DIR/discriminant.rs:5:11: 7:2
96+
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
9197
StorageDead(_1); // bb4[4]: scope 0 at $DIR/discriminant.rs:7:1: 7:2
9298
return; // bb4[5]: scope 0 at $DIR/discriminant.rs:7:2: 7:2
9399
}

0 commit comments

Comments
 (0)