]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/match_test.main.SimplifyCfg-initial.after.mir
Rollup merge of #107465 - WaffleLapkin:has_allow_dead_code_or_lang_attr, r=Nilstrieb
[rust.git] / tests / mir-opt / match_test.main.SimplifyCfg-initial.after.mir
1 // MIR for `main` after SimplifyCfg-initial
2
3 fn main() -> () {
4     let mut _0: ();                      // return place in scope 0 at $DIR/match_test.rs:+0:11: +0:11
5     let _1: i32;                         // in scope 0 at $DIR/match_test.rs:+1:9: +1:10
6     let _3: i32;                         // in scope 0 at $DIR/match_test.rs:+6:5: +11:6
7     let mut _4: bool;                    // in scope 0 at $DIR/match_test.rs:+8:9: +8:16
8     let mut _5: bool;                    // in scope 0 at $DIR/match_test.rs:+8:9: +8:16
9     let mut _6: bool;                    // in scope 0 at $DIR/match_test.rs:+7:9: +7:14
10     let mut _7: bool;                    // in scope 0 at $DIR/match_test.rs:+7:9: +7:14
11     let mut _8: &i32;                    // in scope 0 at $DIR/match_test.rs:+6:11: +6:12
12     let mut _9: bool;                    // in scope 0 at $DIR/match_test.rs:+7:18: +7:19
13     scope 1 {
14         debug x => _1;                   // in scope 1 at $DIR/match_test.rs:+1:9: +1:10
15         let _2: bool;                    // in scope 1 at $DIR/match_test.rs:+2:9: +2:10
16         scope 2 {
17             debug b => _2;               // in scope 2 at $DIR/match_test.rs:+2:9: +2:10
18         }
19     }
20
21     bb0: {
22         StorageLive(_1);                 // scope 0 at $DIR/match_test.rs:+1:9: +1:10
23         _1 = const 3_i32;                // scope 0 at $DIR/match_test.rs:+1:13: +1:14
24         FakeRead(ForLet(None), _1);      // scope 0 at $DIR/match_test.rs:+1:9: +1:10
25         StorageLive(_2);                 // scope 1 at $DIR/match_test.rs:+2:9: +2:10
26         _2 = const true;                 // scope 1 at $DIR/match_test.rs:+2:13: +2:17
27         FakeRead(ForLet(None), _2);      // scope 1 at $DIR/match_test.rs:+2:9: +2:10
28         StorageLive(_3);                 // scope 2 at $DIR/match_test.rs:+6:5: +11:6
29         FakeRead(ForMatchedPlace(None), _1); // scope 2 at $DIR/match_test.rs:+6:11: +6:12
30         _6 = Le(const 0_i32, _1);        // scope 2 at $DIR/match_test.rs:+7:9: +7:14
31         switchInt(move _6) -> [0: bb4, otherwise: bb1]; // scope 2 at $DIR/match_test.rs:+7:9: +7:14
32     }
33
34     bb1: {
35         _7 = Lt(_1, const 10_i32);       // scope 2 at $DIR/match_test.rs:+7:9: +7:14
36         switchInt(move _7) -> [0: bb4, otherwise: bb2]; // scope 2 at $DIR/match_test.rs:+7:9: +7:14
37     }
38
39     bb2: {
40         falseEdge -> [real: bb9, imaginary: bb6]; // scope 2 at $DIR/match_test.rs:+7:9: +7:14
41     }
42
43     bb3: {
44         _3 = const 3_i32;                // scope 2 at $DIR/match_test.rs:+10:14: +10:15
45         goto -> bb14;                    // scope 2 at $DIR/match_test.rs:+10:14: +10:15
46     }
47
48     bb4: {
49         _4 = Le(const 10_i32, _1);       // scope 2 at $DIR/match_test.rs:+8:9: +8:16
50         switchInt(move _4) -> [0: bb7, otherwise: bb5]; // scope 2 at $DIR/match_test.rs:+8:9: +8:16
51     }
52
53     bb5: {
54         _5 = Le(_1, const 20_i32);       // scope 2 at $DIR/match_test.rs:+8:9: +8:16
55         switchInt(move _5) -> [0: bb7, otherwise: bb6]; // scope 2 at $DIR/match_test.rs:+8:9: +8:16
56     }
57
58     bb6: {
59         falseEdge -> [real: bb12, imaginary: bb8]; // scope 2 at $DIR/match_test.rs:+8:9: +8:16
60     }
61
62     bb7: {
63         switchInt(_1) -> [4294967295: bb8, otherwise: bb3]; // scope 2 at $DIR/match_test.rs:+6:5: +6:12
64     }
65
66     bb8: {
67         falseEdge -> [real: bb13, imaginary: bb3]; // scope 2 at $DIR/match_test.rs:+9:9: +9:11
68     }
69
70     bb9: {
71         _8 = &shallow _1;                // scope 2 at $DIR/match_test.rs:+6:11: +6:12
72         StorageLive(_9);                 // scope 2 at $DIR/match_test.rs:+7:18: +7:19
73         _9 = _2;                         // scope 2 at $DIR/match_test.rs:+7:18: +7:19
74         switchInt(move _9) -> [0: bb11, otherwise: bb10]; // scope 2 at $DIR/match_test.rs:+7:18: +7:19
75     }
76
77     bb10: {
78         StorageDead(_9);                 // scope 2 at $DIR/match_test.rs:+7:18: +7:19
79         FakeRead(ForMatchGuard, _8);     // scope 2 at $DIR/match_test.rs:+7:18: +7:19
80         _3 = const 0_i32;                // scope 2 at $DIR/match_test.rs:+7:23: +7:24
81         goto -> bb14;                    // scope 2 at $DIR/match_test.rs:+7:23: +7:24
82     }
83
84     bb11: {
85         StorageDead(_9);                 // scope 2 at $DIR/match_test.rs:+7:18: +7:19
86         falseEdge -> [real: bb3, imaginary: bb6]; // scope 2 at $DIR/match_test.rs:+7:18: +7:19
87     }
88
89     bb12: {
90         _3 = const 1_i32;                // scope 2 at $DIR/match_test.rs:+8:20: +8:21
91         goto -> bb14;                    // scope 2 at $DIR/match_test.rs:+8:20: +8:21
92     }
93
94     bb13: {
95         _3 = const 2_i32;                // scope 2 at $DIR/match_test.rs:+9:15: +9:16
96         goto -> bb14;                    // scope 2 at $DIR/match_test.rs:+9:15: +9:16
97     }
98
99     bb14: {
100         StorageDead(_3);                 // scope 2 at $DIR/match_test.rs:+11:6: +11:7
101         _0 = const ();                   // scope 0 at $DIR/match_test.rs:+0:11: +12:2
102         StorageDead(_2);                 // scope 1 at $DIR/match_test.rs:+12:1: +12:2
103         StorageDead(_1);                 // scope 0 at $DIR/match_test.rs:+12:1: +12:2
104         return;                          // scope 0 at $DIR/match_test.rs:+12:2: +12:2
105     }
106 }