rust/tests/mir-opt/match_test.main.SimplifyCfg-initial.after.mir

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

107 lines
2.0 KiB
Rust
Raw Normal View History

2020-04-02 16:09:01 -05:00
// MIR for `main` after SimplifyCfg-initial
fn main() -> () {
2023-06-06 08:47:00 -05:00
let mut _0: ();
let _1: i32;
let _3: i32;
let mut _4: bool;
let mut _5: bool;
let mut _6: bool;
let mut _7: bool;
let mut _8: &i32;
let mut _9: bool;
2020-04-02 16:09:01 -05:00
scope 1 {
2023-06-06 08:47:00 -05:00
debug x => _1;
let _2: bool;
2020-04-02 16:09:01 -05:00
scope 2 {
2023-06-06 08:47:00 -05:00
debug b => _2;
2020-04-02 16:09:01 -05:00
}
}
bb0: {
2023-06-06 08:47:00 -05:00
StorageLive(_1);
_1 = const 3_i32;
FakeRead(ForLet(None), _1);
StorageLive(_2);
_2 = const true;
FakeRead(ForLet(None), _2);
StorageLive(_3);
PlaceMention(_1);
2023-06-06 08:47:00 -05:00
_6 = Le(const 0_i32, _1);
switchInt(move _6) -> [0: bb3, otherwise: bb8];
2020-04-02 16:09:01 -05:00
}
bb1: {
2024-02-11 21:56:03 -06:00
_3 = const 3_i32;
goto -> bb14;
2020-04-02 16:09:01 -05:00
}
bb2: {
2024-02-11 21:56:03 -06:00
falseEdge -> [real: bb9, imaginary: bb4];
2020-04-02 16:09:01 -05:00
}
bb3: {
_4 = Le(const 10_i32, _1);
switchInt(move _4) -> [0: bb5, otherwise: bb7];
2020-04-02 16:09:01 -05:00
}
bb4: {
falseEdge -> [real: bb12, imaginary: bb6];
2020-04-02 16:09:01 -05:00
}
bb5: {
2024-02-11 21:56:03 -06:00
switchInt(_1) -> [4294967295: bb6, otherwise: bb1];
2020-04-02 16:09:01 -05:00
}
bb6: {
2024-02-11 21:56:03 -06:00
falseEdge -> [real: bb13, imaginary: bb1];
2020-04-02 16:09:01 -05:00
}
bb7: {
_5 = Le(_1, const 20_i32);
switchInt(move _5) -> [0: bb5, otherwise: bb4];
2020-04-02 16:09:01 -05:00
}
bb8: {
_7 = Lt(_1, const 10_i32);
2024-02-11 21:56:03 -06:00
switchInt(move _7) -> [0: bb3, otherwise: bb2];
2020-04-02 16:09:01 -05:00
}
bb9: {
2023-11-08 11:38:30 -06:00
_8 = &fake _1;
2023-06-06 08:47:00 -05:00
StorageLive(_9);
_9 = _2;
switchInt(move _9) -> [0: bb11, otherwise: bb10];
2020-04-02 16:09:01 -05:00
}
bb10: {
2023-06-06 08:47:00 -05:00
StorageDead(_9);
FakeRead(ForMatchGuard, _8);
_3 = const 0_i32;
goto -> bb14;
2020-04-02 16:09:01 -05:00
}
bb11: {
2023-06-06 08:47:00 -05:00
StorageDead(_9);
2024-02-11 21:56:03 -06:00
falseEdge -> [real: bb1, imaginary: bb4];
2020-04-02 16:09:01 -05:00
}
bb12: {
2023-06-06 08:47:00 -05:00
_3 = const 1_i32;
goto -> bb14;
2020-04-02 16:09:01 -05:00
}
bb13: {
2023-06-06 08:47:00 -05:00
_3 = const 2_i32;
goto -> bb14;
2020-04-02 16:09:01 -05:00
}
bb14: {
2023-06-06 08:47:00 -05:00
StorageDead(_3);
_0 = const ();
StorageDead(_2);
StorageDead(_1);
return;
2020-04-02 16:09:01 -05:00
}
}