rust/tests/mir-opt/building/match/simple_match.match_bool.built.after.mir

43 lines
611 B
Rust
Raw Normal View History

// MIR for `match_bool` after built
2020-04-02 21:09:01 +00:00
fn match_bool(_1: bool) -> usize {
2023-06-06 09:47:00 -04:00
debug x => _1;
let mut _0: usize;
2020-04-02 21:09:01 +00:00
bb0: {
PlaceMention(_1);
2024-02-16 02:57:24 +01:00
switchInt(_1) -> [0: bb2, otherwise: bb4];
2020-04-02 21:09:01 +00:00
}
2020-10-02 16:11:24 -04:00
bb1: {
2024-02-12 04:56:03 +01:00
FakeRead(ForMatchedPlace(None), _1);
unreachable;
2020-04-02 21:09:01 +00:00
}
bb2: {
2023-06-06 09:47:00 -04:00
_0 = const 20_usize;
2024-02-16 02:57:24 +01:00
goto -> bb7;
2020-04-02 21:09:01 +00:00
}
2020-10-02 16:11:24 -04:00
bb3: {
2024-02-16 02:57:24 +01:00
goto -> bb1;
}
2020-10-02 16:11:24 -04:00
bb4: {
2024-02-16 02:57:24 +01:00
falseEdge -> [real: bb6, imaginary: bb2];
2024-02-12 04:56:03 +01:00
}
bb5: {
2024-02-16 02:57:24 +01:00
goto -> bb2;
}
bb6: {
_0 = const 10_usize;
goto -> bb7;
}
bb7: {
2023-06-06 09:47:00 -04:00
return;
2020-04-02 21:09:01 +00:00
}
}