Skip to content

Commit 647f810

Browse files
committed
update 32 bit mir-opt tests
1 parent 4714e20 commit 647f810

File tree

13 files changed

+119
-31
lines changed

13 files changed

+119
-31
lines changed

src/test/mir-opt/array-index-is-temporary/32bit/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/const_allocation/32bit/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/32bit/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/32bit/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/array_index/32bit/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/discriminant/32bit/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
}

src/test/mir-opt/const_prop/optimizes_into_variable/32bit/rustc.main.ConstProp.diff

+7-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,13 @@
171171
+ // + span: $DIR/optimizes_into_variable.rs:14:13: 14:38
172172
+ // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) }
173173
StorageDead(_9); // bb2[7]: scope 2 at $DIR/optimizes_into_variable.rs:14:38: 14:39
174-
_0 = (); // bb2[8]: scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2
174+
_0 = const (); // bb2[8]: scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2
175+
// ty::Const
176+
// + ty: ()
177+
// + val: Value(Scalar(<ZST>))
178+
// mir::Constant
179+
// + span: $DIR/optimizes_into_variable.rs:11:11: 15:2
180+
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
175181
StorageDead(_8); // bb2[9]: scope 2 at $DIR/optimizes_into_variable.rs:15:1: 15:2
176182
StorageDead(_3); // bb2[10]: scope 1 at $DIR/optimizes_into_variable.rs:15:1: 15:2
177183
StorageDead(_1); // bb2[11]: scope 0 at $DIR/optimizes_into_variable.rs:15:1: 15:2

src/test/mir-opt/const_prop/optimizes_into_variable/32bit/rustc.main.SimplifyLocals.after.mir

+11-4
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,16 @@ fn main() -> () {
8080
// mir::Constant
8181
// + span: $DIR/optimizes_into_variable.rs:14:13: 14:38
8282
// + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) }
83-
StorageDead(_4); // bb0[9]: scope 2 at $DIR/optimizes_into_variable.rs:15:1: 15:2
84-
StorageDead(_2); // bb0[10]: scope 1 at $DIR/optimizes_into_variable.rs:15:1: 15:2
85-
StorageDead(_1); // bb0[11]: scope 0 at $DIR/optimizes_into_variable.rs:15:1: 15:2
86-
return; // bb0[12]: scope 0 at $DIR/optimizes_into_variable.rs:15:2: 15:2
83+
_0 = const (); // bb0[9]: scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2
84+
// ty::Const
85+
// + ty: ()
86+
// + val: Value(Scalar(<ZST>))
87+
// mir::Constant
88+
// + span: $DIR/optimizes_into_variable.rs:11:11: 15:2
89+
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
90+
StorageDead(_4); // bb0[10]: scope 2 at $DIR/optimizes_into_variable.rs:15:1: 15:2
91+
StorageDead(_2); // bb0[11]: scope 1 at $DIR/optimizes_into_variable.rs:15:1: 15:2
92+
StorageDead(_1); // bb0[12]: scope 0 at $DIR/optimizes_into_variable.rs:15:1: 15:2
93+
return; // bb0[13]: scope 0 at $DIR/optimizes_into_variable.rs:15:2: 15:2
8794
}
8895
}

src/test/mir-opt/const_prop/repeat/32bit/rustc.main.ConstProp.diff

+7-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,13 @@
8080
StorageDead(_2); // bb1[2]: scope 0 at $DIR/repeat.rs:6:31: 6:32
8181
StorageDead(_4); // bb1[3]: scope 0 at $DIR/repeat.rs:6:32: 6:33
8282
StorageDead(_3); // bb1[4]: scope 0 at $DIR/repeat.rs:6:32: 6:33
83-
_0 = (); // bb1[5]: scope 0 at $DIR/repeat.rs:5:11: 7:2
83+
_0 = const (); // bb1[5]: scope 0 at $DIR/repeat.rs:5:11: 7:2
84+
// ty::Const
85+
// + ty: ()
86+
// + val: Value(Scalar(<ZST>))
87+
// mir::Constant
88+
// + span: $DIR/repeat.rs:5:11: 7:2
89+
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
8490
StorageDead(_1); // bb1[6]: scope 0 at $DIR/repeat.rs:7:1: 7:2
8591
return; // bb1[7]: scope 0 at $DIR/repeat.rs:7:2: 7:2
8692
}

src/test/mir-opt/const_prop/slice_len/32bit/rustc.main.ConstProp.diff

