Skip to content

Commit c5c1329

Browse files
pnkfelixMark-Simulacrum
authored andcommitted
Revert "Bless mir-opt tests"
This reverts commit a030c92.
1 parent 310b80e commit c5c1329

File tree

45 files changed

+973
-819
lines changed

Some content is hidden

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

45 files changed

+973
-819
lines changed

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

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,30 @@ fn main() -> () {
4747
StorageLive(_5); // scope 3 at $DIR/basic_assignment.rs:19:9: 19:15
4848
StorageLive(_6); // scope 4 at $DIR/basic_assignment.rs:23:14: 23:20
4949
_6 = move _4; // scope 4 at $DIR/basic_assignment.rs:23:14: 23:20
50-
replace(_5 <- move _6) -> [return: bb1, unwind: bb5]; // scope 4 at $DIR/basic_assignment.rs:23:5: 23:11
50+
replace(_5 <- move _6) -> [return: bb2, unwind: bb5]; // scope 4 at $DIR/basic_assignment.rs:23:5: 23:11
5151
}
5252

53-
bb1: {
54-
drop(_6) -> [return: bb2, unwind: bb6]; // scope 4 at $DIR/basic_assignment.rs:23:19: 23:20
53+
bb1 (cleanup): {
54+
resume; // scope 0 at $DIR/basic_assignment.rs:10:1: 24:2
5555
}
5656

5757
bb2: {
58+
drop(_6) -> [return: bb6, unwind: bb4]; // scope 4 at $DIR/basic_assignment.rs:23:19: 23:20
59+
}
60+
61+
bb3 (cleanup): {
62+
drop(_4) -> bb1; // scope 2 at $DIR/basic_assignment.rs:24:1: 24:2
63+
}
64+
65+
bb4 (cleanup): {
66+
drop(_5) -> bb3; // scope 3 at $DIR/basic_assignment.rs:24:1: 24:2
67+
}
68+
69+
bb5 (cleanup): {
70+
drop(_6) -> bb4; // scope 4 at $DIR/basic_assignment.rs:23:19: 23:20
71+
}
72+
73+
bb6: {
5874
StorageDead(_6); // scope 4 at $DIR/basic_assignment.rs:23:19: 23:20
5975
_0 = const (); // scope 0 at $DIR/basic_assignment.rs:10:11: 24:2
6076
// ty::Const
@@ -63,34 +79,18 @@ fn main() -> () {
6379
// mir::Constant
6480
// + span: $DIR/basic_assignment.rs:10:11: 24:2
6581
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
66-
drop(_5) -> [return: bb3, unwind: bb7]; // scope 3 at $DIR/basic_assignment.rs:24:1: 24:2
82+
drop(_5) -> [return: bb7, unwind: bb3]; // scope 3 at $DIR/basic_assignment.rs:24:1: 24:2
6783
}
6884

69-
bb3: {
85+
bb7: {
7086
StorageDead(_5); // scope 3 at $DIR/basic_assignment.rs:24:1: 24:2
71-
drop(_4) -> [return: bb4, unwind: bb8]; // scope 2 at $DIR/basic_assignment.rs:24:1: 24:2
87+
drop(_4) -> [return: bb8, unwind: bb1]; // scope 2 at $DIR/basic_assignment.rs:24:1: 24:2
7288
}
7389

74-
bb4: {
90+
bb8: {
7591
StorageDead(_4); // scope 2 at $DIR/basic_assignment.rs:24:1: 24:2
7692
StorageDead(_2); // scope 1 at $DIR/basic_assignment.rs:24:1: 24:2
7793
StorageDead(_1); // scope 0 at $DIR/basic_assignment.rs:24:1: 24:2
7894
return; // scope 0 at $DIR/basic_assignment.rs:24:2: 24:2
7995
}
80-
81-
bb5 (cleanup): {
82-
drop(_6) -> bb6; // scope 4 at $DIR/basic_assignment.rs:23:19: 23:20
83-
}
84-
85-
bb6 (cleanup): {
86-
drop(_5) -> bb7; // scope 3 at $DIR/basic_assignment.rs:24:1: 24:2
87-
}
88-
89-
bb7 (cleanup): {
90-
drop(_4) -> bb8; // scope 2 at $DIR/basic_assignment.rs:24:1: 24:2
91-
}
92-
93-
bb8 (cleanup): {
94-
resume; // scope 0 at $DIR/basic_assignment.rs:10:1: 24:2
95-
}
9696
}

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

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fn main() -> () {
1414
StorageLive(_1); // scope 0 at $DIR/box_expr.rs:7:9: 7:10
1515
StorageLive(_2); // scope 0 at $DIR/box_expr.rs:7:13: 7:25
1616
_2 = Box(S); // scope 0 at $DIR/box_expr.rs:7:13: 7:25
17-
(*_2) = const S::new() -> [return: bb1, unwind: bb7]; // scope 0 at $DIR/box_expr.rs:7:17: 7:25
17+
(*_2) = const S::new() -> [return: bb2, unwind: bb3]; // scope 0 at $DIR/box_expr.rs:7:17: 7:25
1818
// ty::Const
1919
// + ty: fn() -> S {S::new}
2020
// + val: Value(Scalar(<ZST>))
@@ -23,17 +23,25 @@ fn main() -> () {
2323
// + literal: Const { ty: fn() -> S {S::new}, val: Value(Scalar(<ZST>)) }
2424
}
2525

26-
bb1: {
27-
_1 = move _2; // scope 0 at $DIR/box_expr.rs:7:13: 7:25
28-
drop(_2) -> bb2; // scope 0 at $DIR/box_expr.rs:7:24: 7:25
26+
bb1 (cleanup): {
27+
resume; // scope 0 at $DIR/box_expr.rs:6:1: 9:2
2928
}
3029

3130
bb2: {
31+
_1 = move _2; // scope 0 at $DIR/box_expr.rs:7:13: 7:25
32+
drop(_2) -> bb4; // scope 0 at $DIR/box_expr.rs:7:24: 7:25
33+
}
34+
35+
bb3 (cleanup): {
36+
drop(_2) -> bb1; // scope 0 at $DIR/box_expr.rs:7:24: 7:25
37+
}
38+
39+
bb4: {
3240
StorageDead(_2); // scope 0 at $DIR/box_expr.rs:7:24: 7:25
3341
StorageLive(_3); // scope 1 at $DIR/box_expr.rs:8:5: 8:12
3442
StorageLive(_4); // scope 1 at $DIR/box_expr.rs:8:10: 8:11
3543
_4 = move _1; // scope 1 at $DIR/box_expr.rs:8:10: 8:11
36-
_3 = const std::mem::drop::<std::boxed::Box<S>>(move _4) -> [return: bb3, unwind: bb5]; // scope 1 at $DIR/box_expr.rs:8:5: 8:12
44+
_3 = const std::mem::drop::<std::boxed::Box<S>>(move _4) -> [return: bb5, unwind: bb7]; // scope 1 at $DIR/box_expr.rs:8:5: 8:12
3745
// ty::Const
3846
// + ty: fn(std::boxed::Box<S>) {std::mem::drop::<std::boxed::Box<S>>}
3947
// + val: Value(Scalar(<ZST>))
@@ -42,7 +50,7 @@ fn main() -> () {
4250
// + literal: Const { ty: fn(std::boxed::Box<S>) {std::mem::drop::<std::boxed::Box<S>>}, val: Value(Scalar(<ZST>)) }
4351
}
4452

45-
bb3: {
53+
bb5: {
4654
StorageDead(_4); // scope 1 at $DIR/box_expr.rs:8:11: 8:12
4755
StorageDead(_3); // scope 1 at $DIR/box_expr.rs:8:12: 8:13
4856
_0 = const (); // scope 0 at $DIR/box_expr.rs:6:11: 9:2
@@ -52,27 +60,19 @@ fn main() -> () {
5260
// mir::Constant
5361
// + span: $DIR/box_expr.rs:6:11: 9:2
5462
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
55-
drop(_1) -> bb4; // scope 0 at $DIR/box_expr.rs:9:1: 9:2
56-
}
57-
58-
bb4: {
59-
StorageDead(_1); // scope 0 at $DIR/box_expr.rs:9:1: 9:2
60-
return; // scope 0 at $DIR/box_expr.rs:9:2: 9:2
61-
}
62-
63-
bb5 (cleanup): {
64-
drop(_4) -> bb6; // scope 1 at $DIR/box_expr.rs:8:11: 8:12
63+
drop(_1) -> bb8; // scope 0 at $DIR/box_expr.rs:9:1: 9:2
6564
}
6665

6766
bb6 (cleanup): {
68-
drop(_1) -> bb8; // scope 0 at $DIR/box_expr.rs:9:1: 9:2
67+
drop(_1) -> bb1; // scope 0 at $DIR/box_expr.rs:9:1: 9:2
6968
}
7069

7170
bb7 (cleanup): {
72-
drop(_2) -> bb8; // scope 0 at $DIR/box_expr.rs:7:24: 7:25
71+
drop(_4) -> bb6; // scope 1 at $DIR/box_expr.rs:8:11: 8:12
7372
}
7473

75-
bb8 (cleanup): {
76-
resume; // scope 0 at $DIR/box_expr.rs:6:1: 9:2
74+
bb8: {
75+
StorageDead(_1); // scope 0 at $DIR/box_expr.rs:9:1: 9:2
76+
return; // scope 0 at $DIR/box_expr.rs:9:2: 9:2
7777
}
7878
}

src/test/mir-opt/const-promotion-extern-static/rustc.BAR.PromoteTemps.diff

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
+ // + literal: Const { ty: &[&i32; 1], val: Unevaluated(DefId(0:6 ~ const_promotion_extern_static[317d]::BAR[0]), [], Some(promoted[0])) }
3434
+ _2 = &(*_6); // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35
3535
_1 = move _2 as &[&i32] (Pointer(Unsize)); // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35
36-
_0 = const core::slice::<impl [&i32]>::as_ptr(move _1) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:44
36+
_0 = const core::slice::<impl [&i32]>::as_ptr(move _1) -> [return: bb2, unwind: bb1]; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:44
3737
// ty::Const
3838
// + ty: for<'r> fn(&'r [&i32]) -> *const &i32 {core::slice::<impl [&i32]>::as_ptr}
3939
// + val: Value(Scalar(<ZST>))
@@ -42,15 +42,15 @@
4242
// + literal: Const { ty: for<'r> fn(&'r [&i32]) -> *const &i32 {core::slice::<impl [&i32]>::as_ptr}, val: Value(Scalar(<ZST>)) }
4343
}
4444

45-
bb1: {
45+
bb1 (cleanup): {
46+
resume; // scope 0 at $DIR/const-promotion-extern-static.rs:9:1: 9:45
47+
}
48+
49+
bb2: {
4650
- StorageDead(_5); // scope 0 at $DIR/const-promotion-extern-static.rs:9:43: 9:44
4751
- StorageDead(_3); // scope 0 at $DIR/const-promotion-extern-static.rs:9:43: 9:44
4852
return; // scope 0 at $DIR/const-promotion-extern-static.rs:9:1: 9:45
4953
}
50-
51-
bb2 (cleanup): {
52-
resume; // scope 0 at $DIR/const-promotion-extern-static.rs:9:1: 9:45
53-
}
5454
- }
5555
-
5656
- alloc0 (static: Y, size: 4, align: 4) {

src/test/mir-opt/const-promotion-extern-static/rustc.FOO.PromoteTemps.diff

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
+ // + literal: Const { ty: &[&i32; 1], val: Unevaluated(DefId(0:7 ~ const_promotion_extern_static[317d]::FOO[0]), [], Some(promoted[0])) }
3636
+ _2 = &(*_6); // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46
3737
_1 = move _2 as &[&i32] (Pointer(Unsize)); // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46
38-
_0 = const core::slice::<impl [&i32]>::as_ptr(move _1) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:55
38+
_0 = const core::slice::<impl [&i32]>::as_ptr(move _1) -> [return: bb2, unwind: bb1]; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:55
3939
// ty::Const
4040
// + ty: for<'r> fn(&'r [&i32]) -> *const &i32 {core::slice::<impl [&i32]>::as_ptr}
4141
// + val: Value(Scalar(<ZST>))
@@ -44,15 +44,15 @@
4444
// + literal: Const { ty: for<'r> fn(&'r [&i32]) -> *const &i32 {core::slice::<impl [&i32]>::as_ptr}, val: Value(Scalar(<ZST>)) }
4545
}
4646

47-
bb1: {
47+
bb1 (cleanup): {
48+
resume; // scope 0 at $DIR/const-promotion-extern-static.rs:13:1: 13:56
49+
}
50+
51+
bb2: {
4852
- StorageDead(_5); // scope 0 at $DIR/const-promotion-extern-static.rs:13:54: 13:55
4953
- StorageDead(_3); // scope 0 at $DIR/const-promotion-extern-static.rs:13:54: 13:55
5054
return; // scope 0 at $DIR/const-promotion-extern-static.rs:13:1: 13:56
5155
}
52-
53-
bb2 (cleanup): {
54-
resume; // scope 0 at $DIR/const-promotion-extern-static.rs:13:1: 13:56
55-
}
5656
}
5757
-
5858
- alloc2 (extern static: X)

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,14 @@
3535
// + span: $DIR/boxes.rs:12:25: 12:26
3636
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
3737
StorageDead(_2); // scope 0 at $DIR/boxes.rs:12:25: 12:26
38-
drop(_3) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/boxes.rs:12:26: 12:27
38+
drop(_3) -> [return: bb2, unwind: bb1]; // scope 0 at $DIR/boxes.rs:12:26: 12:27
3939
}
4040

41-
bb1: {
41+
bb1 (cleanup): {
42+
resume; // scope 0 at $DIR/boxes.rs:11:1: 13:2
43+
}
44+
45+
bb2: {
4246
StorageDead(_3); // scope 0 at $DIR/boxes.rs:12:26: 12:27
4347
_0 = const (); // scope 0 at $DIR/boxes.rs:11:11: 13:2
4448
// ty::Const
@@ -50,9 +54,5 @@
5054
StorageDead(_1); // scope 0 at $DIR/boxes.rs:13:1: 13:2
5155
return; // scope 0 at $DIR/boxes.rs:13:2: 13:2
5256
}
53-
54-
bb2 (cleanup): {
55-
resume; // scope 0 at $DIR/boxes.rs:11:1: 13:2
56-
}
5757
}
5858

src/test/mir-opt/generator-drop-cleanup/rustc.main-{{closure}}.generator_drop.0.mir

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,56 +21,60 @@ fn main::{{closure}}#0(_1: *mut [generator@$DIR/generator-drop-cleanup.rs:10:15:
2121

2222
bb0: {
2323
_9 = discriminant((*_1)); // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
24-
switchInt(move _9) -> [0u32: bb7, 3u32: bb10, otherwise: bb11]; // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
24+
switchInt(move _9) -> [0u32: bb7, 3u32: bb11, otherwise: bb12]; // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
2525
}
2626

27-
bb1: {
28-
StorageDead(_5); // scope 1 at $DIR/generator-drop-cleanup.rs:12:13: 12:14
29-
StorageDead(_4); // scope 1 at $DIR/generator-drop-cleanup.rs:12:14: 12:15
30-
drop((((*_1) as variant#3).0: std::string::String)) -> [return: bb2, unwind: bb5]; // scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6
27+
bb1 (cleanup): {
28+
resume; // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
3129
}
3230

33-
bb2: {
31+
bb2 (cleanup): {
3432
nop; // scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6
3533
goto -> bb8; // scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6
3634
}
3735

3836
bb3: {
39-
return; // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
37+
StorageDead(_5); // scope 1 at $DIR/generator-drop-cleanup.rs:12:13: 12:14
38+
StorageDead(_4); // scope 1 at $DIR/generator-drop-cleanup.rs:12:14: 12:15
39+
drop((((*_1) as variant#3).0: std::string::String)) -> [return: bb4, unwind: bb2]; // scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6
4040
}
4141

42-
bb4 (cleanup): {
43-
resume; // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
42+
bb4: {
43+
nop; // scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6
44+
goto -> bb9; // scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6
4445
}
4546

46-
bb5 (cleanup): {
47-
nop; // scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6
48-
goto -> bb4; // scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6
47+
bb5: {
48+
return; // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
4949
}
5050

5151
bb6: {
5252
return; // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
5353
}
5454

5555
bb7: {
56-
goto -> bb9; // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
56+
goto -> bb10; // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
5757
}
5858

59-
bb8: {
60-
goto -> bb3; // scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6
59+
bb8 (cleanup): {
60+
goto -> bb1; // scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6
6161
}
6262

6363
bb9: {
64-
goto -> bb6; // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
64+
goto -> bb5; // scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6
6565
}
6666

6767
bb10: {
68+
goto -> bb6; // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
69+
}
70+
71+
bb11: {
6872
StorageLive(_4); // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
6973
StorageLive(_5); // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
70-
goto -> bb1; // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
74+
goto -> bb3; // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
7175
}
7276

73-
bb11: {
77+
bb12: {
7478
return; // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
7579
}
7680
}

0 commit comments

Comments
 (0)