2020-08-01 18:47:52 -05:00
|
|
|
- // MIR for `opt1` before EarlyOtherwiseBranch
|
|
|
|
+ // MIR for `opt1` after EarlyOtherwiseBranch
|
|
|
|
|
2020-09-19 16:50:51 -05:00
|
|
|
fn opt1(_1: Option<u32>, _2: Option<u32>) -> u32 {
|
|
|
|
debug x => _1; // in scope 0 at $DIR/early_otherwise_branch.rs:3:9: 3:10
|
|
|
|
debug y => _2; // in scope 0 at $DIR/early_otherwise_branch.rs:3:25: 3:26
|
|
|
|
let mut _0: u32; // return place in scope 0 at $DIR/early_otherwise_branch.rs:3:44: 3:47
|
|
|
|
let mut _3: (std::option::Option<u32>, std::option::Option<u32>); // in scope 0 at $DIR/early_otherwise_branch.rs:4:11: 4:17
|
|
|
|
let mut _4: std::option::Option<u32>; // in scope 0 at $DIR/early_otherwise_branch.rs:4:12: 4:13
|
|
|
|
let mut _5: std::option::Option<u32>; // in scope 0 at $DIR/early_otherwise_branch.rs:4:15: 4:16
|
|
|
|
let mut _6: isize; // in scope 0 at $DIR/early_otherwise_branch.rs:5:19: 5:26
|
|
|
|
let mut _7: isize; // in scope 0 at $DIR/early_otherwise_branch.rs:5:10: 5:17
|
|
|
|
let _8: u32; // in scope 0 at $DIR/early_otherwise_branch.rs:5:15: 5:16
|
|
|
|
let _9: u32; // in scope 0 at $DIR/early_otherwise_branch.rs:5:24: 5:25
|
2021-12-12 15:53:15 -06:00
|
|
|
+ let mut _10: isize; // in scope 0 at $DIR/early_otherwise_branch.rs:4:5: 4:17
|
|
|
|
+ let mut _11: bool; // in scope 0 at $DIR/early_otherwise_branch.rs:4:5: 4:17
|
2020-08-01 18:47:52 -05:00
|
|
|
scope 1 {
|
2020-09-19 16:50:51 -05:00
|
|
|
debug a => _8; // in scope 1 at $DIR/early_otherwise_branch.rs:5:15: 5:16
|
|
|
|
debug b => _9; // in scope 1 at $DIR/early_otherwise_branch.rs:5:24: 5:25
|
2020-08-01 18:47:52 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2020-09-19 16:50:51 -05:00
|
|
|
StorageLive(_3); // scope 0 at $DIR/early_otherwise_branch.rs:4:11: 4:17
|
|
|
|
StorageLive(_4); // scope 0 at $DIR/early_otherwise_branch.rs:4:12: 4:13
|
|
|
|
_4 = _1; // scope 0 at $DIR/early_otherwise_branch.rs:4:12: 4:13
|
|
|
|
StorageLive(_5); // scope 0 at $DIR/early_otherwise_branch.rs:4:15: 4:16
|
|
|
|
_5 = _2; // scope 0 at $DIR/early_otherwise_branch.rs:4:15: 4:16
|
2022-04-05 18:02:57 -05:00
|
|
|
Deinit(_3); // scope 0 at $DIR/early_otherwise_branch.rs:4:11: 4:17
|
2020-09-19 16:50:51 -05:00
|
|
|
(_3.0: std::option::Option<u32>) = move _4; // scope 0 at $DIR/early_otherwise_branch.rs:4:11: 4:17
|
|
|
|
(_3.1: std::option::Option<u32>) = move _5; // scope 0 at $DIR/early_otherwise_branch.rs:4:11: 4:17
|
|
|
|
StorageDead(_5); // scope 0 at $DIR/early_otherwise_branch.rs:4:16: 4:17
|
|
|
|
StorageDead(_4); // scope 0 at $DIR/early_otherwise_branch.rs:4:16: 4:17
|
2021-07-23 17:55:36 -05:00
|
|
|
_7 = discriminant((_3.0: std::option::Option<u32>)); // scope 0 at $DIR/early_otherwise_branch.rs:4:11: 4:17
|
|
|
|
- switchInt(move _7) -> [1_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/early_otherwise_branch.rs:4:5: 4:17
|
|
|
|
+ StorageLive(_10); // scope 0 at $DIR/early_otherwise_branch.rs:4:5: 4:17
|
|
|
|
+ _10 = discriminant((_3.1: std::option::Option<u32>)); // scope 0 at $DIR/early_otherwise_branch.rs:4:5: 4:17
|
|
|
|
+ StorageLive(_11); // scope 0 at $DIR/early_otherwise_branch.rs:4:5: 4:17
|
2021-12-12 15:53:15 -06:00
|
|
|
+ _11 = Ne(_7, move _10); // scope 0 at $DIR/early_otherwise_branch.rs:4:5: 4:17
|
2021-07-23 17:55:36 -05:00
|
|
|
+ StorageDead(_10); // scope 0 at $DIR/early_otherwise_branch.rs:4:5: 4:17
|
|
|
|
+ switchInt(move _11) -> [false: bb4, otherwise: bb1]; // scope 0 at $DIR/early_otherwise_branch.rs:4:5: 4:17
|
2020-08-01 18:47:52 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2020-09-19 18:09:18 -05:00
|
|
|
+ StorageDead(_11); // scope 0 at $DIR/early_otherwise_branch.rs:6:14: 6:15
|
2020-09-19 16:50:51 -05:00
|
|
|
_0 = const 1_u32; // scope 0 at $DIR/early_otherwise_branch.rs:6:14: 6:15
|
2021-07-23 17:55:36 -05:00
|
|
|
- goto -> bb4; // scope 0 at $DIR/early_otherwise_branch.rs:6:14: 6:15
|
|
|
|
+ goto -> bb3; // scope 0 at $DIR/early_otherwise_branch.rs:6:14: 6:15
|
2020-08-01 18:47:52 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2021-07-23 17:55:36 -05:00
|
|
|
- _6 = discriminant((_3.1: std::option::Option<u32>)); // scope 0 at $DIR/early_otherwise_branch.rs:4:11: 4:17
|
|
|
|
- switchInt(move _6) -> [1_isize: bb3, otherwise: bb1]; // scope 0 at $DIR/early_otherwise_branch.rs:4:5: 4:17
|
2020-09-19 18:18:05 -05:00
|
|
|
- }
|
|
|
|
-
|
|
|
|
- bb3: {
|
2020-09-19 16:50:51 -05:00
|
|
|
StorageLive(_8); // scope 0 at $DIR/early_otherwise_branch.rs:5:15: 5:16
|
|
|
|
_8 = (((_3.0: std::option::Option<u32>) as Some).0: u32); // scope 0 at $DIR/early_otherwise_branch.rs:5:15: 5:16
|
|
|
|
StorageLive(_9); // scope 0 at $DIR/early_otherwise_branch.rs:5:24: 5:25
|
|
|
|
_9 = (((_3.1: std::option::Option<u32>) as Some).0: u32); // scope 0 at $DIR/early_otherwise_branch.rs:5:24: 5:25
|
|
|
|
_0 = const 0_u32; // scope 1 at $DIR/early_otherwise_branch.rs:5:31: 5:32
|
|
|
|
StorageDead(_9); // scope 0 at $DIR/early_otherwise_branch.rs:5:31: 5:32
|
|
|
|
StorageDead(_8); // scope 0 at $DIR/early_otherwise_branch.rs:5:31: 5:32
|
2021-07-23 17:55:36 -05:00
|
|
|
- goto -> bb4; // scope 0 at $DIR/early_otherwise_branch.rs:5:31: 5:32
|
|
|
|
+ goto -> bb3; // scope 0 at $DIR/early_otherwise_branch.rs:5:31: 5:32
|
2020-08-01 18:47:52 -05:00
|
|
|
}
|
|
|
|
|
2020-09-19 18:18:05 -05:00
|
|
|
- bb4: {
|
|
|
|
+ bb3: {
|
2020-09-19 16:50:51 -05:00
|
|
|
StorageDead(_3); // scope 0 at $DIR/early_otherwise_branch.rs:8:1: 8:2
|
|
|
|
return; // scope 0 at $DIR/early_otherwise_branch.rs:8:2: 8:2
|
2022-04-13 04:20:46 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
- bb5 (cleanup): {
|
|
|
|
- resume; // scope 0 at $DIR/early_otherwise_branch.rs:3:1: 8:2
|
2020-09-19 18:18:05 -05:00
|
|
|
+ bb4: {
|
2021-12-12 15:53:15 -06:00
|
|
|
+ StorageDead(_11); // scope 0 at $DIR/early_otherwise_branch.rs:4:5: 4:17
|
|
|
|
+ switchInt(_7) -> [1_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/early_otherwise_branch.rs:4:5: 4:17
|
2020-08-01 18:47:52 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|