+7-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,13 @@
7676
StorageDead(_4); // bb1[2]: scope 0 at $DIR/slice_len.rs:5:33: 5:34
7777
StorageDead(_2); // bb1[3]: scope 0 at $DIR/slice_len.rs:5:33: 5:34
7878
StorageDead(_1); // bb1[4]: scope 0 at $DIR/slice_len.rs:5:33: 5:34
79-
_0 = (); // bb1[5]: scope 0 at $DIR/slice_len.rs:4:11: 6:2
79+
_0 = const (); // bb1[5]: scope 0 at $DIR/slice_len.rs:4:11: 6:2
80+
// ty::Const
81+
// + ty: ()
82+
// + val: Value(Scalar(<ZST>))
83+
// mir::Constant
84+
// + span: $DIR/slice_len.rs:4:11: 6:2
85+
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
8086
return; // bb1[6]: scope 0 at $DIR/slice_len.rs:6:2: 6:2
8187
}
8288
}

src/test/mir-opt/inline/inline-into-box-place/32bit/rustc.main.Inline.diff

+24-15
Original file line numberDiff line numberDiff line change
@@ -29,38 +29,46 @@
2929
- // + span: $DIR/inline-into-box-place.rs:8:33: 8:41
3030
- // + user_ty: UserType(1)
3131
- // + literal: Const { ty: fn() -> std::vec::Vec<u32> {std::vec::Vec::<u32>::new}, val: Value(Scalar(<ZST>)) }
32+
- }
33+
-
34+
- bb1 (cleanup): {
35+
- resume; // bb1[0]: scope 0 at $DIR/inline-into-box-place.rs:7:1: 9:2
36+
- }
37+
-
38+
- bb2: {
39+
- _1 = move _2; // bb2[0]: scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43
40+
- StorageDead(_2); // bb2[1]: scope 0 at $DIR/inline-into-box-place.rs:8:42: 8:43
41+
- _0 = const (); // bb2[2]: scope 0 at $DIR/inline-into-box-place.rs:7:11: 9:2
3242
+ // + span: $SRC_DIR/liballoc/vec.rs:LL:COL
3343
+ // + user_ty: UserType(0)
3444
+ // + literal: Const { ty: alloc::raw_vec::RawVec<u32>, val: Value(ByRef { alloc: Allocation { bytes: [4, 0, 0, 0, 0, 0, 0, 0], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [255], len: Size { raw: 8 } }, size: Size { raw: 8 }, align: Align { pow2: 2 }, mutability: Not, extra: () }, offset: Size { raw: 0 } }) }
3545
+ ((*_4).1: usize) = const 0usize; // bb0[5]: scope 2 at $SRC_DIR/liballoc/vec.rs:LL:COL
36-
+ // ty::Const
46+
// ty::Const
3747
+ // + ty: usize
3848
+ // + val: Value(Scalar(0x00000000))
3949
+ // mir::Constant
4050
+ // + span: $SRC_DIR/liballoc/vec.rs:LL:COL
4151
+ // + literal: Const { ty: usize, val: Value(Scalar(0x00000000)) }
4252
+ _1 = move _2; // bb0[6]: scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43
4353
+ StorageDead(_2); // bb0[7]: scope 0 at $DIR/inline-into-box-place.rs:8:42: 8:43
44-
+ _0 = (); // bb0[8]: scope 0 at $DIR/inline-into-box-place.rs:7:11: 9:2
54+
+ _0 = const (); // bb0[8]: scope 0 at $DIR/inline-into-box-place.rs:7:11: 9:2
55+
+ // ty::Const
56+
// + ty: ()
57+
// + val: Value(Scalar(<ZST>))
58+
// mir::Constant
59+
// + span: $DIR/inline-into-box-place.rs:7:11: 9:2
60+
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
61+
- drop(_1) -> [return: bb3, unwind: bb1]; // bb2[3]: scope 0 at $DIR/inline-into-box-place.rs:9:1: 9:2
4562
+ drop(_1) -> [return: bb2, unwind: bb1]; // bb0[9]: scope 0 at $DIR/inline-into-box-place.rs:9:1: 9:2
4663
}
4764

