rust/tests/mir-opt/read_from_trivial_switch.main.SimplifyCfg-initial.diff

49 lines
938 B
Diff

- // MIR for `main` before SimplifyCfg-initial
+ // MIR for `main` after SimplifyCfg-initial
fn main() -> () {
let mut _0: ();
let _1: &i32;
let _2: i32;
scope 1 {
debug ref_ => _1;
scope 2 {
}
}
bb0: {
StorageLive(_1);
StorageLive(_2);
_2 = const 1_i32;
_1 = &_2;
FakeRead(ForLet(None), _1);
PlaceMention(_1);
- switchInt(copy (*_1)) -> [0: bb2, otherwise: bb1];
+ switchInt(copy (*_1)) -> [0: bb1, otherwise: bb1];
}
bb1: {
- goto -> bb5;
- }
-
- bb2: {
- goto -> bb5;
- }
-
- bb3: {
- goto -> bb1;
- }
-
- bb4: {
- FakeRead(ForMatchedPlace(None), _1);
- unreachable;
- }
-
- bb5: {
_0 = const ();
StorageDead(_2);
StorageDead(_1);
return;
}
}