File tree Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -469,6 +469,7 @@ fn run_optimization_passes<'tcx>(
469
469
& simplify:: SimplifyCfg :: new ( "final" ) ,
470
470
& nrvo:: RenameReturnPlace ,
471
471
& simplify:: SimplifyLocals ,
472
+ & multiple_return_terminators:: MultipleReturnTerminators ,
472
473
] ;
473
474
474
475
// Optimizations to run even if mir optimizations have been disabled.
Original file line number Diff line number Diff line change 4
4
fn test(_1: bool) -> () {
5
5
debug x => _1; // in scope 0 at $DIR/multiple_return_terminators.rs:3:9: 3:10
6
6
let mut _0: (); // return place in scope 0 at $DIR/multiple_return_terminators.rs:3:18: 3:18
7
- let mut _2: bool; // in scope 0 at $DIR/multiple_return_terminators.rs:4:8: 4:9
8
7
9
8
bb0: {
10
- StorageLive(_2); // scope 0 at $DIR/multiple_return_terminators.rs:4:8: 4:9
11
- _2 = _1; // scope 0 at $DIR/multiple_return_terminators.rs:4:8: 4:9
12
- switchInt(_2) -> [false: bb1, otherwise: bb2]; // scope 0 at $DIR/multiple_return_terminators.rs:4:5: 8:6
9
+ switchInt(_1) -> [false: bb1, otherwise: bb2]; // scope 0 at $DIR/multiple_return_terminators.rs:4:5: 8:6
13
10
}
14
11
15
12
bb1: {
16
13
_0 = const (); // scope 0 at $DIR/multiple_return_terminators.rs:6:12: 8:6
17
- goto -> bb3; // scope 0 at $DIR/multiple_return_terminators.rs:4:5: 8:6
14
+ - goto -> bb3; // scope 0 at $DIR/multiple_return_terminators.rs:4:5: 8:6
15
+ + return; // scope 0 at $DIR/multiple_return_terminators.rs:4:5: 8:6
18
16
}
19
17
20
18
bb2: {
21
19
_0 = const (); // scope 0 at $DIR/multiple_return_terminators.rs:4:10: 6:6
22
- goto -> bb3; // scope 0 at $DIR/multiple_return_terminators.rs:4:5: 8:6
23
- }
24
-
25
- bb3: {
26
- StorageDead(_2) ; // scope 0 at $DIR/multiple_return_terminators.rs:9:1 : 9:2
27
- return; // scope 0 at $DIR/multiple_return_terminators.rs:9:2: 9:2
20
+ - goto -> bb3; // scope 0 at $DIR/multiple_return_terminators.rs:4:5: 8:6
21
+ - }
22
+ -
23
+ - bb3: {
24
+ - return ; // scope 0 at $DIR/multiple_return_terminators.rs:9:2 : 9:2
25
+ + return; // scope 0 at $DIR/multiple_return_terminators.rs:4:5: 8:6
28
26
}
29
27
}
30
28
You can’t perform that action at this time.
0 commit comments