|
| 1 | +- // MIR for `cleanup` before EarlyOtherwiseBranch |
| 2 | ++ // MIR for `cleanup` after EarlyOtherwiseBranch |
| 3 | + |
| 4 | + fn cleanup(_1: Option<Option<Option<T>>>) -> () { |
| 5 | + debug val => _1; |
| 6 | + let mut _0: (); |
| 7 | + let mut _2: isize; |
| 8 | + let mut _3: isize; |
| 9 | + let mut _4: isize; |
| 10 | + let _5: T; |
| 11 | + let mut _6: bool; |
| 12 | + let mut _7: bool; |
| 13 | + let mut _8: isize; |
| 14 | ++ let mut _9: bool; |
| 15 | + scope 1 { |
| 16 | + debug _v => _5; |
| 17 | + } |
| 18 | + |
| 19 | + bb0: { |
| 20 | + _6 = const false; |
| 21 | + _7 = const false; |
| 22 | + _6 = const true; |
| 23 | + _7 = const true; |
| 24 | + _4 = discriminant(_1); |
| 25 | + switchInt(copy _4) -> [0: bb4, 1: bb2, otherwise: bb1]; |
| 26 | + } |
| 27 | + |
| 28 | + bb1: { |
| 29 | + unreachable; |
| 30 | + } |
| 31 | + |
| 32 | + bb2: { |
| 33 | + _3 = discriminant(((_1 as Some).0: std::option::Option<std::option::Option<T>>)); |
| 34 | + switchInt(copy _3) -> [0: bb5, 1: bb3, otherwise: bb1]; |
| 35 | + } |
| 36 | + |
| 37 | + bb3: { |
| 38 | + _2 = discriminant(((((_1 as Some).0: std::option::Option<std::option::Option<T>>) as Some).0: std::option::Option<T>)); |
| 39 | + switchInt(copy _2) -> [0: bb6, 1: bb7, otherwise: bb1]; |
| 40 | + } |
| 41 | + |
| 42 | + bb4: { |
| 43 | + _0 = const (); |
| 44 | +- goto -> bb17; |
| 45 | ++ goto -> bb15; |
| 46 | + } |
| 47 | + |
| 48 | + bb5: { |
| 49 | + _0 = const (); |
| 50 | +- goto -> bb17; |
| 51 | ++ goto -> bb15; |
| 52 | + } |
| 53 | + |
| 54 | + bb6: { |
| 55 | + _0 = const (); |
| 56 | +- goto -> bb17; |
| 57 | ++ goto -> bb15; |
| 58 | + } |
| 59 | + |
| 60 | + bb7: { |
| 61 | + StorageLive(_5); |
| 62 | + _5 = move ((((((_1 as Some).0: std::option::Option<std::option::Option<T>>) as Some).0: std::option::Option<T>) as Some).0: T); |
| 63 | + _0 = const (); |
| 64 | +- drop(_5) -> [return: bb8, unwind: bb20]; |
| 65 | ++ drop(_5) -> [return: bb8, unwind: bb16]; |
| 66 | + } |
| 67 | + |
| 68 | + bb8: { |
| 69 | + StorageDead(_5); |
| 70 | +- goto -> bb17; |
| 71 | ++ goto -> bb15; |
| 72 | + } |
| 73 | + |
| 74 | + bb9 (cleanup): { |
| 75 | ++ StorageDead(_9); |
| 76 | + resume; |
| 77 | + } |
| 78 | + |
| 79 | + bb10: { |
| 80 | + return; |
| 81 | + } |
| 82 | + |
| 83 | + bb11: { |
| 84 | +- switchInt(copy _6) -> [0: bb12, otherwise: bb16]; |
| 85 | ++ switchInt(copy _6) -> [0: bb12, otherwise: bb14]; |
| 86 | + } |
| 87 | + |
| 88 | + bb12: { |
| 89 | + _6 = const false; |
| 90 | + goto -> bb10; |
| 91 | + } |
| 92 | + |
| 93 | + bb13: { |
| 94 | +- switchInt(copy _7) -> [0: bb14, otherwise: bb15]; |
| 95 | +- } |
| 96 | +- |
| 97 | +- bb14: { |
| 98 | + _7 = const false; |
| 99 | + goto -> bb12; |
| 100 | + } |
| 101 | + |
| 102 | +- bb15: { |
| 103 | +- goto -> bb14; |
| 104 | +- } |
| 105 | +- |
| 106 | +- bb16: { |
| 107 | ++ bb14: { |
| 108 | + _8 = discriminant(((_1 as Some).0: std::option::Option<std::option::Option<T>>)); |
| 109 | + switchInt(move _8) -> [1: bb13, otherwise: bb12]; |
| 110 | + } |
| 111 | + |
| 112 | +- bb17: { |
| 113 | ++ bb15: { |
| 114 | + switchInt(copy _4) -> [1: bb11, otherwise: bb10]; |
| 115 | + } |
| 116 | + |
| 117 | +- bb18 (cleanup): { |
| 118 | +- switchInt(copy _3) -> [1: bb19, otherwise: bb9]; |
| 119 | ++ bb16 (cleanup): { |
| 120 | ++ StorageLive(_9); |
| 121 | ++ _9 = Ne(copy _4, copy _3); |
| 122 | ++ switchInt(move _9) -> [0: bb17, otherwise: bb9]; |
| 123 | + } |
| 124 | + |
| 125 | +- bb19 (cleanup): { |
| 126 | ++ bb17 (cleanup): { |
| 127 | ++ StorageDead(_9); |
| 128 | + goto -> bb9; |
| 129 | +- } |
| 130 | +- |
| 131 | +- bb20 (cleanup): { |
| 132 | +- switchInt(copy _4) -> [1: bb18, otherwise: bb9]; |
| 133 | + } |
| 134 | + } |
| 135 | + |
0 commit comments