Skip to content

Commit 699bf7d

Browse files
committed
Switch some tests over to new MIR opt unit tests
1 parent f280a83 commit 699bf7d

25 files changed

+123
-33
lines changed

src/test/mir-opt/combine_clone_of_primitives.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -C opt-level=0 -Z inline_mir=no
1+
// unit-test: InstCombine
22
// ignore-wasm32 compiled with panic=abort by default
33

44
// EMIT_MIR combine_clone_of_primitives.{impl#0}-clone.InstCombine.diff

src/test/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstCombine.diff

+24
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,15 @@
2323
}
2424

2525
bb0: {
26+
StorageLive(_2); // scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
2627
_2 = &((*_1).0: T); // scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
28+
StorageLive(_3); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
2729
_3 = &((*_1).1: u64); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
30+
StorageLive(_4); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
2831
_4 = &((*_1).2: [f32; 3]); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
32+
StorageLive(_5); // scope 1 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
33+
StorageLive(_6); // scope 1 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
34+
StorageLive(_7); // scope 1 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
2935
- _7 = &(*_2); // scope 1 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
3036
- _6 = &(*_7); // scope 1 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
3137
+ _7 = _2; // scope 1 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
@@ -37,6 +43,10 @@
3743
}
3844

3945
bb1: {
46+
StorageDead(_6); // scope 1 at $DIR/combine_clone_of_primitives.rs:8:8: 8:9
47+
StorageLive(_8); // scope 1 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
48+
StorageLive(_9); // scope 1 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
49+
StorageLive(_10); // scope 1 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
4050
- _10 = &(*_3); // scope 1 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
4151
- _9 = &(*_10); // scope 1 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
4252
- _8 = <u64 as Clone>::clone(move _9) -> [return: bb2, unwind: bb4]; // scope 1 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
@@ -50,6 +60,10 @@
5060
}
5161

5262
bb2: {
63+
StorageDead(_9); // scope 1 at $DIR/combine_clone_of_primitives.rs:9:10: 9:11
64+
StorageLive(_11); // scope 1 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
65+
StorageLive(_12); // scope 1 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
66+
StorageLive(_13); // scope 1 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
5367
- _13 = &(*_4); // scope 1 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
5468
- _12 = &(*_13); // scope 1 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
5569
- _11 = <[f32; 3] as Clone>::clone(move _12) -> [return: bb3, unwind: bb4]; // scope 1 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
@@ -63,10 +77,20 @@
6377
}
6478

6579
bb3: {
80+
StorageDead(_12); // scope 1 at $DIR/combine_clone_of_primitives.rs:10:15: 10:16
6681
Deinit(_0); // scope 1 at $DIR/combine_clone_of_primitives.rs:6:10: 6:15
6782
(_0.0: T) = move _5; // scope 1 at $DIR/combine_clone_of_primitives.rs:6:10: 6:15
6883
(_0.1: u64) = move _8; // scope 1 at $DIR/combine_clone_of_primitives.rs:6:10: 6:15
6984
(_0.2: [f32; 3]) = move _11; // scope 1 at $DIR/combine_clone_of_primitives.rs:6:10: 6:15
85+
StorageDead(_13); // scope 1 at $DIR/combine_clone_of_primitives.rs:6:14: 6:15
86+
StorageDead(_11); // scope 1 at $DIR/combine_clone_of_primitives.rs:6:14: 6:15
87+
StorageDead(_10); // scope 1 at $DIR/combine_clone_of_primitives.rs:6:14: 6:15
88+
StorageDead(_8); // scope 1 at $DIR/combine_clone_of_primitives.rs:6:14: 6:15
89+
StorageDead(_7); // scope 1 at $DIR/combine_clone_of_primitives.rs:6:14: 6:15
90+
StorageDead(_5); // scope 1 at $DIR/combine_clone_of_primitives.rs:6:14: 6:15
91+
StorageDead(_4); // scope 0 at $DIR/combine_clone_of_primitives.rs:6:14: 6:15
92+
StorageDead(_3); // scope 0 at $DIR/combine_clone_of_primitives.rs:6:14: 6:15
93+
StorageDead(_2); // scope 0 at $DIR/combine_clone_of_primitives.rs:6:14: 6:15
7094
return; // scope 0 at $DIR/combine_clone_of_primitives.rs:6:15: 6:15
7195
}
7296

src/test/mir-opt/early_otherwise_branch.opt1.EarlyOtherwiseBranch.diff

