rust/tests/mir-opt/loop_test.main.SimplifyCfg-promote-consts.after.mir

53 lines
903 B
Rust
Raw Normal View History

2020-08-16 03:44:53 -05:00
// MIR for `main` after SimplifyCfg-promote-consts
2020-04-02 16:09:01 -05:00
fn main() -> () {
2023-06-06 08:47:00 -05:00
let mut _0: ();
let _1: ();
let mut _2: bool;
let mut _3: !;
let mut _4: !;
let mut _5: ();
let _6: i32;
2020-04-02 16:09:01 -05:00
scope 1 {
2023-06-06 08:47:00 -05:00
debug x => _6;
2020-04-02 16:09:01 -05:00
}
bb0: {
2023-06-06 08:47:00 -05:00
StorageLive(_1);
StorageLive(_2);
_2 = const true;
switchInt(move _2) -> [0: bb2, otherwise: bb1];
2020-04-02 16:09:01 -05:00
}
2020-10-02 15:11:24 -05:00
bb1: {
2023-06-06 08:47:00 -05:00
_0 = const ();
StorageDead(_2);
StorageDead(_1);
return;
2020-04-02 16:09:01 -05:00
}
bb2: {
2023-06-06 08:47:00 -05:00
_1 = const ();
StorageDead(_2);
StorageDead(_1);
StorageLive(_4);
goto -> bb3;
2020-04-02 16:09:01 -05:00
}
2020-10-02 15:11:24 -05:00
bb3: {
2023-06-06 08:47:00 -05:00
falseUnwind -> [real: bb4, unwind: bb5];
2020-04-02 16:09:01 -05:00
}
2020-10-02 15:11:24 -05:00
bb4: {
2023-06-06 08:47:00 -05:00
StorageLive(_6);
_6 = const 1_i32;
FakeRead(ForLet(None), _6);
StorageDead(_6);
goto -> bb3;
2020-10-02 15:11:24 -05:00
}
2021-01-01 12:38:11 -06:00
bb5 (cleanup): {
2023-06-06 08:47:00 -05:00
resume;
2020-04-02 16:09:01 -05:00
}
}