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