+4-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@
6868
+ bb3: {
6969
StorageDead(_3); // scope 0 at $DIR/early_otherwise_branch.rs:8:1: 8:2
7070
return; // scope 0 at $DIR/early_otherwise_branch.rs:8:2: 8:2
71-
+ }
72-
+
71+
}
72+
73+
- bb5 (cleanup): {
74+
- resume; // scope 0 at $DIR/early_otherwise_branch.rs:3:1: 8:2
7375
+ bb4: {
7476
+ StorageDead(_11); // scope 0 at $DIR/early_otherwise_branch.rs:4:5: 4:17
7577
+ switchInt(_7) -> [1_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/early_otherwise_branch.rs:4:5: 4:17

src/test/mir-opt/early_otherwise_branch.opt2.EarlyOtherwiseBranch.diff

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
StorageDead(_5); // scope 0 at $DIR/early_otherwise_branch.rs:12:16: 12:17
3333
StorageDead(_4); // scope 0 at $DIR/early_otherwise_branch.rs:12:16: 12:17
3434
_8 = discriminant((_3.0: std::option::Option<u32>)); // scope 0 at $DIR/early_otherwise_branch.rs:12:11: 12:17
35-
- switchInt(move _8) -> [0_isize: bb1, 1_isize: bb3, otherwise: bb7]; // scope 0 at $DIR/early_otherwise_branch.rs:12:5: 12:17
35+
- switchInt(move _8) -> [0_isize: bb1, 1_isize: bb3, otherwise: bb2]; // scope 0 at $DIR/early_otherwise_branch.rs:12:5: 12:17
3636
+ StorageLive(_11); // scope 0 at $DIR/early_otherwise_branch.rs:12:5: 12:17
3737
+ _11 = discriminant((_3.1: std::option::Option<u32>)); // scope 0 at $DIR/early_otherwise_branch.rs:12:5: 12:17
3838
+ StorageLive(_12); // scope 0 at $DIR/early_otherwise_branch.rs:12:5: 12:17
@@ -84,8 +84,8 @@
8484
return; // scope 0 at $DIR/early_otherwise_branch.rs:17:2: 17:2
8585
}
8686

87-
- bb7: {
88-
- unreachable; // scope 0 at $DIR/early_otherwise_branch.rs:15:14: 15:15
87+
- bb7 (cleanup): {
88+
- resume; // scope 0 at $DIR/early_otherwise_branch.rs:11:1: 17:2
8989
+ bb5: {
9090
+ StorageDead(_12); // scope 0 at $DIR/early_otherwise_branch.rs:12:5: 12:17
9191
+ switchInt(_8) -> [0_isize: bb3, 1_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/early_otherwise_branch.rs:12:5: 12:17

src/test/mir-opt/early_otherwise_branch.opt3.EarlyOtherwiseBranch.diff

+4-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@
6868
+ bb3: {
6969
StorageDead(_3); // scope 0 at $DIR/early_otherwise_branch.rs:26:1: 26:2
7070
return; // scope 0 at $DIR/early_otherwise_branch.rs:26:2: 26:2
71-
+ }
72-
+
71+
}
72+
73+
- bb5 (cleanup): {
74+
- resume; // scope 0 at $DIR/early_otherwise_branch.rs:21:1: 26:2
7375
+ bb4: {
7476
+ StorageDead(_11); // scope 0 at $DIR/early_otherwise_branch.rs:22:5: 22:17
7577
+ switchInt(_7) -> [1_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/early_otherwise_branch.rs:22:5: 22:17

src/test/mir-opt/early_otherwise_branch.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Z mir-opt-level=4 -Z unsound-mir-opts
1+
// unit-test: EarlyOtherwiseBranch
22
// EMIT_MIR early_otherwise_branch.opt1.EarlyOtherwiseBranch.diff
33
fn opt1(x: Option<u32>, y: Option<u32>) -> u32 {
44
match (x, y) {

src/test/mir-opt/early_otherwise_branch_3_element_tuple.opt1.EarlyOtherwiseBranch.diff

+4-2
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,10 @@
9090
+ bb4: {
9191
StorageDead(_4); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:9:1: 9:2
9292
return; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:9:2: 9:2
93-
+ }
94-
+
93+
}
94+
95+
- bb6 (cleanup): {
96+
- resume; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:4:1: 9:2
9597
+ bb5: {
9698
+ StorageDead(_15); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:5:5: 5:20
9799
+ switchInt(_10) -> [1_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:5:5: 5:20

src/test/mir-opt/early_otherwise_branch_3_element_tuple.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Z mir-opt-level=4 -Z unsound-mir-opts
1+
// unit-test: EarlyOtherwiseBranch
22

33
// EMIT_MIR early_otherwise_branch_3_element_tuple.opt1.EarlyOtherwiseBranch.diff
44
fn opt1(x: Option<u32>, y: Option<u32>, z: Option<u32>) -> u32 {

src/test/mir-opt/early_otherwise_branch_noopt.noopt1.EarlyOtherwiseBranch.diff

+19-11
Original file line numberDiff line numberDiff line change
@@ -38,54 +38,62 @@
3838
StorageDead(_5); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:16: 8:17
3939
StorageDead(_4); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:16: 8:17
4040
_8 = discriminant((_3.0: std::option::Option<u32>)); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:11: 8:17
41-
switchInt(move _8) -> [0_isize: bb1, otherwise: bb3]; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:5: 8:17
41+
switchInt(move _8) -> [0_isize: bb1, 1_isize: bb4, otherwise: bb3]; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:5: 8:17
4242
}
4343

4444
bb1: {
4545
_6 = discriminant((_3.1: std::option::Option<u32>)); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:11: 8:17
46-
switchInt(move _6) -> [0_isize: bb2, otherwise: bb6]; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:5: 8:17
46+
switchInt(move _6) -> [0_isize: bb2, 1_isize: bb7, otherwise: bb3]; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:5: 8:17
4747
}
4848

4949
bb2: {
5050
_0 = const 3_u32; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:12:25: 12:26
51-
goto -> bb7; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:12:25: 12:26
51+
goto -> bb8; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:12:25: 12:26
5252
}
5353

5454
bb3: {
55-
_7 = discriminant((_3.1: std::option::Option<u32>)); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:11: 8:17
56-
switchInt(move _7) -> [0_isize: bb5, otherwise: bb4]; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:5: 8:17
55+
unreachable; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:11: 8:17
5756
}
5857

5958
bb4: {
59+
_7 = discriminant((_3.1: std::option::Option<u32>)); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:11: 8:17
60+
switchInt(move _7) -> [0_isize: bb6, 1_isize: bb5, otherwise: bb3]; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:5: 8:17
61+
}
62+
63+
bb5: {
6064
StorageLive(_9); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:9:15: 9:16
6165
_9 = (((_3.0: std::option::Option<u32>) as Some).0: u32); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:9:15: 9:16
6266
StorageLive(_10); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:9:24: 9:25
6367
_10 = (((_3.1: std::option::Option<u32>) as Some).0: u32); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:9:24: 9:25
6468
_0 = const 0_u32; // scope 1 at $DIR/early_otherwise_branch_noopt.rs:9:31: 9:32
6569
StorageDead(_10); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:9:31: 9:32
6670
StorageDead(_9); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:9:31: 9:32
67-
goto -> bb7; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:9:31: 9:32
71+
goto -> bb8; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:9:31: 9:32
6872
}
6973

70-
bb5: {
74+
bb6: {
7175
StorageLive(_11); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:10:15: 10:16
7276
_11 = (((_3.0: std::option::Option<u32>) as Some).0: u32); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:10:15: 10:16
7377
_0 = const 1_u32; // scope 2 at $DIR/early_otherwise_branch_noopt.rs:10:28: 10:29
7478
StorageDead(_11); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:10:28: 10:29
75-
goto -> bb7; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:10:28: 10:29
79+
goto -> bb8; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:10:28: 10:29
7680
}
7781

78-
bb6: {
82+
bb7: {
7983
StorageLive(_12); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:11:21: 11:22
8084
_12 = (((_3.1: std::option::Option<u32>) as Some).0: u32); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:11:21: 11:22
8185
_0 = const 2_u32; // scope 3 at $DIR/early_otherwise_branch_noopt.rs:11:28: 11:29
8286
StorageDead(_12); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:11:28: 11:29
83-
goto -> bb7; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:11:28: 11:29
87+
goto -> bb8; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:11:28: 11:29
8488
}
8589

86-
bb7: {
90+
bb8: {
8791
StorageDead(_3); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:14:1: 14:2
8892
return; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:14:2: 14:2
8993
}
94+
95+
bb9 (cleanup): {
96+
resume; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:7:1: 14:2
97+
}
9098
}
9199

src/test/mir-opt/early_otherwise_branch_noopt.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Z mir-opt-level=4 -Zunsound-mir-opts
1+
// unit-test: EarlyOtherwiseBranch
22

33
// must not optimize as it does not follow the pattern of
44
// left and right hand side being the same variant

src/test/mir-opt/early_otherwise_branch_soundness.no_deref_ptr.EarlyOtherwiseBranch.diff

+11-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
bb1: {
2121
_0 = const 0_i32; // scope 0 at $DIR/early_otherwise_branch_soundness.rs:25:14: 25:15
22-
return; // scope 0 at $DIR/early_otherwise_branch_soundness.rs:25:14: 25:15
22+
goto -> bb5; // scope 0 at $DIR/early_otherwise_branch_soundness.rs:25:14: 25:15
2323
}
2424

2525
bb2: {
@@ -29,15 +29,23 @@
2929

3030
bb3: {
3131
_0 = const 0_i32; // scope 0 at $DIR/early_otherwise_branch_soundness.rs:23:18: 23:19
32-
return; // scope 0 at $DIR/early_otherwise_branch_soundness.rs:23:18: 23:19
32+
goto -> bb5; // scope 0 at $DIR/early_otherwise_branch_soundness.rs:23:18: 23:19
3333
}
3434

3535
bb4: {
3636
StorageLive(_5); // scope 0 at $DIR/early_otherwise_branch_soundness.rs:22:18: 22:19
3737
_5 = (((*_2) as Some).0: i32); // scope 0 at $DIR/early_otherwise_branch_soundness.rs:22:18: 22:19
3838
_0 = _5; // scope 1 at $DIR/early_otherwise_branch_soundness.rs:22:24: 22:25
3939
StorageDead(_5); // scope 0 at $DIR/early_otherwise_branch_soundness.rs:22:24: 22:25
40-
return; // scope 0 at $DIR/early_otherwise_branch_soundness.rs:22:24: 22:25
40+
goto -> bb5; // scope 0 at $DIR/early_otherwise_branch_soundness.rs:22:24: 22:25
41+
}
42+
43+
bb5: {
44+
return; // scope 0 at $DIR/early_otherwise_branch_soundness.rs:27:2: 27:2
45+
}
46+
47+
bb6 (cleanup): {
48+
resume; // scope 0 at $DIR/early_otherwise_branch_soundness.rs:18:1: 27:2
4149
}
4250
}
4351

src/test/mir-opt/early_otherwise_branch_soundness.no_downcast.EarlyOtherwiseBranch.diff

+10-2
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,20 @@
1919

2020
bb2: {
2121
_0 = const 1_u32; // scope 0 at $DIR/early_otherwise_branch_soundness.rs:13:38: 13:39
22-
return; // scope 0 at $DIR/early_otherwise_branch_soundness.rs:13:5: 13:52
22+
goto -> bb4; // scope 0 at $DIR/early_otherwise_branch_soundness.rs:13:5: 13:52
2323
}
2424

2525
bb3: {
2626
_0 = const 2_u32; // scope 0 at $DIR/early_otherwise_branch_soundness.rs:13:49: 13:50
27-
return; // scope 0 at $DIR/early_otherwise_branch_soundness.rs:13:5: 13:52
27+
goto -> bb4; // scope 0 at $DIR/early_otherwise_branch_soundness.rs:13:5: 13:52
28+
}
29+
30+
bb4: {
31+
return; // scope 0 at $DIR/early_otherwise_branch_soundness.rs:14:2: 14:2
32+
}
33+
34+
bb5 (cleanup): {
35+
resume; // scope 0 at $DIR/early_otherwise_branch_soundness.rs:12:1: 14:2
2836
}
2937
}
3038

src/test/mir-opt/early_otherwise_branch_soundness.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Z mir-opt-level=4 -Zunsound-mir-opts
1+
// unit-test: EarlyOtherwiseBranch
22

33
// Tests various cases that the `early_otherwise_branch` opt should *not* optimize
44

src/test/mir-opt/if-condition-int.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -O
1+
// unit-test: SimplifyComparisonIntegral
22
// EMIT_MIR if_condition_int.opt_u32.SimplifyComparisonIntegral.diff
33
// EMIT_MIR if_condition_int.opt_negative.SimplifyComparisonIntegral.diff
44
// EMIT_MIR if_condition_int.opt_char.SimplifyComparisonIntegral.diff

src/test/mir-opt/if_condition_int.dont_opt_bool.SimplifyComparisonIntegral.diff

+4
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,9 @@
2626
StorageDead(_2); // scope 0 at $DIR/if-condition-int.rs:17:25: 17:26
2727
return; // scope 0 at $DIR/if-condition-int.rs:18:2: 18:2
2828
}
29+
30+
bb4 (cleanup): {
31+
resume; // scope 0 at $DIR/if-condition-int.rs:16:1: 18:2
32+
}
2933
}
3034

src/test/mir-opt/if_condition_int.dont_opt_floats.SimplifyComparisonIntegral.diff

+4
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,9 @@
3030
StorageDead(_2); // scope 0 at $DIR/if-condition-int.rs:53:34: 53:35
3131
return; // scope 0 at $DIR/if-condition-int.rs:54:2: 54:2
3232
}
33+
34+
bb4 (cleanup): {
35+
resume; // scope 0 at $DIR/if-condition-int.rs:52:1: 54:2
36+
}
3337
}
3438

src/test/mir-opt/if_condition_int.dont_remove_comparison.SimplifyComparisonIntegral.diff

+4
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,9 @@
5454
StorageDead(_2); // scope 0 at $DIR/if-condition-int.rs:49:1: 49:2
5555
return; // scope 0 at $DIR/if-condition-int.rs:49:2: 49:2
5656
}
57+
58+
bb4 (cleanup): {
59+
resume; // scope 0 at $DIR/if-condition-int.rs:43:1: 49:2
60+
}
5761
}
5862

src/test/mir-opt/if_condition_int.opt_char.SimplifyComparisonIntegral.diff

+4
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,9 @@
3535
StorageDead(_2); // scope 0 at $DIR/if-condition-int.rs:21:32: 21:33
3636
return; // scope 0 at $DIR/if-condition-int.rs:22:2: 22:2
3737
}
38+
39+
bb4 (cleanup): {
40+
resume; // scope 0 at $DIR/if-condition-int.rs:20:1: 22:2
41+
}
3842
}
3943

src/test/mir-opt/if_condition_int.opt_i8.SimplifyComparisonIntegral.diff

+4
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,9 @@
3535
StorageDead(_2); // scope 0 at $DIR/if-condition-int.rs:25:31: 25:32
3636
return; // scope 0 at $DIR/if-condition-int.rs:26:2: 26:2
3737
}
38+
39+
bb4 (cleanup): {
40+
resume; // scope 0 at $DIR/if-condition-int.rs:24:1: 26:2
41+
}
3842
}
3943

src/test/mir-opt/if_condition_int.opt_multiple_ifs.SimplifyComparisonIntegral.diff

+4
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,9 @@
6161
StorageDead(_2); // scope 0 at $DIR/if-condition-int.rs:39:5: 39:6
6262
return; // scope 0 at $DIR/if-condition-int.rs:40:2: 40:2
6363
}
64+
65+
bb7 (cleanup): {
66+
resume; // scope 0 at $DIR/if-condition-int.rs:32:1: 40:2
67+
}
6468
}
6569

src/test/mir-opt/if_condition_int.opt_negative.SimplifyComparisonIntegral.diff

+4
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,9 @@
3535
StorageDead(_2); // scope 0 at $DIR/if-condition-int.rs:29:32: 29:33
3636
return; // scope 0 at $DIR/if-condition-int.rs:30:2: 30:2
3737
}
38+
39+
bb4 (cleanup): {
40+
resume; // scope 0 at $DIR/if-condition-int.rs:28:1: 30:2
41+
}
3842
}
3943

src/test/mir-opt/if_condition_int.opt_u32.SimplifyComparisonIntegral.diff

+4
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,9 @@
3535
StorageDead(_2); // scope 0 at $DIR/if-condition-int.rs:12:31: 12:32
3636
return; // scope 0 at $DIR/if-condition-int.rs:13:2: 13:2
3737
}
38+
39+
bb4 (cleanup): {
40+
resume; // scope 0 at $DIR/if-condition-int.rs:11:1: 13:2
41+
}
3842
}
3943

src/test/mir-opt/lower_slice_len.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Z mir-opt-level=3
1+
// unit-test: LowerSliceLenCalls
22

33
// EMIT_MIR lower_slice_len.bound.LowerSliceLenCalls.diff
44
pub fn bound(index: usize, slice: &[u8]) -> u8 {

src/test/mir-opt/nrvo-simple.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Zmir-opt-level=1
1+
// unit-test: RenameReturnPlace
22

33
// EMIT_MIR nrvo_simple.nrvo.RenameReturnPlace.diff
44
fn nrvo(init: fn(&mut [u8; 1024])) -> [u8; 1024] {

0 commit comments

Comments
 (0)