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