48-
bb1 (cleanup): {
49-
resume; // bb1[0]: scope 0 at $DIR/inline-into-box-place.rs:7:1: 9:2
50-
}
51-
52-
bb2: {
53-
- _1 = move _2; // bb2[0]: scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43
54-
- StorageDead(_2); // bb2[1]: scope 0 at $DIR/inline-into-box-place.rs:8:42: 8:43
55-
- _0 = (); // bb2[2]: scope 0 at $DIR/inline-into-box-place.rs:7:11: 9:2
56-
- drop(_1) -> [return: bb3, unwind: bb1]; // bb2[3]: scope 0 at $DIR/inline-into-box-place.rs:9:1: 9:2
57-
- }
58-
-
5965
- bb3: {
6066
- StorageDead(_1); // bb3[0]: scope 0 at $DIR/inline-into-box-place.rs:9:1: 9:2
6167
- return; // bb3[1]: scope 0 at $DIR/inline-into-box-place.rs:9:2: 9:2
62-
- }
63-
-
68+
+ bb1 (cleanup): {
69+
+ resume; // bb1[0]: scope 0 at $DIR/inline-into-box-place.rs:7:1: 9:2
70+
}
71+
6472
- bb4 (cleanup): {
6573
- _3 = const alloc::alloc::box_free::<std::vec::Vec<u32>>(move (_2.0: std::ptr::Unique<std::vec::Vec<u32>>)) -> bb1; // bb4[0]: scope 0 at $DIR/inline-into-box-place.rs:8:42: 8:43
6674
- // ty::Const
@@ -69,6 +77,7 @@
6977
- // mir::Constant
7078
- // + span: $DIR/inline-into-box-place.rs:8:42: 8:43
7179
- // + literal: Const { ty: unsafe fn(std::ptr::Unique<std::vec::Vec<u32>>) {alloc::alloc::box_free::<std::vec::Vec<u32>>}, val: Value(Scalar(<ZST>)) }
80+
+ bb2: {
7281
+ StorageDead(_1); // bb2[0]: scope 0 at $DIR/inline-into-box-place.rs:9:1: 9:2
7382
+ return; // bb2[1]: scope 0 at $DIR/inline-into-box-place.rs:9:2: 9:2
7483
}

src/test/mir-opt/nll/region-subtyping-basic/32bit/rustc.main.nll.0.mir

+14-2
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,25 @@ fn main() -> () {
137137
bb6: {
138138
StorageDead(_9); // bb6[0]: scope 3 at $DIR/region-subtyping-basic.rs:19:17: 19:18
139139
StorageDead(_8); // bb6[1]: scope 3 at $DIR/region-subtyping-basic.rs:19:18: 19:19
140-
_0 = (); // bb6[2]: scope 3 at $DIR/region-subtyping-basic.rs:18:13: 20:6
140+
_0 = const Const(Value(Scalar(<ZST>)): ()); // bb6[2]: scope 3 at $DIR/region-subtyping-basic.rs:18:13: 20:6
141+
// ty::Const
142+
// + ty: ()
143+
// + val: Value(Scalar(<ZST>))
144+
// mir::Constant
145+
// + span: $DIR/region-subtyping-basic.rs:18:13: 20:6
146+
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
141147
goto -> bb8; // bb6[3]: scope 3 at $DIR/region-subtyping-basic.rs:18:5: 22:6
142148
}
143149

144150
bb7: {
145151
StorageDead(_10); // bb7[0]: scope 3 at $DIR/region-subtyping-basic.rs:21:18: 21:19
146-
_0 = (); // bb7[1]: scope 3 at $DIR/region-subtyping-basic.rs:20:12: 22:6
152+
_0 = const Const(Value(Scalar(<ZST>)): ()); // bb7[1]: scope 3 at $DIR/region-subtyping-basic.rs:20:12: 22:6
153+
// ty::Const
154+
// + ty: ()
155+
// + val: Value(Scalar(<ZST>))
156+
// mir::Constant
157+
// + span: $DIR/region-subtyping-basic.rs:20:12: 22:6
158+
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
147159
goto -> bb8; // bb7[2]: scope 3 at $DIR/region-subtyping-basic.rs:18:5: 22:6
148160
}
149161

src/test/mir-opt/packed-struct-drop-aligned/32bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir

+7-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,13 @@ fn main() -> () {
6161
StorageDead(_6); // bb4[0]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8
6262
(_1.0: Aligned) = move _4; // bb4[1]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8
6363
StorageDead(_4); // bb4[2]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:28: 7:29
64-
_0 = (); // bb4[3]: scope 0 at $DIR/packed-struct-drop-aligned.rs:5:11: 8:2
64+
_0 = const (); // bb4[3]: scope 0 at $DIR/packed-struct-drop-aligned.rs:5:11: 8:2
65+
// ty::Const
66+
// + ty: ()
67+
// + val: Value(Scalar(<ZST>))
68+
// mir::Constant
69+
// + span: $DIR/packed-struct-drop-aligned.rs:5:11: 8:2
70+
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
6571
drop(_1) -> [return: bb2, unwind: bb1]; // bb4[4]: scope 0 at $DIR/packed-struct-drop-aligned.rs:8:1: 8:2
6672
}
6773
}

0 commit comments

Comments
 (0)