|
2 | 2 | + // MIR for `bar` after MatchBranchSimplification
|
3 | 3 |
|
4 | 4 | fn bar(_1: i32) -> (bool, bool, bool, bool) {
|
5 |
| - debug i => _1; // in scope 0 at $DIR/matches_reduce_branches.rs:11:8: 11:9 |
6 |
| - let mut _0: (bool, bool, bool, bool); // return place in scope 0 at $DIR/matches_reduce_branches.rs:11:19: 11:43 |
7 |
| - let _2: bool; // in scope 0 at $DIR/matches_reduce_branches.rs:12:9: 12:10 |
8 |
| - let _6: (); // in scope 0 at $DIR/matches_reduce_branches.rs:17:5: 32:6 |
9 |
| - let mut _7: bool; // in scope 0 at $DIR/matches_reduce_branches.rs:34:6: 34:7 |
10 |
| - let mut _8: bool; // in scope 0 at $DIR/matches_reduce_branches.rs:34:9: 34:10 |
11 |
| - let mut _9: bool; // in scope 0 at $DIR/matches_reduce_branches.rs:34:12: 34:13 |
12 |
| - let mut _10: bool; // in scope 0 at $DIR/matches_reduce_branches.rs:34:15: 34:16 |
| 5 | + debug i => _1; // in scope 0 at $DIR/matches_reduce_branches.rs:12:8: 12:9 |
| 6 | + let mut _0: (bool, bool, bool, bool); // return place in scope 0 at $DIR/matches_reduce_branches.rs:12:19: 12:43 |
| 7 | + let _2: bool; // in scope 0 at $DIR/matches_reduce_branches.rs:13:9: 13:10 |
| 8 | + let _6: (); // in scope 0 at $DIR/matches_reduce_branches.rs:18:5: 33:6 |
| 9 | + let mut _7: bool; // in scope 0 at $DIR/matches_reduce_branches.rs:35:6: 35:7 |
| 10 | + let mut _8: bool; // in scope 0 at $DIR/matches_reduce_branches.rs:35:9: 35:10 |
| 11 | + let mut _9: bool; // in scope 0 at $DIR/matches_reduce_branches.rs:35:12: 35:13 |
| 12 | + let mut _10: bool; // in scope 0 at $DIR/matches_reduce_branches.rs:35:15: 35:16 |
13 | 13 | scope 1 {
|
14 |
| - debug a => _2; // in scope 1 at $DIR/matches_reduce_branches.rs:12:9: 12:10 |
15 |
| - let _3: bool; // in scope 1 at $DIR/matches_reduce_branches.rs:13:9: 13:10 |
| 14 | + debug a => _2; // in scope 1 at $DIR/matches_reduce_branches.rs:13:9: 13:10 |
| 15 | + let _3: bool; // in scope 1 at $DIR/matches_reduce_branches.rs:14:9: 14:10 |
16 | 16 | scope 2 {
|
17 |
| - debug b => _3; // in scope 2 at $DIR/matches_reduce_branches.rs:13:9: 13:10 |
18 |
| - let _4: bool; // in scope 2 at $DIR/matches_reduce_branches.rs:14:9: 14:10 |
| 17 | + debug b => _3; // in scope 2 at $DIR/matches_reduce_branches.rs:14:9: 14:10 |
| 18 | + let _4: bool; // in scope 2 at $DIR/matches_reduce_branches.rs:15:9: 15:10 |
19 | 19 | scope 3 {
|
20 |
| - debug c => _4; // in scope 3 at $DIR/matches_reduce_branches.rs:14:9: 14:10 |
21 |
| - let _5: bool; // in scope 3 at $DIR/matches_reduce_branches.rs:15:9: 15:10 |
| 20 | + debug c => _4; // in scope 3 at $DIR/matches_reduce_branches.rs:15:9: 15:10 |
| 21 | + let _5: bool; // in scope 3 at $DIR/matches_reduce_branches.rs:16:9: 16:10 |
22 | 22 | scope 4 {
|
23 |
| - debug d => _5; // in scope 4 at $DIR/matches_reduce_branches.rs:15:9: 15:10 |
| 23 | + debug d => _5; // in scope 4 at $DIR/matches_reduce_branches.rs:16:9: 16:10 |
24 | 24 | }
|
25 | 25 | }
|
26 | 26 | }
|
27 | 27 | }
|
28 | 28 |
|
29 | 29 | bb0: {
|
30 |
| - StorageLive(_2); // scope 0 at $DIR/matches_reduce_branches.rs:12:9: 12:10 |
31 |
| - StorageLive(_3); // scope 1 at $DIR/matches_reduce_branches.rs:13:9: 13:10 |
32 |
| - StorageLive(_4); // scope 2 at $DIR/matches_reduce_branches.rs:14:9: 14:10 |
33 |
| - StorageLive(_5); // scope 3 at $DIR/matches_reduce_branches.rs:15:9: 15:10 |
34 |
| - StorageLive(_6); // scope 4 at $DIR/matches_reduce_branches.rs:17:5: 32:6 |
35 |
| -- switchInt(_1) -> [7_i32: bb2, otherwise: bb1]; // scope 4 at $DIR/matches_reduce_branches.rs:18:9: 18:10 |
36 |
| -+ _2 = Ne(_1, const 7_i32); // scope 4 at $DIR/matches_reduce_branches.rs:19:13: 19:22 |
37 |
| -+ _3 = Eq(_1, const 7_i32); // scope 4 at $DIR/matches_reduce_branches.rs:20:13: 20:21 |
38 |
| -+ _4 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:21:13: 21:22 |
39 |
| -+ _5 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:22:13: 22:21 |
40 |
| -+ goto -> bb3; // scope 4 at $DIR/matches_reduce_branches.rs:18:9: 18:10 |
| 30 | + StorageLive(_2); // scope 0 at $DIR/matches_reduce_branches.rs:13:9: 13:10 |
| 31 | + StorageLive(_3); // scope 1 at $DIR/matches_reduce_branches.rs:14:9: 14:10 |
| 32 | + StorageLive(_4); // scope 2 at $DIR/matches_reduce_branches.rs:15:9: 15:10 |
| 33 | + StorageLive(_5); // scope 3 at $DIR/matches_reduce_branches.rs:16:9: 16:10 |
| 34 | + StorageLive(_6); // scope 4 at $DIR/matches_reduce_branches.rs:18:5: 33:6 |
| 35 | +- switchInt(_1) -> [7_i32: bb2, otherwise: bb1]; // scope 4 at $DIR/matches_reduce_branches.rs:19:9: 19:10 |
| 36 | ++ _2 = Ne(_1, const 7_i32); // scope 4 at $DIR/matches_reduce_branches.rs:20:13: 20:22 |
| 37 | ++ _3 = Eq(_1, const 7_i32); // scope 4 at $DIR/matches_reduce_branches.rs:21:13: 21:21 |
| 38 | ++ _4 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:22:13: 22:22 |
| 39 | ++ _5 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:23:13: 23:21 |
| 40 | ++ goto -> bb3; // scope 4 at $DIR/matches_reduce_branches.rs:19:9: 19:10 |
41 | 41 | }
|
42 | 42 |
|
43 | 43 | bb1: {
|
44 |
| - _2 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:26:13: 26:21 |
45 |
| - _3 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:27:13: 27:22 |
46 |
| - _4 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:28:13: 28:22 |
47 |
| - _5 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:29:13: 29:21 |
48 |
| - goto -> bb3; // scope 4 at $DIR/matches_reduce_branches.rs:17:5: 32:6 |
| 44 | + _2 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:27:13: 27:21 |
| 45 | + _3 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:28:13: 28:22 |
| 46 | + _4 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:29:13: 29:22 |
| 47 | + _5 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:30:13: 30:21 |
| 48 | + goto -> bb3; // scope 4 at $DIR/matches_reduce_branches.rs:18:5: 33:6 |
49 | 49 | }
|
50 | 50 |
|
51 | 51 | bb2: {
|
52 |
| - _2 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:19:13: 19:22 |
53 |
| - _3 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:20:13: 20:21 |
54 |
| - _4 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:21:13: 21:22 |
55 |
| - _5 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:22:13: 22:21 |
56 |
| - goto -> bb3; // scope 4 at $DIR/matches_reduce_branches.rs:17:5: 32:6 |
| 52 | + _2 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:20:13: 20:22 |
| 53 | + _3 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:21:13: 21:21 |
| 54 | + _4 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:22:13: 22:22 |
| 55 | + _5 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:23:13: 23:21 |
| 56 | + goto -> bb3; // scope 4 at $DIR/matches_reduce_branches.rs:18:5: 33:6 |
57 | 57 | }
|
58 | 58 |
|
59 | 59 | bb3: {
|
60 |
| - StorageDead(_6); // scope 4 at $DIR/matches_reduce_branches.rs:32:6: 32:7 |
61 |
| - StorageLive(_7); // scope 4 at $DIR/matches_reduce_branches.rs:34:6: 34:7 |
62 |
| - _7 = _2; // scope 4 at $DIR/matches_reduce_branches.rs:34:6: 34:7 |
63 |
| - StorageLive(_8); // scope 4 at $DIR/matches_reduce_branches.rs:34:9: 34:10 |
64 |
| - _8 = _3; // scope 4 at $DIR/matches_reduce_branches.rs:34:9: 34:10 |
65 |
| - StorageLive(_9); // scope 4 at $DIR/matches_reduce_branches.rs:34:12: 34:13 |
66 |
| - _9 = _4; // scope 4 at $DIR/matches_reduce_branches.rs:34:12: 34:13 |
67 |
| - StorageLive(_10); // scope 4 at $DIR/matches_reduce_branches.rs:34:15: 34:16 |
68 |
| - _10 = _5; // scope 4 at $DIR/matches_reduce_branches.rs:34:15: 34:16 |
69 |
| - (_0.0: bool) = move _7; // scope 4 at $DIR/matches_reduce_branches.rs:34:5: 34:17 |
70 |
| - (_0.1: bool) = move _8; // scope 4 at $DIR/matches_reduce_branches.rs:34:5: 34:17 |
71 |
| - (_0.2: bool) = move _9; // scope 4 at $DIR/matches_reduce_branches.rs:34:5: 34:17 |
72 |
| - (_0.3: bool) = move _10; // scope 4 at $DIR/matches_reduce_branches.rs:34:5: 34:17 |
73 |
| - StorageDead(_10); // scope 4 at $DIR/matches_reduce_branches.rs:34:16: 34:17 |
74 |
| - StorageDead(_9); // scope 4 at $DIR/matches_reduce_branches.rs:34:16: 34:17 |
75 |
| - StorageDead(_8); // scope 4 at $DIR/matches_reduce_branches.rs:34:16: 34:17 |
76 |
| - StorageDead(_7); // scope 4 at $DIR/matches_reduce_branches.rs:34:16: 34:17 |
77 |
| - StorageDead(_5); // scope 3 at $DIR/matches_reduce_branches.rs:35:1: 35:2 |
78 |
| - StorageDead(_4); // scope 2 at $DIR/matches_reduce_branches.rs:35:1: 35:2 |
79 |
| - StorageDead(_3); // scope 1 at $DIR/matches_reduce_branches.rs:35:1: 35:2 |
80 |
| - StorageDead(_2); // scope 0 at $DIR/matches_reduce_branches.rs:35:1: 35:2 |
81 |
| - return; // scope 0 at $DIR/matches_reduce_branches.rs:35:2: 35:2 |
| 60 | + StorageDead(_6); // scope 4 at $DIR/matches_reduce_branches.rs:33:6: 33:7 |
| 61 | + StorageLive(_7); // scope 4 at $DIR/matches_reduce_branches.rs:35:6: 35:7 |
| 62 | + _7 = _2; // scope 4 at $DIR/matches_reduce_branches.rs:35:6: 35:7 |
| 63 | + StorageLive(_8); // scope 4 at $DIR/matches_reduce_branches.rs:35:9: 35:10 |
| 64 | + _8 = _3; // scope 4 at $DIR/matches_reduce_branches.rs:35:9: 35:10 |
| 65 | + StorageLive(_9); // scope 4 at $DIR/matches_reduce_branches.rs:35:12: 35:13 |
| 66 | + _9 = _4; // scope 4 at $DIR/matches_reduce_branches.rs:35:12: 35:13 |
| 67 | + StorageLive(_10); // scope 4 at $DIR/matches_reduce_branches.rs:35:15: 35:16 |
| 68 | + _10 = _5; // scope 4 at $DIR/matches_reduce_branches.rs:35:15: 35:16 |
| 69 | + (_0.0: bool) = move _7; // scope 4 at $DIR/matches_reduce_branches.rs:35:5: 35:17 |
| 70 | + (_0.1: bool) = move _8; // scope 4 at $DIR/matches_reduce_branches.rs:35:5: 35:17 |
| 71 | + (_0.2: bool) = move _9; // scope 4 at $DIR/matches_reduce_branches.rs:35:5: 35:17 |
| 72 | + (_0.3: bool) = move _10; // scope 4 at $DIR/matches_reduce_branches.rs:35:5: 35:17 |
| 73 | + StorageDead(_10); // scope 4 at $DIR/matches_reduce_branches.rs:35:16: 35:17 |
| 74 | + StorageDead(_9); // scope 4 at $DIR/matches_reduce_branches.rs:35:16: 35:17 |
| 75 | + StorageDead(_8); // scope 4 at $DIR/matches_reduce_branches.rs:35:16: 35:17 |
| 76 | + StorageDead(_7); // scope 4 at $DIR/matches_reduce_branches.rs:35:16: 35:17 |
| 77 | + StorageDead(_5); // scope 3 at $DIR/matches_reduce_branches.rs:36:1: 36:2 |
| 78 | + StorageDead(_4); // scope 2 at $DIR/matches_reduce_branches.rs:36:1: 36:2 |
| 79 | + StorageDead(_3); // scope 1 at $DIR/matches_reduce_branches.rs:36:1: 36:2 |
| 80 | + StorageDead(_2); // scope 0 at $DIR/matches_reduce_branches.rs:36:1: 36:2 |
| 81 | + return; // scope 0 at $DIR/matches_reduce_branches.rs:36:2: 36:2 |
82 | 82 | }
|
83 | 83 | }
|
84 | 84 |
|
0 commit comments