mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
98 lines
2.6 KiB
Diff
98 lines
2.6 KiB
Diff
- // MIR for `opt1` before EarlyOtherwiseBranch
|
|
+ // MIR for `opt1` after EarlyOtherwiseBranch
|
|
|
|
fn opt1(_1: Option<u32>, _2: Option<u32>, _3: Option<u32>) -> u32 {
|
|
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;
|
|
scope 1 {
|
|
debug a => _11;
|
|
debug b => _12;
|
|
debug c => _13;
|
|
}
|
|
|
|
bb0: {
|
|
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];
|
|
}
|
|
|
|
bb1: {
|
|
+ StorageDead(_17);
|
|
+ StorageDead(_15);
|
|
_0 = const 1_u32;
|
|
- goto -> bb5;
|
|
+ goto -> bb4;
|
|
}
|
|
|
|
bb2: {
|
|
- _9 = discriminant((_4.1: std::option::Option<u32>));
|
|
- switchInt(move _9) -> [1: bb3, otherwise: bb1];
|
|
- }
|
|
-
|
|
- bb3: {
|
|
_8 = discriminant((_4.2: std::option::Option<u32>));
|
|
- switchInt(move _8) -> [1: bb4, otherwise: bb1];
|
|
+ switchInt(move _8) -> [1: bb3, otherwise: bb1];
|
|
}
|
|
|
|
- bb4: {
|
|
+ bb3: {
|
|
StorageLive(_11);
|
|
_11 = (((_4.0: std::option::Option<u32>) as Some).0: u32);
|
|
StorageLive(_12);
|
|
_12 = (((_4.1: std::option::Option<u32>) as Some).0: u32);
|
|
StorageLive(_13);
|
|
_13 = (((_4.2: std::option::Option<u32>) as Some).0: u32);
|
|
_0 = const 0_u32;
|
|
StorageDead(_13);
|
|
StorageDead(_12);
|
|
StorageDead(_11);
|
|
- goto -> bb5;
|
|
+ goto -> bb4;
|
|
}
|
|
|
|
- bb5: {
|
|
+ bb4: {
|
|
StorageDead(_4);
|
|
return;
|
|
+ }
|
|
+
|
|
+ bb5: {
|
|
+ StorageDead(_15);
|
|
+ switchInt(_10) -> [1: bb2, otherwise: bb1];
|
|
}
|
|
}
|
|
|