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);
FakeRead(ForMatchedPlace(None), _1);
_6 = Le(const 0_i32, _1);
switchInt(move _6) -> [0: bb4, otherwise: bb1];
2020-04-02 16:09:01 -05:00
}
bb1: {
2023-06-06 08:47:00 -05:00
_7 = Lt(_1, const 10_i32);
switchInt(move _7) -> [0: bb4, otherwise: bb2];
2020-04-02 16:09:01 -05:00
}
bb2: {
2023-06-06 08:47:00 -05:00
falseEdge -> [real: bb9, imaginary: bb6];
2020-04-02 16:09:01 -05:00
}
bb3: {
2023-06-06 08:47:00 -05:00
_3 = const 3_i32;
goto -> bb14;
2020-04-02 16:09:01 -05:00
}
bb4: {
2023-06-06 08:47:00 -05:00
_4 = Le(const 10_i32, _1);
switchInt(move _4) -> [0: bb7, otherwise: bb5];
2020-04-02 16:09:01 -05:00
}
bb5: {
2023-06-06 08:47:00 -05:00
_5 = Le(_1, const 20_i32);
switchInt(move _5) -> [0: bb7, otherwise: bb6];
2020-04-02 16:09:01 -05:00
}
bb6: {
2023-06-06 08:47:00 -05:00
falseEdge -> [real: bb12, imaginary: bb8];
2020-04-02 16:09:01 -05:00
}
bb7: {
2023-06-06 08:47:00 -05:00
switchInt(_1) -> [4294967295: bb8, otherwise: bb3];
2020-04-02 16:09:01 -05:00
}
bb8: {
2023-06-06 08:47:00 -05:00
falseEdge -> [real: bb13, imaginary: bb3];
2020-04-02 16:09:01 -05:00
}
bb9: {
2023-06-06 08:47:00 -05:00
_8 = &shallow _1;
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);
falseEdge -> [real: bb3, imaginary: bb6];
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
}
}