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