2024-02-07 17:09:31 -06:00
|
|
|
// MIR for `opt1` after SimplifyCfg-initial
|
|
|
|
|
|
|
|
fn opt1(_1: &Result<u32, Void>) -> &u32 {
|
|
|
|
debug res => _1;
|
|
|
|
let mut _0: &u32;
|
|
|
|
let mut _2: isize;
|
|
|
|
let _3: &u32;
|
|
|
|
let mut _4: !;
|
|
|
|
let mut _5: ();
|
|
|
|
scope 1 {
|
|
|
|
debug x => _3;
|
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
|
|
|
PlaceMention(_1);
|
2024-07-27 04:08:16 -05:00
|
|
|
falseEdge -> [real: bb4, imaginary: bb1];
|
2024-02-07 17:09:31 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2024-07-27 04:08:16 -05:00
|
|
|
_2 = discriminant((*_1));
|
|
|
|
switchInt(move _2) -> [1: bb3, otherwise: bb2];
|
2024-02-07 17:09:31 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2024-07-27 04:08:16 -05:00
|
|
|
FakeRead(ForMatchedPlace(None), _1);
|
|
|
|
unreachable;
|
2024-02-07 17:09:31 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb3: {
|
2024-02-19 21:07:50 -06:00
|
|
|
FakeRead(ForMatchedPlace(None), (((*_1) as Err).0: Void));
|
|
|
|
unreachable;
|
2024-02-07 17:09:31 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb4: {
|
|
|
|
StorageLive(_3);
|
|
|
|
_3 = &(((*_1) as Ok).0: u32);
|
|
|
|
_0 = &(*_3);
|
|
|
|
StorageDead(_3);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|