2020-08-01 18:47:52 -05:00
|
|
|
- // MIR for `opt1` before EarlyOtherwiseBranch
|
|
|
|
+ // MIR for `opt1` after EarlyOtherwiseBranch
|
|
|
|
|
2020-09-19 16:50:51 -05:00
|
|
|
fn opt1(_1: Option<u32>, _2: Option<u32>, _3: Option<u32>) -> u32 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug x => _1;
|
|
|
|
debug y => _2;
|
|
|
|
debug z => _3;
|
|
|
|
let mut _0: u32;
|
|
|
|
let mut _4: (std::option::Option<u32>, std::option::Option<u32>, std::option::Option<u32>);
|
|
|
|
let mut _5: std::option::Option<u32>;
|
|
|
|
let mut _6: std::option::Option<u32>;
|
|
|
|
let mut _7: std::option::Option<u32>;
|
|
|
|
let mut _8: isize;
|
|
|
|
let mut _9: isize;
|
|
|
|
let mut _10: isize;
|
|
|
|
let _11: u32;
|
|
|
|
let _12: u32;
|
|
|
|
let _13: u32;
|
|
|
|
+ let mut _14: isize;
|
|
|
|
+ let mut _15: bool;
|
|
|
|
+ let mut _16: isize;
|
|
|
|
+ let mut _17: bool;
|
2020-08-01 18:47:52 -05:00
|
|
|
scope 1 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug a => _11;
|
|
|
|
debug b => _12;
|
|
|
|
debug c => _13;
|
2020-08-01 18:47:52 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_4);
|
|
|
|
StorageLive(_5);
|
|
|
|
_5 = _1;
|
|
|
|
StorageLive(_6);
|
|
|
|
_6 = _2;
|
|
|
|
StorageLive(_7);
|
|
|
|
_7 = _3;
|
|
|
|
_4 = (move _5, move _6, move _7);
|
|
|
|
StorageDead(_7);
|
|
|
|
StorageDead(_6);
|
|
|
|
StorageDead(_5);
|
|
|
|
_10 = discriminant((_4.0: std::option::Option<u32>));
|
|
|
|
- switchInt(move _10) -> [1: bb2, otherwise: bb1];
|
|
|
|
+ StorageLive(_14);
|
|
|
|
+ _14 = discriminant((_4.1: std::option::Option<u32>));
|
|
|
|
+ StorageLive(_15);
|
|
|
|
+ _15 = Ne(_10, move _14);
|
|
|
|
+ StorageDead(_14);
|
|
|
|
+ switchInt(move _15) -> [0: bb5, otherwise: bb1];
|
2020-08-01 18:47:52 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2023-06-06 08:47:00 -05:00
|
|
|
+ StorageDead(_17);
|
|
|
|
+ StorageDead(_15);
|
|
|
|
_0 = const 1_u32;
|
|
|
|
- goto -> bb5;
|
|
|
|
+ goto -> bb4;
|
2020-08-01 18:47:52 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2023-06-06 08:47:00 -05:00
|
|
|
- _9 = discriminant((_4.1: std::option::Option<u32>));
|
|
|
|
- switchInt(move _9) -> [1: bb3, otherwise: bb1];
|
2020-09-19 18:18:05 -05:00
|
|
|
- }
|
|
|
|
-
|
|
|
|
- bb3: {
|
2023-06-06 08:47:00 -05:00
|
|
|
_8 = discriminant((_4.2: std::option::Option<u32>));
|
|
|
|
- switchInt(move _8) -> [1: bb4, otherwise: bb1];
|
|
|
|
+ switchInt(move _8) -> [1: bb3, otherwise: bb1];
|
2020-08-01 18:47:52 -05:00
|
|
|
}
|
|
|
|
|
2020-09-19 18:18:05 -05:00
|
|
|
- bb4: {
|
|
|
|
+ bb3: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_13);
|
|
|
|
_13 = (((_4.2: std::option::Option<u32>) as Some).0: u32);
|
2024-01-21 16:36:33 -06:00
|
|
|
StorageLive(_12);
|
|
|
|
_12 = (((_4.1: std::option::Option<u32>) as Some).0: u32);
|
|
|
|
StorageLive(_11);
|
|
|
|
_11 = (((_4.0: std::option::Option<u32>) as Some).0: u32);
|
2023-06-06 08:47:00 -05:00
|
|
|
_0 = const 0_u32;
|
|
|
|
StorageDead(_11);
|
2024-01-21 16:36:33 -06:00
|
|
|
StorageDead(_12);
|
|
|
|
StorageDead(_13);
|
2023-06-06 08:47:00 -05:00
|
|
|
- goto -> bb5;
|
|
|
|
+ goto -> bb4;
|
2020-08-01 18:47:52 -05:00
|
|
|
}
|
|
|
|
|
2020-09-19 18:18:05 -05:00
|
|
|
- bb5: {
|
|
|
|
+ bb4: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_4);
|
|
|
|
return;
|
2022-04-27 17:03:07 -05:00
|
|
|
+ }
|
|
|
|
+
|
2020-09-19 18:18:05 -05:00
|
|
|
+ bb5: {
|
2023-06-06 08:47:00 -05:00
|
|
|
+ StorageDead(_15);
|
|
|
|
+ switchInt(_10) -> [1: bb2, otherwise: bb1];
|
2020-08-01 18:47:52 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|