|
| 1 | +- // MIR for `opt3` before EarlyOtherwiseBranch |
| 2 | ++ // MIR for `opt3` after EarlyOtherwiseBranch |
| 3 | + |
| 4 | + fn opt3(_1: Option<u32>, _2: Option<bool>) -> u32 { |
| 5 | + debug x => _1; // in scope 0 at $DIR/early_otherwise_branch.rs:21:9: 21:10 |
| 6 | + debug y => _2; // in scope 0 at $DIR/early_otherwise_branch.rs:21:25: 21:26 |
| 7 | + let mut _0: u32; // return place in scope 0 at $DIR/early_otherwise_branch.rs:21:45: 21:48 |
| 8 | + let mut _3: (std::option::Option<u32>, std::option::Option<bool>); // in scope 0 at $DIR/early_otherwise_branch.rs:22:11: 22:17 |
| 9 | + let mut _4: std::option::Option<u32>; // in scope 0 at $DIR/early_otherwise_branch.rs:22:12: 22:13 |
| 10 | + let mut _5: std::option::Option<bool>; // in scope 0 at $DIR/early_otherwise_branch.rs:22:15: 22:16 |
| 11 | + let mut _6: isize; // in scope 0 at $DIR/early_otherwise_branch.rs:23:19: 23:26 |
| 12 | + let mut _7: isize; // in scope 0 at $DIR/early_otherwise_branch.rs:23:10: 23:17 |
| 13 | + let _8: u32; // in scope 0 at $DIR/early_otherwise_branch.rs:23:15: 23:16 |
| 14 | + let _9: bool; // in scope 0 at $DIR/early_otherwise_branch.rs:23:24: 23:25 |
| 15 | ++ let mut _10: isize; // in scope 0 at $DIR/early_otherwise_branch.rs:22:5: 22:17 |
| 16 | ++ let mut _11: bool; // in scope 0 at $DIR/early_otherwise_branch.rs:22:5: 22:17 |
| 17 | + scope 1 { |
| 18 | + debug a => _8; // in scope 1 at $DIR/early_otherwise_branch.rs:23:15: 23:16 |
| 19 | + debug b => _9; // in scope 1 at $DIR/early_otherwise_branch.rs:23:24: 23:25 |
| 20 | + } |
| 21 | + |
| 22 | + bb0: { |
| 23 | + StorageLive(_3); // scope 0 at $DIR/early_otherwise_branch.rs:22:11: 22:17 |
| 24 | + StorageLive(_4); // scope 0 at $DIR/early_otherwise_branch.rs:22:12: 22:13 |
| 25 | + _4 = _1; // scope 0 at $DIR/early_otherwise_branch.rs:22:12: 22:13 |
| 26 | + StorageLive(_5); // scope 0 at $DIR/early_otherwise_branch.rs:22:15: 22:16 |
| 27 | + _5 = _2; // scope 0 at $DIR/early_otherwise_branch.rs:22:15: 22:16 |
| 28 | + (_3.0: std::option::Option<u32>) = move _4; // scope 0 at $DIR/early_otherwise_branch.rs:22:11: 22:17 |
| 29 | + (_3.1: std::option::Option<bool>) = move _5; // scope 0 at $DIR/early_otherwise_branch.rs:22:11: 22:17 |
| 30 | + StorageDead(_5); // scope 0 at $DIR/early_otherwise_branch.rs:22:16: 22:17 |
| 31 | + StorageDead(_4); // scope 0 at $DIR/early_otherwise_branch.rs:22:16: 22:17 |
| 32 | + _7 = discriminant((_3.0: std::option::Option<u32>)); // scope 0 at $DIR/early_otherwise_branch.rs:22:11: 22:17 |
| 33 | +- switchInt(move _7) -> [1_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/early_otherwise_branch.rs:22:5: 22:17 |
| 34 | ++ StorageLive(_10); // scope 0 at $DIR/early_otherwise_branch.rs:22:5: 22:17 |
| 35 | ++ _10 = discriminant((_3.1: std::option::Option<bool>)); // scope 0 at $DIR/early_otherwise_branch.rs:22:5: 22:17 |
| 36 | ++ StorageLive(_11); // scope 0 at $DIR/early_otherwise_branch.rs:22:5: 22:17 |
| 37 | ++ _11 = Ne(_7, move _10); // scope 0 at $DIR/early_otherwise_branch.rs:22:5: 22:17 |
| 38 | ++ StorageDead(_10); // scope 0 at $DIR/early_otherwise_branch.rs:22:5: 22:17 |
| 39 | ++ switchInt(move _11) -> [false: bb4, otherwise: bb1]; // scope 0 at $DIR/early_otherwise_branch.rs:22:5: 22:17 |
| 40 | + } |
| 41 | + |
| 42 | + bb1: { |
| 43 | ++ StorageDead(_11); // scope 0 at $DIR/early_otherwise_branch.rs:24:14: 24:15 |
| 44 | + _0 = const 1_u32; // scope 0 at $DIR/early_otherwise_branch.rs:24:14: 24:15 |
| 45 | +- goto -> bb4; // scope 0 at $DIR/early_otherwise_branch.rs:24:14: 24:15 |
| 46 | ++ goto -> bb3; // scope 0 at $DIR/early_otherwise_branch.rs:24:14: 24:15 |
| 47 | + } |
| 48 | + |
| 49 | + bb2: { |
| 50 | +- _6 = discriminant((_3.1: std::option::Option<bool>)); // scope 0 at $DIR/early_otherwise_branch.rs:22:11: 22:17 |
| 51 | +- switchInt(move _6) -> [1_isize: bb3, otherwise: bb1]; // scope 0 at $DIR/early_otherwise_branch.rs:22:5: 22:17 |
| 52 | +- } |
| 53 | +- |
| 54 | +- bb3: { |
| 55 | + StorageLive(_8); // scope 0 at $DIR/early_otherwise_branch.rs:23:15: 23:16 |
| 56 | + _8 = (((_3.0: std::option::Option<u32>) as Some).0: u32); // scope 0 at $DIR/early_otherwise_branch.rs:23:15: 23:16 |
| 57 | + StorageLive(_9); // scope 0 at $DIR/early_otherwise_branch.rs:23:24: 23:25 |
| 58 | + _9 = (((_3.1: std::option::Option<bool>) as Some).0: bool); // scope 0 at $DIR/early_otherwise_branch.rs:23:24: 23:25 |
| 59 | + _0 = const 0_u32; // scope 1 at $DIR/early_otherwise_branch.rs:23:31: 23:32 |
| 60 | + StorageDead(_9); // scope 0 at $DIR/early_otherwise_branch.rs:23:31: 23:32 |
| 61 | + StorageDead(_8); // scope 0 at $DIR/early_otherwise_branch.rs:23:31: 23:32 |
| 62 | +- goto -> bb4; // scope 0 at $DIR/early_otherwise_branch.rs:23:31: 23:32 |
| 63 | ++ goto -> bb3; // scope 0 at $DIR/early_otherwise_branch.rs:23:31: 23:32 |
| 64 | + } |
| 65 | + |
| 66 | +- bb4: { |
| 67 | ++ bb3: { |
| 68 | + StorageDead(_3); // scope 0 at $DIR/early_otherwise_branch.rs:26:1: 26:2 |
| 69 | + return; // scope 0 at $DIR/early_otherwise_branch.rs:26:2: 26:2 |
| 70 | ++ } |
| 71 | ++ |
| 72 | ++ bb4: { |
| 73 | ++ StorageDead(_11); // scope 0 at $DIR/early_otherwise_branch.rs:22:5: 22:17 |
| 74 | ++ switchInt(_7) -> [1_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/early_otherwise_branch.rs:22:5: 22:17 |
| 75 | + } |
| 76 | + } |
| 77 | + |
0 commit comments