| // MIR for `main` after SimplifyCfg-initial |
| |
| fn main() -> () { |
| let mut _0: (); // return place in scope 0 at $DIR/match_test.rs:6:11: 6:11 |
| let _1: i32; // in scope 0 at $DIR/match_test.rs:7:9: 7:10 |
| let _3: i32; // in scope 0 at $DIR/match_test.rs:12:5: 17:6 |
| let mut _4: bool; // in scope 0 at $DIR/match_test.rs:14:9: 14:16 |
| let mut _5: bool; // in scope 0 at $DIR/match_test.rs:14:9: 14:16 |
| let mut _6: bool; // in scope 0 at $DIR/match_test.rs:13:9: 13:14 |
| let mut _7: bool; // in scope 0 at $DIR/match_test.rs:13:9: 13:14 |
| let mut _8: &i32; // in scope 0 at $DIR/match_test.rs:12:11: 12:12 |
| let mut _9: bool; // in scope 0 at $DIR/match_test.rs:13:18: 13:19 |
| scope 1 { |
| debug x => _1; // in scope 1 at $DIR/match_test.rs:7:9: 7:10 |
| let _2: bool; // in scope 1 at $DIR/match_test.rs:8:9: 8:10 |
| scope 2 { |
| debug b => _2; // in scope 2 at $DIR/match_test.rs:8:9: 8:10 |
| } |
| } |
| |
| bb0: { |
| StorageLive(_1); // scope 0 at $DIR/match_test.rs:7:9: 7:10 |
| _1 = const 3_i32; // scope 0 at $DIR/match_test.rs:7:13: 7:14 |
| FakeRead(ForLet(None), _1); // scope 0 at $DIR/match_test.rs:7:9: 7:10 |
| StorageLive(_2); // scope 1 at $DIR/match_test.rs:8:9: 8:10 |
| _2 = const true; // scope 1 at $DIR/match_test.rs:8:13: 8:17 |
| FakeRead(ForLet(None), _2); // scope 1 at $DIR/match_test.rs:8:9: 8:10 |
| StorageLive(_3); // scope 2 at $DIR/match_test.rs:12:5: 17:6 |
| FakeRead(ForMatchedPlace(None), _1); // scope 2 at $DIR/match_test.rs:12:11: 12:12 |
| _6 = Le(const 0_i32, _1); // scope 2 at $DIR/match_test.rs:13:9: 13:14 |
| switchInt(move _6) -> [false: bb4, otherwise: bb1]; // scope 2 at $DIR/match_test.rs:13:9: 13:14 |
| } |
| |
| bb1: { |
| _7 = Lt(_1, const 10_i32); // scope 2 at $DIR/match_test.rs:13:9: 13:14 |
| switchInt(move _7) -> [false: bb4, otherwise: bb2]; // scope 2 at $DIR/match_test.rs:13:9: 13:14 |
| } |
| |
| bb2: { |
| falseEdge -> [real: bb9, imaginary: bb6]; // scope 2 at $DIR/match_test.rs:13:9: 13:14 |
| } |
| |
| bb3: { |
| _3 = const 3_i32; // scope 2 at $DIR/match_test.rs:16:14: 16:15 |
| goto -> bb14; // scope 2 at $DIR/match_test.rs:16:14: 16:15 |
| } |
| |
| bb4: { |
| _4 = Le(const 10_i32, _1); // scope 2 at $DIR/match_test.rs:14:9: 14:16 |
| switchInt(move _4) -> [false: bb7, otherwise: bb5]; // scope 2 at $DIR/match_test.rs:14:9: 14:16 |
| } |
| |
| bb5: { |
| _5 = Le(_1, const 20_i32); // scope 2 at $DIR/match_test.rs:14:9: 14:16 |
| switchInt(move _5) -> [false: bb7, otherwise: bb6]; // scope 2 at $DIR/match_test.rs:14:9: 14:16 |
| } |
| |
| bb6: { |
| falseEdge -> [real: bb12, imaginary: bb8]; // scope 2 at $DIR/match_test.rs:14:9: 14:16 |
| } |
| |
| bb7: { |
| switchInt(_1) -> [-1_i32: bb8, otherwise: bb3]; // scope 2 at $DIR/match_test.rs:12:5: 12:12 |
| } |
| |
| bb8: { |
| falseEdge -> [real: bb13, imaginary: bb3]; // scope 2 at $DIR/match_test.rs:15:9: 15:11 |
| } |
| |
| bb9: { |
| _8 = &shallow _1; // scope 2 at $DIR/match_test.rs:12:11: 12:12 |
| StorageLive(_9); // scope 2 at $DIR/match_test.rs:13:18: 13:19 |
| _9 = _2; // scope 2 at $DIR/match_test.rs:13:18: 13:19 |
| switchInt(move _9) -> [false: bb11, otherwise: bb10]; // scope 2 at $DIR/match_test.rs:13:18: 13:19 |
| } |
| |
| bb10: { |
| StorageDead(_9); // scope 2 at $DIR/match_test.rs:13:18: 13:19 |
| FakeRead(ForMatchGuard, _8); // scope 2 at $DIR/match_test.rs:13:18: 13:19 |
| _3 = const 0_i32; // scope 2 at $DIR/match_test.rs:13:23: 13:24 |
| goto -> bb14; // scope 2 at $DIR/match_test.rs:13:23: 13:24 |
| } |
| |
| bb11: { |
| StorageDead(_9); // scope 2 at $DIR/match_test.rs:13:18: 13:19 |
| falseEdge -> [real: bb3, imaginary: bb6]; // scope 2 at $DIR/match_test.rs:13:18: 13:19 |
| } |
| |
| bb12: { |
| _3 = const 1_i32; // scope 2 at $DIR/match_test.rs:14:20: 14:21 |
| goto -> bb14; // scope 2 at $DIR/match_test.rs:14:20: 14:21 |
| } |
| |
| bb13: { |
| _3 = const 2_i32; // scope 2 at $DIR/match_test.rs:15:15: 15:16 |
| goto -> bb14; // scope 2 at $DIR/match_test.rs:15:15: 15:16 |
| } |
| |
| bb14: { |
| StorageDead(_3); // scope 2 at $DIR/match_test.rs:17:6: 17:7 |
| _0 = const (); // scope 0 at $DIR/match_test.rs:6:11: 18:2 |
| StorageDead(_2); // scope 1 at $DIR/match_test.rs:18:1: 18:2 |
| StorageDead(_1); // scope 0 at $DIR/match_test.rs:18:1: 18:2 |
| return; // scope 0 at $DIR/match_test.rs:18:2: 18:2 |
| } |
| } |