Skip to content

Commit 9088807

Browse files
committed
update mir tests
1 parent 5dee38d commit 9088807

12 files changed

+89
-89
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@
5252
- }
5353
-
5454
- bb3: {
55-
StorageLive(_8); // scope 0 at $DIR/early_otherwise_branch.rs:5:15: 5:16
56-
_8 = (((_3.0: std::option::Option<u32>) as Some).0: u32); // scope 0 at $DIR/early_otherwise_branch.rs:5:15: 5:16
5755
StorageLive(_9); // scope 0 at $DIR/early_otherwise_branch.rs:5:24: 5:25
5856
_9 = (((_3.1: std::option::Option<u32>) as Some).0: u32); // scope 0 at $DIR/early_otherwise_branch.rs:5:24: 5:25
57+
StorageLive(_8); // scope 0 at $DIR/early_otherwise_branch.rs:5:15: 5:16
58+
_8 = (((_3.0: std::option::Option<u32>) as Some).0: u32); // scope 0 at $DIR/early_otherwise_branch.rs:5:15: 5:16
5959
_0 = const 0_u32; // scope 1 at $DIR/early_otherwise_branch.rs:5:31: 5:32
60-
StorageDead(_9); // scope 0 at $DIR/early_otherwise_branch.rs:5:31: 5:32
6160
StorageDead(_8); // scope 0 at $DIR/early_otherwise_branch.rs:5:31: 5:32
61+
StorageDead(_9); // scope 0 at $DIR/early_otherwise_branch.rs:5:31: 5:32
6262
- goto -> bb4; // scope 0 at $DIR/early_otherwise_branch.rs:4:5: 7:6
6363
+ goto -> bb3; // scope 0 at $DIR/early_otherwise_branch.rs:4:5: 7:6
6464
}

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@
5959
-
6060
- bb4: {
6161
+ bb2: {
62-
StorageLive(_9); // scope 0 at $DIR/early_otherwise_branch.rs:13:15: 13:16
63-
_9 = (((_3.0: std::option::Option<u32>) as Some).0: u32); // scope 0 at $DIR/early_otherwise_branch.rs:13:15: 13:16
6462
StorageLive(_10); // scope 0 at $DIR/early_otherwise_branch.rs:13:24: 13:25
6563
_10 = (((_3.1: std::option::Option<u32>) as Some).0: u32); // scope 0 at $DIR/early_otherwise_branch.rs:13:24: 13:25
64+
StorageLive(_9); // scope 0 at $DIR/early_otherwise_branch.rs:13:15: 13:16
65+
_9 = (((_3.0: std::option::Option<u32>) as Some).0: u32); // scope 0 at $DIR/early_otherwise_branch.rs:13:15: 13:16
6666
_0 = const 0_u32; // scope 1 at $DIR/early_otherwise_branch.rs:13:31: 13:32
67-
StorageDead(_10); // scope 0 at $DIR/early_otherwise_branch.rs:13:31: 13:32
6867
StorageDead(_9); // scope 0 at $DIR/early_otherwise_branch.rs:13:31: 13:32
68+
StorageDead(_10); // scope 0 at $DIR/early_otherwise_branch.rs:13:31: 13:32
6969
- goto -> bb6; // scope 0 at $DIR/early_otherwise_branch.rs:12:5: 16:6
7070
+ goto -> bb4; // scope 0 at $DIR/early_otherwise_branch.rs:12:5: 16:6
7171
}

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

+6-6
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,16 @@
7171

7272
- bb4: {
7373
+ bb3: {
74-
StorageLive(_11); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:15: 6:16
75-
_11 = (((_4.0: std::option::Option<u32>) as Some).0: u32); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:15: 6:16
76-
StorageLive(_12); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:24: 6:25
77-
_12 = (((_4.1: std::option::Option<u32>) as Some).0: u32); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:24: 6:25
7874
StorageLive(_13); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:33: 6:34
7975
_13 = (((_4.2: std::option::Option<u32>) as Some).0: u32); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:33: 6:34
76+
StorageLive(_12); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:24: 6:25
77+
_12 = (((_4.1: std::option::Option<u32>) as Some).0: u32); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:24: 6:25
78+
StorageLive(_11); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:15: 6:16
79+
_11 = (((_4.0: std::option::Option<u32>) as Some).0: u32); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:15: 6:16
8080
_0 = const 0_u32; // scope 1 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:40: 6:41
81-
StorageDead(_13); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:40: 6:41
82-
StorageDead(_12); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:40: 6:41
8381
StorageDead(_11); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:40: 6:41
82+
StorageDead(_12); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:40: 6:41
83+
StorageDead(_13); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:6:40: 6:41
8484
- goto -> bb5; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:5:5: 8:6
8585
+ goto -> bb4; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:5:5: 8:6
8686
}

src/test/mir-opt/early_otherwise_branch_68867.try_sum.EarlyOtherwiseBranch.before-SimplifyBranches-final.after.diff

+20-20
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@
109109
}
110110

111111
+ bb2: {
112-
+ nop; // scope 0 at $DIR/early_otherwise_branch_68867.rs:23:14: 23:17
113-
+ _15 = (((*(_4.0: &ViewportPercentageLength)) as Vw).0: f32); // scope 0 at $DIR/early_otherwise_branch_68867.rs:23:14: 23:17
114112
+ nop; // scope 0 at $DIR/early_otherwise_branch_68867.rs:23:24: 23:29
115113
+ _16 = (((*(_4.1: &ViewportPercentageLength)) as Vw).0: f32); // scope 0 at $DIR/early_otherwise_branch_68867.rs:23:24: 23:29
114+
+ nop; // scope 0 at $DIR/early_otherwise_branch_68867.rs:23:14: 23:17
115+
+ _15 = (((*(_4.0: &ViewportPercentageLength)) as Vw).0: f32); // scope 0 at $DIR/early_otherwise_branch_68867.rs:23:14: 23:17
116116
+ nop; // scope 1 at $DIR/early_otherwise_branch_68867.rs:23:38: 23:49
117117
+ nop; // scope 1 at $DIR/early_otherwise_branch_68867.rs:23:38: 23:41
118118
+ nop; // scope 1 at $DIR/early_otherwise_branch_68867.rs:23:38: 23:41
@@ -132,10 +132,10 @@
132132
bb3: {
133133
- _8 = discriminant((*(_4.1: &ViewportPercentageLength))); // scope 0 at $DIR/early_otherwise_branch_68867.rs:24:21: 24:30
134134
- switchInt(move _8) -> [1_isize: bb7, otherwise: bb2]; // scope 0 at $DIR/early_otherwise_branch_68867.rs:24:21: 24:30
135-
+ nop; // scope 0 at $DIR/early_otherwise_branch_68867.rs:24:14: 24:17
136-
+ _20 = (((*(_4.0: &ViewportPercentageLength)) as Vh).0: f32); // scope 0 at $DIR/early_otherwise_branch_68867.rs:24:14: 24:17
137135
+ nop; // scope 0 at $DIR/early_otherwise_branch_68867.rs:24:24: 24:29
138136
+ _21 = (((*(_4.1: &ViewportPercentageLength)) as Vh).0: f32); // scope 0 at $DIR/early_otherwise_branch_68867.rs:24:24: 24:29
137+
+ nop; // scope 0 at $DIR/early_otherwise_branch_68867.rs:24:14: 24:17
138+
+ _20 = (((*(_4.0: &ViewportPercentageLength)) as Vh).0: f32); // scope 0 at $DIR/early_otherwise_branch_68867.rs:24:14: 24:17
139139
+ nop; // scope 2 at $DIR/early_otherwise_branch_68867.rs:24:38: 24:49
140140
+ nop; // scope 2 at $DIR/early_otherwise_branch_68867.rs:24:38: 24:41
141141
+ nop; // scope 2 at $DIR/early_otherwise_branch_68867.rs:24:38: 24:41
@@ -155,10 +155,10 @@
155155
bb4: {
156156
- _9 = discriminant((*(_4.1: &ViewportPercentageLength))); // scope 0 at $DIR/early_otherwise_branch_68867.rs:25:23: 25:34
157157
- switchInt(move _9) -> [2_isize: bb8, otherwise: bb2]; // scope 0 at $DIR/early_otherwise_branch_68867.rs:25:23: 25:34
158-
+ nop; // scope 0 at $DIR/early_otherwise_branch_68867.rs:25:16: 25:19
159-
+ _25 = (((*(_4.0: &ViewportPercentageLength)) as Vmin).0: f32); // scope 0 at $DIR/early_otherwise_branch_68867.rs:25:16: 25:19
160158
+ nop; // scope 0 at $DIR/early_otherwise_branch_68867.rs:25:28: 25:33
161159
+ _26 = (((*(_4.1: &ViewportPercentageLength)) as Vmin).0: f32); // scope 0 at $DIR/early_otherwise_branch_68867.rs:25:28: 25:33
160+
+ nop; // scope 0 at $DIR/early_otherwise_branch_68867.rs:25:16: 25:19
161+
+ _25 = (((*(_4.0: &ViewportPercentageLength)) as Vmin).0: f32); // scope 0 at $DIR/early_otherwise_branch_68867.rs:25:16: 25:19
162162
+ nop; // scope 3 at $DIR/early_otherwise_branch_68867.rs:25:44: 25:55
163163
+ nop; // scope 3 at $DIR/early_otherwise_branch_68867.rs:25:44: 25:47
164164
+ nop; // scope 3 at $DIR/early_otherwise_branch_68867.rs:25:44: 25:47
@@ -178,10 +178,10 @@
178178
bb5: {
179179
- _10 = discriminant((*(_4.1: &ViewportPercentageLength))); // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:23: 26:34
180180
- switchInt(move _10) -> [3_isize: bb9, otherwise: bb2]; // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:23: 26:34
181-
+ nop; // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:16: 26:19
182-
+ _30 = (((*(_4.0: &ViewportPercentageLength)) as Vmax).0: f32); // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:16: 26:19
183181
+ nop; // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:28: 26:33
184182
+ _31 = (((*(_4.1: &ViewportPercentageLength)) as Vmax).0: f32); // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:28: 26:33
183+
+ nop; // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:16: 26:19
184+
+ _30 = (((*(_4.0: &ViewportPercentageLength)) as Vmax).0: f32); // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:16: 26:19
185185
+ nop; // scope 4 at $DIR/early_otherwise_branch_68867.rs:26:44: 26:55
186186
+ nop; // scope 4 at $DIR/early_otherwise_branch_68867.rs:26:44: 26:47
187187
+ nop; // scope 4 at $DIR/early_otherwise_branch_68867.rs:26:44: 26:47
@@ -199,10 +199,10 @@
199199
}
200200

201201
bb6: {
202-
- StorageLive(_12); // scope 0 at $DIR/early_otherwise_branch_68867.rs:23:14: 23:17
203-
- _12 = (((*(_4.0: &ViewportPercentageLength)) as Vw).0: f32); // scope 0 at $DIR/early_otherwise_branch_68867.rs:23:14: 23:17
204202
- StorageLive(_13); // scope 0 at $DIR/early_otherwise_branch_68867.rs:23:24: 23:29
205203
- _13 = (((*(_4.1: &ViewportPercentageLength)) as Vw).0: f32); // scope 0 at $DIR/early_otherwise_branch_68867.rs:23:24: 23:29
204+
- StorageLive(_12); // scope 0 at $DIR/early_otherwise_branch_68867.rs:23:14: 23:17
205+
- _12 = (((*(_4.0: &ViewportPercentageLength)) as Vw).0: f32); // scope 0 at $DIR/early_otherwise_branch_68867.rs:23:14: 23:17
206206
- StorageLive(_14); // scope 1 at $DIR/early_otherwise_branch_68867.rs:23:38: 23:49
207207
- StorageLive(_15); // scope 1 at $DIR/early_otherwise_branch_68867.rs:23:38: 23:41
208208
- _15 = _12; // scope 1 at $DIR/early_otherwise_branch_68867.rs:23:38: 23:41
@@ -214,8 +214,8 @@
214214
- ((_3 as Vw).0: f32) = move _14; // scope 1 at $DIR/early_otherwise_branch_68867.rs:23:35: 23:50
215215
- discriminant(_3) = 0; // scope 1 at $DIR/early_otherwise_branch_68867.rs:23:35: 23:50
216216
- StorageDead(_14); // scope 1 at $DIR/early_otherwise_branch_68867.rs:23:49: 23:50
217-
- StorageDead(_13); // scope 0 at $DIR/early_otherwise_branch_68867.rs:23:49: 23:50
218217
- StorageDead(_12); // scope 0 at $DIR/early_otherwise_branch_68867.rs:23:49: 23:50
218+
- StorageDead(_13); // scope 0 at $DIR/early_otherwise_branch_68867.rs:23:49: 23:50
219219
- goto -> bb10; // scope 0 at $DIR/early_otherwise_branch_68867.rs:22:8: 28:6
220220
+ nop; // scope 0 at $DIR/early_otherwise_branch_68867.rs:22:5: 28:7
221221
+ discriminant(_0) = 0; // scope 0 at $DIR/early_otherwise_branch_68867.rs:22:5: 28:7
@@ -225,10 +225,10 @@
225225
}
226226

227227
bb7: {
228-
- StorageLive(_17); // scope 0 at $DIR/early_otherwise_branch_68867.rs:24:14: 24:17
229-
- _17 = (((*(_4.0: &ViewportPercentageLength)) as Vh).0: f32); // scope 0 at $DIR/early_otherwise_branch_68867.rs:24:14: 24:17
230228
- StorageLive(_18); // scope 0 at $DIR/early_otherwise_branch_68867.rs:24:24: 24:29
231229
- _18 = (((*(_4.1: &ViewportPercentageLength)) as Vh).0: f32); // scope 0 at $DIR/early_otherwise_branch_68867.rs:24:24: 24:29
230+
- StorageLive(_17); // scope 0 at $DIR/early_otherwise_branch_68867.rs:24:14: 24:17
231+
- _17 = (((*(_4.0: &ViewportPercentageLength)) as Vh).0: f32); // scope 0 at $DIR/early_otherwise_branch_68867.rs:24:14: 24:17
232232
- StorageLive(_19); // scope 2 at $DIR/early_otherwise_branch_68867.rs:24:38: 24:49
233233
- StorageLive(_20); // scope 2 at $DIR/early_otherwise_branch_68867.rs:24:38: 24:41
234234
- _20 = _17; // scope 2 at $DIR/early_otherwise_branch_68867.rs:24:38: 24:41
@@ -240,16 +240,16 @@
240240
- ((_3 as Vh).0: f32) = move _19; // scope 2 at $DIR/early_otherwise_branch_68867.rs:24:35: 24:50
241241
- discriminant(_3) = 1; // scope 2 at $DIR/early_otherwise_branch_68867.rs:24:35: 24:50
242242
- StorageDead(_19); // scope 2 at $DIR/early_otherwise_branch_68867.rs:24:49: 24:50
243-
- StorageDead(_18); // scope 0 at $DIR/early_otherwise_branch_68867.rs:24:49: 24:50
244243
- StorageDead(_17); // scope 0 at $DIR/early_otherwise_branch_68867.rs:24:49: 24:50
244+
- StorageDead(_18); // scope 0 at $DIR/early_otherwise_branch_68867.rs:24:49: 24:50
245245
- goto -> bb10; // scope 0 at $DIR/early_otherwise_branch_68867.rs:22:8: 28:6
246246
- }
247247
-
248248
- bb8: {
249-
- StorageLive(_22); // scope 0 at $DIR/early_otherwise_branch_68867.rs:25:16: 25:19
250-
- _22 = (((*(_4.0: &ViewportPercentageLength)) as Vmin).0: f32); // scope 0 at $DIR/early_otherwise_branch_68867.rs:25:16: 25:19
251249
- StorageLive(_23); // scope 0 at $DIR/early_otherwise_branch_68867.rs:25:28: 25:33
252250
- _23 = (((*(_4.1: &ViewportPercentageLength)) as Vmin).0: f32); // scope 0 at $DIR/early_otherwise_branch_68867.rs:25:28: 25:33
251+
- StorageLive(_22); // scope 0 at $DIR/early_otherwise_branch_68867.rs:25:16: 25:19
252+
- _22 = (((*(_4.0: &ViewportPercentageLength)) as Vmin).0: f32); // scope 0 at $DIR/early_otherwise_branch_68867.rs:25:16: 25:19
253253
- StorageLive(_24); // scope 3 at $DIR/early_otherwise_branch_68867.rs:25:44: 25:55
254254
- StorageLive(_25); // scope 3 at $DIR/early_otherwise_branch_68867.rs:25:44: 25:47
255255
- _25 = _22; // scope 3 at $DIR/early_otherwise_branch_68867.rs:25:44: 25:47
@@ -261,16 +261,16 @@
261261
- ((_3 as Vmin).0: f32) = move _24; // scope 3 at $DIR/early_otherwise_branch_68867.rs:25:39: 25:56
262262
- discriminant(_3) = 2; // scope 3 at $DIR/early_otherwise_branch_68867.rs:25:39: 25:56
263263
- StorageDead(_24); // scope 3 at $DIR/early_otherwise_branch_68867.rs:25:55: 25:56
264-
- StorageDead(_23); // scope 0 at $DIR/early_otherwise_branch_68867.rs:25:55: 25:56
265264
- StorageDead(_22); // scope 0 at $DIR/early_otherwise_branch_68867.rs:25:55: 25:56
265+
- StorageDead(_23); // scope 0 at $DIR/early_otherwise_branch_68867.rs:25:55: 25:56
266266
- goto -> bb10; // scope 0 at $DIR/early_otherwise_branch_68867.rs:22:8: 28:6
267267
- }
268268
-
269269
- bb9: {
270-
- StorageLive(_27); // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:16: 26:19
271-
- _27 = (((*(_4.0: &ViewportPercentageLength)) as Vmax).0: f32); // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:16: 26:19
272270
- StorageLive(_28); // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:28: 26:33
273271
- _28 = (((*(_4.1: &ViewportPercentageLength)) as Vmax).0: f32); // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:28: 26:33
272+
- StorageLive(_27); // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:16: 26:19
273+
- _27 = (((*(_4.0: &ViewportPercentageLength)) as Vmax).0: f32); // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:16: 26:19
274274
- StorageLive(_29); // scope 4 at $DIR/early_otherwise_branch_68867.rs:26:44: 26:55
275275
- StorageLive(_30); // scope 4 at $DIR/early_otherwise_branch_68867.rs:26:44: 26:47
276276
- _30 = _27; // scope 4 at $DIR/early_otherwise_branch_68867.rs:26:44: 26:47
@@ -282,8 +282,8 @@
282282
- ((_3 as Vmax).0: f32) = move _29; // scope 4 at $DIR/early_otherwise_branch_68867.rs:26:39: 26:56
283283
- discriminant(_3) = 3; // scope 4 at $DIR/early_otherwise_branch_68867.rs:26:39: 26:56
284284
- StorageDead(_29); // scope 4 at $DIR/early_otherwise_branch_68867.rs:26:55: 26:56
285-
- StorageDead(_28); // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:55: 26:56
286285
- StorageDead(_27); // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:55: 26:56
286+
- StorageDead(_28); // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:55: 26:56
287287
- goto -> bb10; // scope 0 at $DIR/early_otherwise_branch_68867.rs:22:8: 28:6
288288
- }
289289
-

0 commit comments

Comments
 (0)